Пример #1
0
        void Awake()
        {
            #if UNITY_EDITOR
            input = gameObject.AddComponent <MouseInputManager>();
            #else
            input = gameObject.AddComponent <TouchInputManager>();
            #endif

            dh         = new DataHandler();
            gameStatus = FindObjectOfType <GameStatusDataHandler>();
        }
Пример #2
0
 public void SetVictory(PinDataHandler pinData, RingDataHandler ringData, GameStatusDataHandler gameStatus)
 {
     pinData.AddToStack((int)ringData.GetColorValue());
     ringData.SetDataValue("pinCorrect", true);
     ringData.SetDataValue("pinned", true);
     if (gameStatus.GetIntValue("targetPinID") == 0)
     {
         gameStatus.SetDataValue("targetPinID", 2);
         gameStatus.SetDataValue("lastVictoryPin", 0);
     }
     else
     {
         gameStatus.SetDataValue("targetPinID", 0);
         gameStatus.SetDataValue("lastVictoryPin", 2);
     }
     gameStatus.SetStatus(GameStatus.VICTORY);
 }
Пример #3
0
 void Start()
 {
     gameStatus = FindObjectOfType <GameStatusDataHandler>();
 }
Пример #4
0
 public void SetWrongOccupation(PinDataHandler pinData, RingDataHandler ringData, GameStatusDataHandler gameStatus)
 {
     ringData.SetDataValue("pinCorrect", false);
     ringData.SetDataValue("pinned", true);
     ringData.SetDataValue(RingExpression.WORRIED);
     gameStatus.SetStatus(GameStatus.WRONGMOVE);
 }
Пример #5
0
        // GENERAL

        public void SetRightOccupation(PinDataHandler pinData, RingDataHandler ringData, GameStatusDataHandler gameStatus)
        {
            pinData.AddToStack((int)ringData.GetColorValue());
            ringData.SetDataValue("pinCorrect", true);
            ringData.SetDataValue("pinned", true);
            gameStatus.SetStatus(GameStatus.RIGHTMOVE);
        }