Beispiel #1
0
    public void OnFire()
    {
        //Debug.Log(floorGlobal.IsOnBeat());
        //create bullet if mouse clicked and on beat
        float offbeat = floorGlobal.IsOnBeat();

        if (playerController.canShoot && !outOfAmmo && !reloading && offbeat != 0)
        {
            Shoot(offbeat);
        }
    }
Beispiel #2
0
 public void OnAbility(int index)
 {
     if (playerController.abilities[index] != null)
     {
         Debug.Log(playerController.abilities[index].onCooldown);
         if (!playerController.abilities[index].onCooldown && floorGlobal.IsOnBeat() != 0)
         {
             playerController.abilities[index].itemEffect.OnUse();
             playerController.abilities[index].StartCooldown();
             usedAbilities.Add(playerController.abilities[index]);
         }
     }
 }