Exemplo 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(); });
     }
 }
Exemplo 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
 }