添加技能动画
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import { Component, Node, Prefab, _decorator ,instantiate} from 'cc';
|
||||
import { Timer } from '../../../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer';
|
||||
import {oops} from "../../../../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { BoxSet } from '../../../../common/config/BoxSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/**
|
||||
@@ -21,9 +22,8 @@ export default class SkillLayer extends Component {
|
||||
@property(Prefab)
|
||||
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(){
|
||||
@@ -32,9 +32,9 @@ export default class SkillLayer extends Component {
|
||||
// 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(BoxSet.HERO_START,BoxSet.GAME_LINE,0);
|
||||
this.node.addChild(light);
|
||||
}
|
||||
update(dt: number) {
|
||||
// this.timer.update(dt)
|
||||
|
||||
Reference in New Issue
Block a user