public virtual bool SetupResetOnDeath() { bool continute_setup = false; AlertProgress("Checking ResetOnDeath Dependencies"); ResetOnDeath resetOnDeath = character.GetComponent <ResetOnDeath>(); if (resetOnDeath) { AlertProgress("ResetOnDeath Found"); SetupResetOnDeathDefaults(resetOnDeath); continute_setup = true; } else { AlertProgress("ResetOnDeath not found"); AlertProgress("Creating ResetOnDeath"); resetOnDeath = character.AddComponent <ResetOnDeath>(); SetupResetOnDeathDefaults(resetOnDeath); continute_setup = true; } AlertProgress("ResetOnDeath Setup complete"); return(continute_setup); }
public virtual void SetupResetOnDeathDefaults(ResetOnDeath resetOnDeath) { if (resetOnDeath == false) { return; } AlertProgress("Setting Default ResetOnDeath values"); resetOnDeath.Delay = character_defaults.resetOnDeathDelay; AlertProgress("Setting Default ResetOnDeath values complete"); }