void Update() { // Using the state settings defined above if (Input.GetKeyDown(KeyCode.K)) { puppetMaster.Kill(stateSettings); } if (Input.GetKeyDown(KeyCode.F)) { puppetMaster.Freeze(stateSettings); } if (Input.GetKeyDown(KeyCode.R)) { puppetMaster.Resurrect(); } // Using whatever the current state settings of the puppetMaster instance /* * if (Input.GetKeyDown(KeyCode.K)) puppetMaster.state = PuppetMaster.State.Dead; * if (Input.GetKeyDown(KeyCode.F)) puppetMaster.state = PuppetMaster.State.Frozen; * if (Input.GetKeyDown(KeyCode.R)) puppetMaster.state = PuppetMaster.State.Alive; */ // Using default state settings /* * if (Input.GetKeyDown(KeyCode.K)) puppetMaster.Kill(PuppetMaster.StateSettings.Default); * if (Input.GetKeyDown(KeyCode.F)) puppetMaster.Freeze(PuppetMaster.StateSettings.Default); * if (Input.GetKeyDown(KeyCode.R)) puppetMaster.Resurrect(); */ }
public virtual void Resurrect(float newHealth) { if (newHealth <= 0) { return; } state = State.ALIVE; health = Mathf.Max(newHealth, healthMax); if (puppetMaster) { puppetMaster.Resurrect(); } enableBehaviours(); }
void ResurrectPuppet() { puppetMaster.Resurrect(); }
public void ResurrectPuppet() { m_puppetMaster.Resurrect(); }