private void PlayerKill(Player player)
        {
            player.Die();

            _model.targetPos = player.XY();
            _fsm.ChangeState <EnemyState_Kill>();
        }
Example #2
0
        private void MoveToPlayer(Player player)
        {
            if (Vector2.Distance(_model.position, player.XY()).IsLessOrEqual(1))
            {
                player.Die();

                _model.position = player.XY();
                _fsm.ChangeState <EnemyState_Kill>();
            }
            else
            {
                _model.targetPos = player.XY();
                _fsm.ChangeState <EnemyState_MoveToTarget>();
            }
        }