void Update()
    {
        if (currentWeapon == null && bonusActive)
        {
            bonusActive   = false;
            currentWeapon = bonusWeapon;
            currentWeapon.gameObject.SetActive(true);
            bonusWeapon = null;
        }

        if (!stunned)
        {
            Vector2 aimDir = new Vector2(InputSystem.ThumbstickInput(ThumbSticks.RightX, playerNr - 1), InputSystem.ThumbstickInput(ThumbSticks.RightY, playerNr - 1));

            if (controlsInverted)
            {
                aimDir *= -1;
            }

            currentWeapon.Aim(aimDir);
        }

        currentWeapon.Shoot(InputSystem.TriggerPressed(Triggers.Right, playerNr - 1));

        if (ability != null)
        {
            if (InputSystem.TriggerUp(Triggers.Left, playerNr - 1))
            {
                ability.StopUse();
            }
            else if (InputSystem.TriggerPressed(Triggers.Left, playerNr - 1) && specialAvailable)// && !sprintActive)
            {
                ability.Use();
            }
        }
    }
Esempio n. 2
0
 public void Use(AbilityUseParams useParams)
 {
     behaviour.Use(useParams);
 }
Esempio n. 3
0
 public void Use(AbilityUseParams args)
 {
     behavior.Use(args);
 }
Esempio n. 4
0
 public void Use(AbilityParamaters useParams)
 {
     behavior.Use(useParams);
 }