Ejemplo n.º 1
0
        public override void Update()
        {
            BaseBuilding target = Entity.GoToTarget();

            if (target != null)
            {
                WaitChanged?.Invoke(this, EventArgs.Empty);
                StateMachine.ChangeState(CharacterActionEnum.MoveToTarget);
                return;
            }

            if (Wait < 1)
            {
                WaitChanged?.Invoke(this, EventArgs.Empty);
                return;
            }

            Entity.Upset();
            StateMachine.ChangeState(CharacterActionEnum.Upsetted);
        }
Ejemplo n.º 2
0
 private void OnStateEntered(object sender, System.EventArgs e)
 {
     stateEntered = Time.time;
     WaitChanged?.Invoke(this, EventArgs.Empty);
 }