Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 public void GetConfiguration(out Configuration.CamelType camelType)
 {
     camelType = this.camelType;
 }