技能layer改变,位置信息修改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { _decorator, Component, Node, v3 } from 'cc';
|
||||
import { SkillCom } from './SkillCom';
|
||||
import { BoxSet } from '../common/config/BoxSet';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('TgCom')
|
||||
@@ -10,13 +11,11 @@ export class TgCom extends Component {
|
||||
base:SkillCom = null
|
||||
start() {
|
||||
this.base =this.node.getComponent(SkillCom)
|
||||
if(this.base.box_group==BoxSet.MONSTER){
|
||||
this.base.t_pos.x=-1*this.base.t_pos.x
|
||||
}
|
||||
this.node.setPosition(this.base.t_pos)
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
if(smc.mission.pause) return
|
||||
this.cd+=deltaTime
|
||||
if(this.cd>=1){
|
||||
// this.node.setPosition(v3(-1000,0,0))
|
||||
|
||||
Reference in New Issue
Block a user