示例#1
0
 void Start()
 {
     animator = GetComponent <Animator> ();
     Debug.Assert(animator);
     Debug.Assert(Test.Util.HasAnimatorParameter(animator, TheAnimatorId.Instance(true).OnSceneChange));
     Debug.Assert(animator.HasState(0, TheAnimatorId.Instance().TheLastState));
 }
示例#2
0
 public void ShowAll()
 {
     for (int i = 0; i < Length; i++)
     {
         SetTriggerTo(TheAnimatorId.Instance().Show, i);
     }
 }
示例#3
0
        void Update()
        {
            switch (currentState)
            {
            case State.Hiding:
                break;

            case State.Screwing:
                if (whoWonAnimator.GetCurrentAnimatorStateInfo(0).shortNameHash == TheAnimatorId.Instance().Complete)
                {
                    currentState = State.LightingBegin;
                }
                break;

            case State.LightingBegin:
                currentState = State.Lighting;
                time         = Time.time;
                searchLight.Show();
                break;

            case State.Lighting:
                if (Time.time - time > LightingDuration)
                {
                    currentState = State.Completed;
                }
                break;

            case State.Completed:
                break;
            }
        }
示例#4
0
        void Start()
        {
            Test.Util.HasAnimatorParameter(whoWonAnimator, TheAnimatorId.Instance(true).Show);
            Debug.Assert(whoWonAnimator.HasState(0, TheAnimatorId.Instance().Complete));

            currentState = State.Hiding;
        }
示例#5
0
 public WordAnimation(Transform transform, TextMesh mesh, GameObject[] objects)
     : base(transform, mesh, objects)
 {
     theHideTrigger = TheAnimatorId.Instance().Hide;
     theShowTrigger = TheAnimatorId.Instance().Show;
     Debug.Assert(TestAnimatorHasTrigger(theHideTrigger));
     Debug.Assert(TestAnimatorHasTrigger(theShowTrigger));
 }
示例#6
0
        void Start()
        {
            animator = GetComponent <Animator> ();
            Debug.Assert(animator);
            Debug.Assert(Test.Util.HasAnimatorParameter(animator, TheAnimatorId.Instance(true).DidFix));
            Debug.Assert(Test.Util.HasAnimatorParameter(animator, TheAnimatorId.Instance().StartScrolling));
            Debug.Assert(animator.HasState(0, TheAnimatorId.Instance().Complete));

            text = GetComponent <Text> ();
            Debug.Assert(text);

            tryFix = false;
        }
示例#7
0
        public void IncrementDigit()
        {
            ++currentDigit;
            currentDigit = currentDigit % 10;
            text.text    = currentDigit.ToString();

            if (tryFix && currentDigit == theFinalDigit)
            {
                ++passCount;
            }

            if (passCount == MinCountToPass)
            {
                animator.SetBool(TheAnimatorId.Instance().DidFix, true);
            }
        }
示例#8
0
 public void StartScrolling()
 {
     Debug.Assert(animator);
     Debug.Assert(TheAnimatorId.Instance() != null);
     animator.SetTrigger(TheAnimatorId.Instance().StartScrolling);
 }
示例#9
0
 public bool DidComplete()
 {
     return(animator.GetCurrentAnimatorStateInfo(0).shortNameHash == TheAnimatorId.Instance().Complete);
 }
示例#10
0
 public void InflateOnce()
 {
     animator.SetTrigger(TheAnimatorId.Instance().OnSceneChange);
 }
示例#11
0
 public void Show()
 {
     whoWonAnimator.SetTrigger(TheAnimatorId.Instance().Show);
     currentState = State.Screwing;
 }