Esempio n. 1
0
 public void Update()
 {
     if (CooldownManager.GetTimer("LIFE") < 0)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
 public void Fire(Vector3 direction)
 {
     if (CooldownManager.GetTimer(FIRE) <= 0)
     {
         CooldownManager.AddTimer(FIRE, FireRate);
         photonView.RPC("RPC_Fire", RpcTarget.AllViaServer, photonView.Owner, direction);
     }
 }
 public void DropFlag()
 {
     if (CooldownManager.GetTimer("FLAG") < 0)
     {
         CooldownManager.AddTimer("FLAG", .5f);
     }
     if (Hand.GetItem() != null)
     {
         photonView.RPC("RPC_DropFlag", RpcTarget.AllViaServer, Hand.GetItem().GetComponent <PhotonView>().ViewID, transform.position);
     }
     Flag = null;
 }
Esempio n. 4
0
    void Update()
    {
        int timer = Mathf.RoundToInt(cooldownManager.GetTimer(Cooldown));

        if (timer <= 0)
        {
            text.text = "";
        }
        else
        {
            text.text = timer.ToString();
        }
    }