12345678910111213141516171819202122232425262728293031323334353637383940 |
- import { _decorator,Component} from 'cc';
- import { RenderPriority } from '../data/BattleEnum';
- const { ccclass, property } = _decorator;
- @ccclass('BattleNodeBase')
- export class BattleNodeBase extends Component {
- priority: RenderPriority = RenderPriority.Role;
- ID: number = 0;
- typeID: number = 0;
-
- protected _isLock: boolean = false;
-
- protected _lockTime: number = 0;
- set isLock(isLock:boolean){
- this._isLock = isLock;
- this._lockTime = isLock?3:0;
- }
- get isLock(){
- return this._isLock;
- }
-
-
- update(deltaTime: number) {
- if(this._lockTime > 0){
- this._lockTime -= deltaTime;
- if(this._lockTime <= 0){
- this._isLock = false;
- }
- }
- }
- }
|