dd
This commit is contained in:
@@ -35,7 +35,7 @@ export class RoleViewComp extends CCComp {
|
||||
hp_max:number = 1000;
|
||||
power: number = 0;
|
||||
stop_cd:number = 0;
|
||||
atk_cd:number = 10;
|
||||
atk_cd:number = 3;
|
||||
atk:number = 10;
|
||||
skill_uuid:number = 9003;
|
||||
max_skill_uuid:number = 1001;
|
||||
@@ -51,8 +51,8 @@ export class RoleViewComp extends CCComp {
|
||||
// let x = RandomManager.instance.getRandomInt(1,9,2)
|
||||
// this.as.setSkin("Character0"+x);
|
||||
this.atk_time = new Timer(this.atk_cd);
|
||||
// this.sprite = this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite);
|
||||
// this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
|
||||
this.sprite = this.node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite);
|
||||
this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
|
||||
console.log("Role view start")
|
||||
let collider = this.getComponent(Collider2D);
|
||||
if (collider) {
|
||||
@@ -113,16 +113,16 @@ export class RoleViewComp extends CCComp {
|
||||
}
|
||||
|
||||
in_atked() {
|
||||
// this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
|
||||
// this.scheduleOnce(() => {
|
||||
// this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
|
||||
// }, 0.1);
|
||||
var path = "game/skills/atked";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
let pos = v3(0,30)
|
||||
node.setPosition(pos)
|
||||
node.parent = this.node;
|
||||
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
|
||||
this.scheduleOnce(() => {
|
||||
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
|
||||
}, 0.1);
|
||||
// var path = "game/skills/atked";
|
||||
// var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
// var node = instantiate(prefab);
|
||||
// let pos = v3(0,30)
|
||||
// node.setPosition(pos)
|
||||
// node.parent = this.node;
|
||||
}
|
||||
hp_change(hp: number){
|
||||
this.hp -= hp;
|
||||
|
||||
Reference in New Issue
Block a user