public void UpdateRevaDisplay() { revaDisplay.updateMode = AnimatorUpdateMode.UnscaledTime; //NPE Prevention if (ctrl.runCtrl.spCtrl == null) { PlayerPrefs.SetInt("RevaDemoEnabled", 0); revaText.text = heroName; revaDisplay.runtimeAnimatorController = this.itemMan.GetAnim(heroAnim); setup = false; return; } if (!setup) { setupCustomsAndSkins(); setup = true; } BeingObject hero = ctrl.runCtrl.spCtrl.heroDictionary[PlayerSelect.getCharacters()[option]]; revaDisplay.runtimeAnimatorController = this.itemMan.GetAnim(hero.animName); revaDisplay.SetTrigger("spawn"); revaText.text = hero.nameString; heroID = hero.beingID; heroAnim = hero.animName; heroName = hero.nameString; }
public void ClickEnableReva() { option++; if (option > PlayerSelect.getCharacters().Length - 1) { option = 0; } this.UpdateRevaDisplay(); }