private void Awake() { _meshCooldown = gameObject.AddComponent <MeshCooldown>(); instance = this; posRef = transform.localPosition; scaleRef = transform.localScale; }
public bool tryTrigger(float cd) { if (inCoolDown()) { return(false); } getOutline(); cooldown = cd; if (sharedInstance == null) { sharedInstance = this; damageMultiplier = 1; } return(true); }
private void FixedUpdate() { if (!inCoolDown()) { return; } cooldown -= Time.fixedDeltaTime; if (!inCoolDown()) { Destroy(getOutline()); if (sharedInstance == this) { staminaDrained = false; sharedInstance = null; } } }