dd
This commit is contained in:
@@ -33,6 +33,14 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
name : "数据测试",
|
||||
/**宝石数量 */
|
||||
gems: 10,
|
||||
game:{
|
||||
t_damge:0,
|
||||
t_dps:0,
|
||||
h_dps:0,
|
||||
m_dps:0,
|
||||
g_level:1,
|
||||
g_time:0,
|
||||
},
|
||||
/** 当前等级 */
|
||||
cards:{
|
||||
level:1,
|
||||
|
||||
@@ -23,5 +23,5 @@ export var UIConfigData: { [key: number]: UIConfig } = {
|
||||
[UIID.Loading]: { layer: LayerType.UI, prefab: "loading/prefab/loading", bundle: "resources" },
|
||||
[UIID.Netinstable]: { layer: LayerType.PopUp, prefab: "common/prefab/netinstable" },
|
||||
[UIID.Window]: { layer: LayerType.Dialog, prefab: "common/prefab/window" },
|
||||
[UIID.Role_Controller]: { layer: LayerType.UI, prefab: "gui/prefab/role_controller" },
|
||||
[UIID.Role_Controller]: { layer: LayerType.UI, prefab: "gui/role_controller" },
|
||||
}
|
||||
@@ -22,22 +22,22 @@ export default class SkillLayer extends Component {
|
||||
light: Prefab = null;
|
||||
onLoad(){
|
||||
// 监听全局事件
|
||||
oops.message.on("monster_load", this.onMonsterLoaded, this);
|
||||
oops.message.on("hero_load", this.onHeroLoaded, this);
|
||||
// oops.message.on("monster_load", this.onMonsterLoaded, this);
|
||||
// oops.message.on("hero_load", this.onHeroLoaded, this);
|
||||
|
||||
}
|
||||
onMonsterLoaded(){
|
||||
const light = instantiate(this.light);
|
||||
light.setPosition(300,-30,0);
|
||||
this.node.addChild(light);
|
||||
// const light = instantiate(this.light);
|
||||
// light.setPosition(300,-30,0);
|
||||
// this.node.addChild(light);
|
||||
}
|
||||
onHeroLoaded(){
|
||||
const light = instantiate(this.light);
|
||||
light.setPosition(-300,-30,0);
|
||||
this.node.addChild(light);
|
||||
// const light = instantiate(this.light);
|
||||
// light.setPosition(-300,-30,0);
|
||||
// this.node.addChild(light);
|
||||
}
|
||||
update(dt: number) {
|
||||
this.timer.update(dt)
|
||||
// this.timer.update(dt)
|
||||
// if (this.timer.update(dt))
|
||||
// this.node.children.sort(this.zIndexSort);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export class HeroCardViewComp extends CCComp {
|
||||
let active = parent.getChildByName("active");
|
||||
active.setPosition(this.pos_x,this.pos_y)
|
||||
active.active = true;
|
||||
active.setPosition(this.node.position.x,this.node.position.y);
|
||||
active.setPosition(this.node.position.x+47.5,this.node.position.y+47.5);
|
||||
}
|
||||
onTouchMove(event: EventTouch) {
|
||||
smc.vm_data.cards.eid = this.ent.eid;
|
||||
@@ -59,7 +59,7 @@ export class HeroCardViewComp extends CCComp {
|
||||
onTouchEnd(){
|
||||
let parent = this.node.parent;
|
||||
let active = parent.getChildByName("active");
|
||||
active.setPosition(this.pos_x,this.pos_y)
|
||||
active.setPosition(this.pos_x+47.5,this.pos_y+47.5)
|
||||
if(this.node.position.y-this.pos_y > 110){
|
||||
active.active = false;
|
||||
this.use_card()
|
||||
|
||||
Reference in New Issue
Block a user