コード例 #1
0
ファイル: TitleController.cs プロジェクト: cdilday/QuickSplit
 void FixedUpdate()
 {
     if (gameModeLayer.activeSelf)
     {
         activeMode = gameModeScroller.CurrentScreen();
         if (activeMode != prevMode)
         {
             if (activeMode == 0)
             {
                 ScrollDown.BroadcastMessage("FadeOut", null, SendMessageOptions.DontRequireReceiver);
             }
             else if (prevMode == 0)
             {
                 ScrollDown.BroadcastMessage("FadeIn", null, SendMessageOptions.DontRequireReceiver);
             }
             else if (activeMode == 4)
             {
                 ScrollUp.BroadcastMessage("FadeOut", null, SendMessageOptions.DontRequireReceiver);
             }
             else if (prevMode == 4)
             {
                 ScrollUp.BroadcastMessage("FadeIn", null, SendMessageOptions.DontRequireReceiver);
             }
         }
         prevMode = activeMode;
     }
 }
コード例 #2
0
 // Update is called once per frame
 void FixedUpdate()
 {
     //check to make sure the scores for the proper scope and mode are on display, and if they aren't, change them
     if (Scopes.gameObject.activeInHierarchy)
     {
         currScope = Scopes.CurrentScreen();
         currMode  = Modes.CurrentScreen();
         if (currScope != prevScope || currMode != prevMode)
         {
             Populate_Scores_List();
         }
         prevScope = currScope;
         prevMode  = currMode;
     }
 }