public void Awake() { //此处填写Awake逻辑 m_StackFsmComponent = this.Entity.GetComponent <StackFsmComponent>(); this.CancellationTokenSource = new CancellationTokenSource(); this.CancellationTokenSource = null; }
public void Awake() { //此处填写Awake逻辑 m_AnimationComponent = this.Entity.GetComponent <AnimationComponent>(); m_StackFsmComponent = this.Entity.GetComponent <StackFsmComponent>(); m_MouseTargetSelectorComponent = Game.Scene.GetComponent <MouseTargetSelectorComponent>(); m_UserInputComponent = Game.Scene.GetComponent <UserInputComponent>(); }
public override void Dispose() { if (IsDisposed) { return; } base.Dispose(); //此处填写释放逻辑,但涉及Entity的操作,请放在Destroy中 m_UserInputComponent = null; m_StackFsmComponent = null; m_AnimationComponent = null; this.CancellationTokenSource?.Dispose(); this.CancellationTokenSource = null; }
public override void Dispose() { if (this.IsDisposed) { return; } base.Dispose(); this.AnimancerComponent = null; this.AnimationClips.Clear(); this.AnimationClips = null; RuntimeAnimationClips.Clear(); this.RuntimeAnimationClips = null; this.StackFsmComponent = null; }
public virtual bool TryEnter(StackFsmComponent stackFsmComponent) { StateTypes[] conflictStateTypeses = GetConflictStateTypeses(); if (conflictStateTypeses == null) { return(true); } for (int i = 0; i < conflictStateTypeses.Length; i++) { if (stackFsmComponent.HasState(conflictStateTypeses[i])) { return(false); } } return(true); }
public void Awake() { //此处填写Awake逻辑 m_StackFsmComponent = this.Entity.GetComponent <StackFsmComponent>(); this.CancellationTokenSource = new CancellationTokenSource(); this.CancellationTokenSource = null; CDInfo attackCDInfo = ReferencePool.Acquire <CDInfo>(); attackCDInfo.Name = "CommonAttack"; attackCDInfo.Interval = 750; CDInfo moveCDInfo = ReferencePool.Acquire <CDInfo>(); moveCDInfo.Name = "MoveToAttack"; moveCDInfo.Interval = 300; CDComponent.Instance.AddCDData(this.Entity.Id, attackCDInfo); CDComponent.Instance.AddCDData(this.Entity.Id, moveCDInfo); }
public override void OnEnter(StackFsmComponent stackFsmComponent) { }
public override void OnExit(StackFsmComponent stackFsmComponent) { stackFsmComponent.Entity.GetComponent <CommonAttackComponent>().CancelCommonAttack(); }
public override void OnUpdate(StackFsmComponent stackFsmComponent) { }
public override void OnRemoved(StackFsmComponent stackFsmComponent) { Game.EventSystem.Run(EventIdType.CancelMove, stackFsmComponent.Entity.Id); }
public abstract void OnExit(StackFsmComponent stackFsmComponent);
public abstract void OnEnter(StackFsmComponent stackFsmComponent);
public override void OnExit(StackFsmComponent stackFsmComponent) { stackFsmComponent.Entity.GetComponent <CommonAttackComponent>().CancelAttackWithOutResetAttackTarget(); }
public override void OnExit(StackFsmComponent stackFsmComponent) { stackFsmComponent.Entity.GetComponent <UnitPathComponent>().CancelMove(); }
public override void OnEnter(StackFsmComponent stackFsmComponent) { //SelfUnit.GetComponent<UnitPathComponent>().m }
public override void OnExit(StackFsmComponent stackFsmComponent) { }
public override void OnRemoved(StackFsmComponent stackFsmComponent) { }
public abstract void OnUpdate(StackFsmComponent stackFsmComponent);