dd
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { _decorator ,Label,NodeEventType,EventTouch} from "cc";
|
||||
import { _decorator ,Label,NodeEventType,EventTouch,v3} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { data } from "../data/data";
|
||||
@@ -12,6 +12,7 @@ import { Hero } from "./Hero";
|
||||
import { MonsterViewComp } from "./MonsterViewComp";
|
||||
import { MapMonsterComp } from "../map/MapMonsterComp";
|
||||
import { MapSkillComp } from "../map/MapSkillComp";
|
||||
import { InfoBox } from "../gui/InfoBox";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -60,6 +61,8 @@ export class HeroCardViewComp extends CCComp {
|
||||
onTouchMove(event: EventTouch) {
|
||||
let delta = event.getDelta();
|
||||
this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y);
|
||||
let parent = this.node.parent.parent
|
||||
parent.getChildByName("item_box").active=true
|
||||
}
|
||||
onTouchEnd(){
|
||||
if(this.node.position.y-this.pos_y > 150){
|
||||
@@ -67,6 +70,9 @@ export class HeroCardViewComp extends CCComp {
|
||||
}else{
|
||||
this.node.setPosition(this.pos_x,this.pos_y);
|
||||
}
|
||||
let parent = this.node.parent.parent
|
||||
|
||||
parent.getChildByName("item_box").active=false
|
||||
}
|
||||
|
||||
private do_active_card_eid(event: string, args: any) {
|
||||
@@ -80,8 +86,9 @@ export class HeroCardViewComp extends CCComp {
|
||||
// console.log(this.node.getChildByName("active"),this.node.getChildByName("use"), this.node.getChildByName("bag"))
|
||||
// let use = this.node.getChildByName("use")
|
||||
// let bag = this.node.getChildByName("bag")
|
||||
let active = this.node.getChildByName("active")
|
||||
active.active = !active.active
|
||||
// let active = this.node.getChildByName("active")
|
||||
// active.active = !active.active
|
||||
|
||||
// use.active = !use.active
|
||||
// bag.active = !bag.active
|
||||
// this.alive=!this.alive
|
||||
@@ -93,14 +100,15 @@ export class HeroCardViewComp extends CCComp {
|
||||
|
||||
}
|
||||
no_active(){
|
||||
let active = this.node.getChildByName("active")
|
||||
// let use = this.node.getChildByName("use")
|
||||
// let bag = this.node.getChildByName("bag")
|
||||
active.active = false
|
||||
this.node.setScale(1,1)
|
||||
// let active = this.node.getChildByName("active")
|
||||
// // let use = this.node.getChildByName("use")
|
||||
// // let bag = this.node.getChildByName("bag")
|
||||
// active.active = false
|
||||
// this.node.setScale(1,1)
|
||||
// use.active = false
|
||||
// bag.active = false
|
||||
}
|
||||
|
||||
doit(){
|
||||
// this.do_active()
|
||||
smc.vm_data.cards.eid = this.ent.eid;
|
||||
|
||||
Reference in New Issue
Block a user