public override bool DoInteract(Character character) { Debug.Log(character.name + " interacting with " + this.name); if (CanInteract(character)) { if (current == 0) { StartCoroutine(DoDrip(max)); character.health.Suck(this.gameObject, damage); // hack to poke the death system if (character.health.Value <= 0) { character.DoDamage(this.gameObject, 0); } if (activatedObject != null) { activatedObject.SetActive(true); } } else { StartCoroutine(DoClear()); character.health.Heal(this.gameObject, damage); if (activatedObject != null) { activatedObject.SetActive(false); } } return(true); } else { return(false); } }
void Set(bool _value) { this.value = _value; if (!value) { DoDisable(); } else { t = timer; DoEnable(); } if (activatedObject != null) { activatedObject.SetActive(value); } }