dd
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
@@ -133,8 +133,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 110,
|
||||
"height": 110
|
||||
"width": 93,
|
||||
"height": 93
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -170,7 +170,7 @@
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "27c92e56-a5f9-4a91-a837-468ff584d119@f9941",
|
||||
"__uuid__": "475189e3-a159-45bc-90f5-57864087d290@c7034",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
@@ -228,8 +228,8 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 55,
|
||||
"y": 55,
|
||||
"x": 47.5,
|
||||
"y": 47.5,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -241,8 +241,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"x": 0.7,
|
||||
"y": 0.7,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -491,8 +491,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
"width": 95,
|
||||
"height": 95
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
|
||||
@@ -2557,8 +2557,8 @@
|
||||
"rawHeight": 16,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderLeft": 4,
|
||||
"borderRight": 5,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
@@ -2647,10 +2647,10 @@
|
||||
"height": 308,
|
||||
"rawWidth": 231,
|
||||
"rawHeight": 308,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderTop": 14,
|
||||
"borderBottom": 14,
|
||||
"borderLeft": 15,
|
||||
"borderRight": 13,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
@@ -3017,7 +3017,7 @@
|
||||
"rawHeight": 38,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderLeft": 41,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
@@ -3201,8 +3201,8 @@
|
||||
"rawHeight": 8,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderLeft": 5,
|
||||
"borderRight": 5,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ export class CardControllerComp extends CCComp {
|
||||
let card = ecs.getEntity<HeroCard>(HeroCard);
|
||||
let pos = v3(x,y)
|
||||
card.load(pos,element[0],cards_node);
|
||||
x=x+120
|
||||
x=x+100
|
||||
});
|
||||
this.node.getChildByName("cards").getChildByName("active").active = false
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export class HeroCardViewComp extends CCComp {
|
||||
pos_x=0;
|
||||
pos_y=0;
|
||||
protected onLoad(): void {
|
||||
this.node.on(NodeEventType.TOUCH_START, this.onTouchMove, this);
|
||||
this.node.on(NodeEventType.TOUCH_START, this.onTouch, this);
|
||||
this.node.on(NodeEventType.TOUCH_MOVE, this.onTouchMove, this);
|
||||
this.node.on(NodeEventType.TOUCH_END, this.onTouchEnd, this);
|
||||
this.node.on(NodeEventType.TOUCH_CANCEL, this.onTouchEnd, this);
|
||||
@@ -38,13 +38,16 @@ export class HeroCardViewComp extends CCComp {
|
||||
// this.reset();
|
||||
// }
|
||||
}
|
||||
|
||||
onTouchMove(event: EventTouch) {
|
||||
onTouch(){
|
||||
smc.vm_data.cards.eid = this.ent.eid;
|
||||
let parent = this.node.parent;
|
||||
let active = parent.getChildByName("active");
|
||||
active.setPosition(this.node.position.x,this.node.position.y)
|
||||
active.setPosition(this.pos_x,this.pos_y)
|
||||
active.active = true;
|
||||
active.setPosition(this.node.position.x,this.node.position.y);
|
||||
}
|
||||
onTouchMove(event: EventTouch) {
|
||||
smc.vm_data.cards.eid = this.ent.eid;
|
||||
// if(this.ent.eid == smc.vm_data.cards.eid){
|
||||
// this.node.getChildByName("active").active = true;
|
||||
// }else{
|
||||
|
||||
Reference in New Issue
Block a user