public void OnTriggerExit(Collider collision) { if (collision.gameObject.tag == "AtkSpd") { AbstractWeapon.GetWeaponCooldownHolder(this.gameObject).SetCooldownMultiplier(1.0f); } }
// Workaround for unity bug where OnTriggerExit is not called if the object tracking entry // or exit is destroyed. IEnumerator DestroyObject(GameObject gameObject) { yield return(new WaitForSeconds(despawnTimer)); Destroy(gameObject); AbstractWeapon.GetWeaponCooldownHolder(this.gameObject).SetCooldownMultiplier(1.0f); }
public void OnTriggerEnter(Collider collision) { if (collision.gameObject.tag == "AtkSpd") { // Change GetFirstWeapon to apply attack speed to all weapons? AbstractWeapon.GetWeaponCooldownHolder(this.gameObject).SetCooldownMultiplier(1.0f / attackSpeedMultiplier); } }