Esempio n. 1
0
 public void Reload()
 {
     if (ClipAmmo < baseWeapon.ClipSize)
     {
         BattlePlayerInput.instance.tno.Send("SetTimedTrigger", Target.All, "Reload", "ReloadTime", baseWeapon.ReloadTime);
         ReloadCooldown.Start(baseWeapon.ReloadTime, () => { FillClip(); });
     }
 }
Esempio n. 2
0
 void Start()
 {
     gameObject.AddComponent <BoxCollider2D>();
     GetComponent <BoxCollider2D>().isTrigger = true;
     gameObject.tag    = "Weapon";
     reloadCooldown    = GameObject.Find("ReloadCooldown").GetComponent <ReloadCooldown>();
     animator          = transform.GetComponent <Animator>();
     timeSinceLastShot = Time.time + FireRate;
     reloadStartTime   = -2; //nice one, daddy
 }