public void OnTriggerEnter2D(Collider2D other) { if (other.transform.parent) { if (other.transform.parent.CompareTag("TimeObject")) { currentHover = other.transform.parent.GetComponent <IReceiveTimeEnergy>(); if (!IsCloseEnough()) { OnHoverTooFar(); return; } UpdateOnHoverStatus(); } } }
void OnIdle() { energyTextObj.SetActive(false); currentHover = null; TriggerAnimation("idle"); }