英雄设定大概完成,接下来需要借鉴其他热门游戏设定,再修改
This commit is contained in:
@@ -5,13 +5,13 @@ const { ccclass, property } = _decorator;
|
||||
export class BuffGet extends Component {
|
||||
start() {
|
||||
this.scheduleOnce(()=>{
|
||||
tween(this.node).to( 0.1,
|
||||
{ position: new Vec3(this.node.position.x,this.node.position.y+50) },
|
||||
tween(this.node).to( 0.2,
|
||||
{ position: new Vec3(this.node.position.x,this.node.position.y+100) },
|
||||
{
|
||||
onComplete:()=>{ this.node.destroy() }
|
||||
}
|
||||
).start();
|
||||
}, 1);
|
||||
}, 3);
|
||||
}
|
||||
init(name:string){
|
||||
this.node.getChildByName("ap").active=(name=="ap")
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
import { _decorator, Collider2D, Component, Node } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('EndTimeBoomCom')
|
||||
export class EndTimeBoomCom extends Component {
|
||||
time:number = 0
|
||||
base:SkillCom = null
|
||||
collider:Collider2D = null
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
this.collider = this.getComponent(Collider2D);
|
||||
this.collider.enabled = false
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
if(smc.mission.pause) return
|
||||
this.time+=deltaTime
|
||||
if(this.time>=this.base.in_time){
|
||||
this.collider.enabled = true
|
||||
this.base.is_destroy = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "bb7d4fe7-a905-4a54-ba85-e1025511bcd2",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -24,9 +24,9 @@ export class TooltipCom extends CCComp {
|
||||
skill_name_time=0.5;
|
||||
scale:number = 1;
|
||||
start() {
|
||||
// console.log("TooltipView start",this.node);
|
||||
switch(this.stype){
|
||||
case 1:
|
||||
this.node.setSiblingIndex(1);
|
||||
this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("loss_life").active=true;
|
||||
tween(this.node).to(
|
||||
@@ -39,6 +39,7 @@ export class TooltipCom extends CCComp {
|
||||
).start()
|
||||
break
|
||||
case 2:
|
||||
this.node.setSiblingIndex(1);
|
||||
this.node.getChildByName("add_life").getChildByName("hp").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("add_life").active=true;
|
||||
tween(this.node).to(
|
||||
@@ -65,6 +66,7 @@ export class TooltipCom extends CCComp {
|
||||
).start()
|
||||
break
|
||||
case 4:
|
||||
this.node.setSiblingIndex(1);
|
||||
this.node.getChildByName("bloss").getChildByName("hp").getComponent(Label).string = this.value;
|
||||
this.node.getChildByName("bloss").active=true;
|
||||
tween(this.node).to(
|
||||
@@ -91,6 +93,8 @@ export class TooltipCom extends CCComp {
|
||||
).start()
|
||||
break
|
||||
}
|
||||
console.log("TooltipView start:",this.node.getSiblingIndex());
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
Reference in New Issue
Block a user