public void Reload() { if (ClipAmmo < baseWeapon.ClipSize) { BattlePlayerInput.instance.tno.Send("SetTimedTrigger", Target.All, "Reload", "ReloadTime", baseWeapon.ReloadTime); ReloadCooldown.Start(baseWeapon.ReloadTime, () => { FillClip(); }); } }
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 }