Пример #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 Awake()
 {
     Debug.Assert(camelScore);
     Debug.Assert(snakeScore);
     Debug.Assert(whoWon);
     TheAnimatorId.Create();
 }
Пример #4
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;
            }
        }
Пример #5
0
        void Start()
        {
            Test.Util.HasAnimatorParameter(whoWonAnimator, TheAnimatorId.Instance(true).Show);
            Debug.Assert(whoWonAnimator.HasState(0, TheAnimatorId.Instance().Complete));

            currentState = State.Hiding;
        }
Пример #6
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));
 }
Пример #7
0
        void Awake()
        {
            TheAnimatorId.Create();
            Random.seed = (int)(Time.realtimeSinceStartup * 1000f);

            Debug.Assert(configHolder);
            Debug.Assert(touchInterface);
            Debug.Assert(phrase);
            Debug.Assert(recognitionTime);
            Debug.Assert(progress);
            Debug.Assert(complete);
        }
Пример #8
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;
        }
Пример #9
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);
            }
        }
Пример #10
0
        void Awake()
        {
            TheAnimatorId.Create();
//		TheScene.Create ();
        }
Пример #11
0
 public void StartScrolling()
 {
     Debug.Assert(animator);
     Debug.Assert(TheAnimatorId.Instance() != null);
     animator.SetTrigger(TheAnimatorId.Instance().StartScrolling);
 }
Пример #12
0
 public bool DidComplete()
 {
     return(animator.GetCurrentAnimatorStateInfo(0).shortNameHash == TheAnimatorId.Instance().Complete);
 }
Пример #13
0
 void OnDestroy()
 {
     TheAnimatorId.Destroy();
 }
Пример #14
0
 public void InflateOnce()
 {
     animator.SetTrigger(TheAnimatorId.Instance().OnSceneChange);
 }
Пример #15
0
 public void Show()
 {
     whoWonAnimator.SetTrigger(TheAnimatorId.Instance().Show);
     currentState = State.Screwing;
 }