示例#1
0
 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;
        }
示例#4
0
        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;
        }
示例#5
0
        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);
        }
示例#7
0
 public override void OnEnter(StackFsmComponent stackFsmComponent)
 {
 }
 public override void OnExit(StackFsmComponent stackFsmComponent)
 {
     stackFsmComponent.Entity.GetComponent <CommonAttackComponent>().CancelCommonAttack();
 }
 public override void OnUpdate(StackFsmComponent stackFsmComponent)
 {
 }
示例#10
0
 public override void OnRemoved(StackFsmComponent stackFsmComponent)
 {
     Game.EventSystem.Run(EventIdType.CancelMove, stackFsmComponent.Entity.Id);
 }
示例#11
0
 public abstract void OnExit(StackFsmComponent stackFsmComponent);
示例#12
0
 public abstract void OnEnter(StackFsmComponent stackFsmComponent);
示例#13
0
 public override void OnExit(StackFsmComponent stackFsmComponent)
 {
     stackFsmComponent.Entity.GetComponent <CommonAttackComponent>().CancelAttackWithOutResetAttackTarget();
 }
示例#14
0
 public override void OnExit(StackFsmComponent stackFsmComponent)
 {
     stackFsmComponent.Entity.GetComponent <UnitPathComponent>().CancelMove();
 }
示例#15
0
 public override void OnEnter(StackFsmComponent stackFsmComponent)
 {
     //SelfUnit.GetComponent<UnitPathComponent>().m
 }
示例#16
0
 public override void OnExit(StackFsmComponent stackFsmComponent)
 {
 }
示例#17
0
 public override void OnRemoved(StackFsmComponent stackFsmComponent)
 {
 }
示例#18
0
 public abstract void OnUpdate(StackFsmComponent stackFsmComponent);