void Awake() { TheBoolBool = Animator.StringToHash("Bool"); ThePressedTrigger = Animator.StringToHash("Pressed"); TheNormalTrigger = Animator.StringToHash("Normal"); toggle = GetComponent <Toggle> (); Debug.Assert(toggle); animator = GetComponent <Animator> (); Debug.Assert(animator); Debug.Assert(Test.Util.HasAnimatorParameter(animator, TheBoolBool)); Debug.Assert(Test.Util.HasAnimatorParameter(animator, ThePressedTrigger)); Debug.Assert(Test.Util.HasAnimatorParameter(animator, TheNormalTrigger)); toggle.onValueChanged.AddListener(SetBool); toggle.onValueChanged.AddListener(FlashDeflation); toggle.onValueChanged.AddListener(Invoke); animator.SetBool(TheBoolBool, toggle.isOn); animator.SetTrigger(TheNormalTrigger); ConfigurationCamelType ct = GetComponent <ConfigurationCamelType> (); if (ct) { camelType = ct.camelType; } ConfigurationLetterCase lc = GetComponent <ConfigurationLetterCase> (); if (lc) { letterCase = lc.letterCase; } }
public void GetConfiguration(out Configuration.LetterCase letterCase) { letterCase = this.letterCase; }