Exemplo n.º 1
0
        public override void Start()
        {
            if (_shootingHelper.CheckDotHas(Input.MousePositionInWorldCoordinates))
            {
                Context.Switch <PlayerShooterIdle>();
                return;
            }

            AnimationController.SetBool("Attack", true);
            _eventHandler.OnStartAttack += Shot;
        }
Exemplo n.º 2
0
 public override void Update()
 {
     if (Input.GetKey(KeyCode.Mouse0))
     {
         if (_shootingHelper.CheckDotHas(Input.MousePositionInWorldCoordinates) == false)
         {
             Context.Switch <PlayerShooter>();
         }
     }
     else
     {
         if (Input.Direction.Equals(Vector2.zero))
         {
             Context.Switch <PlayerIdle>();
         }
         else
         {
             Context.Switch <PlayerMover>();
         }
     }
 }