dd
This commit is contained in:
@@ -12,7 +12,7 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('RoleBuffComp')
|
||||
@ecs.register('RoleBuff', false)
|
||||
export class RoleBuffComp extends CCComp {
|
||||
as: RoleSpine = null!;
|
||||
// as: RoleSpine = null!;
|
||||
mv!: RoleViewComp
|
||||
|
||||
timer:Timer = new Timer(0.1);
|
||||
@@ -28,7 +28,7 @@ export class RoleBuffComp extends CCComp {
|
||||
|
||||
|
||||
onLoad() {
|
||||
this.as = this.node.getComponent(RoleSpine);
|
||||
// this.as = this.node.getComponent(RoleSpine);
|
||||
this.mv= this.getComponent(RoleViewComp);
|
||||
} /** 视图层逻辑代码分离演示 */
|
||||
start () {
|
||||
@@ -73,7 +73,7 @@ export class RoleBuffComp extends CCComp {
|
||||
b.time=buff.time;
|
||||
if(buff.atk>0){
|
||||
this.node.getChildByName("avatar").setScale(1.2,1.2)
|
||||
// this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite).color= new Color().fromHEX("#F16F6F");
|
||||
this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite).color= new Color().fromHEX("#F16F6F");
|
||||
this.mv.atk+=(buff.atk+buff.args.atk-b.atk);
|
||||
}
|
||||
if(buff.hp>0){
|
||||
@@ -95,7 +95,7 @@ export class RoleBuffComp extends CCComp {
|
||||
if(buff.atk>0){
|
||||
this.mv.atk+=(buff.atk+buff.args.atk);
|
||||
this.node.getChildByName("avatar").setScale(1.2,1.2)
|
||||
// this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite).color= new Color().fromHEX("#F16F6F");
|
||||
this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite).color= new Color().fromHEX("#F16F6F");
|
||||
}
|
||||
if(buff.hp>0){
|
||||
this.mv.hp+=(buff.hp+buff.args.hp);
|
||||
|
||||
Reference in New Issue
Block a user