Exemplo n.º 1
0
    public virtual void Awake()
    {
        useTimer = new CooldownTimer(cooldown);
        useTimer.Clear();
        player = GetComponent <Player>();

        actualCooldown = new UpgradableValue <float>(cooldown, cooldown * 0.7f, Upgrade.generalCooldowns);
    }
Exemplo n.º 2
0
 private void Update()
 {
     if (!string.IsNullOrEmpty(scrollAxis))
     {
         float f = Input.GetAxis(scrollAxis);
         if (f != 0 && scrollTimer.Use())
         {
             int newTab = currentTab + (int)Mathf.Sign(f);
             newTab = (newTab + tabs.Length) % tabs.Length;
             UpdateActiveTab(newTab);
         }
         else if (f == 0)
         {
             scrollTimer.Clear();
         }
     }
 }