基本完成,进入 英雄 和装备设计阶段
This commit is contained in:
@@ -5,6 +5,7 @@ import { BoxSet } from "../common/config/BoxSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { TooltipTypes } from "../common/config/Mission";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -23,9 +24,10 @@ export class TooltipCom extends CCComp {
|
||||
alive_time:number = 0.3;
|
||||
skill_name_time=0.5;
|
||||
scale:number = 1;
|
||||
|
||||
start() {
|
||||
switch(this.stype){
|
||||
case 1:
|
||||
case TooltipTypes.life:
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y-50))
|
||||
this.node.setSiblingIndex(100);
|
||||
this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value;
|
||||
@@ -34,7 +36,7 @@ export class TooltipCom extends CCComp {
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case 2:
|
||||
case TooltipTypes.health:
|
||||
this.node.setSiblingIndex(110);
|
||||
this.node.getChildByName("add_life").getChildByName("hp").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("add_life").active=true;
|
||||
@@ -42,7 +44,7 @@ export class TooltipCom extends CCComp {
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case 4:
|
||||
case TooltipTypes.crit:
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y-50))
|
||||
this.node.setSiblingIndex(200);
|
||||
this.node.getChildByName("bloss").getChildByName("hp").getComponent(Label).string = this.value;
|
||||
@@ -51,7 +53,7 @@ export class TooltipCom extends CCComp {
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case 3:
|
||||
case TooltipTypes.skill:
|
||||
this.node.getChildByName("skill").getChildByName("name").getComponent(Label).string = "<"+SkillSet[this.s_uuid].name+">";
|
||||
this.node.getChildByName("skill").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y+30))
|
||||
@@ -59,7 +61,7 @@ export class TooltipCom extends CCComp {
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case 5:
|
||||
case TooltipTypes.uskill:
|
||||
this.node.getChildByName("uskill").getChildByName("name").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("uskill").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y+30))
|
||||
@@ -67,6 +69,29 @@ export class TooltipCom extends CCComp {
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case TooltipTypes.lvup:
|
||||
// this.node.getChildByName("lvup").getChildByName("name").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("lvup").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y-30))
|
||||
this.scheduleOnce(()=>{
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case TooltipTypes.apup:
|
||||
this.node.getChildByName("apup").getChildByName("num").getComponent(Label).string = "+"+this.value;
|
||||
this.node.getChildByName("apup").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y-30))
|
||||
this.scheduleOnce(()=>{
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
break
|
||||
case TooltipTypes.hpup:
|
||||
this.node.getChildByName("hpup").getChildByName("num").getComponent(Label).string = "+"+this.value;
|
||||
this.node.getChildByName("hpup").active=true;
|
||||
this.node.setPosition(v3(this.node.position.x,this.node.position.y-30))
|
||||
this.scheduleOnce(()=>{
|
||||
this.ent.destroy()
|
||||
},0.5)
|
||||
}
|
||||
// console.log("TooltipView start:",this.node.getSiblingIndex());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user