Exemplo n.º 1
0
        void Awake()
        {
            #if UNITY_EDITOR
            input = gameObject.AddComponent <MouseInputManager>();
            #else
            input = gameObject.AddComponent <TouchInputManager>();
            #endif

            dh         = new DataHandler();
            gameStatus = FindObjectOfType <GameStatusDataHandler>();
        }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 void Start()
 {
     gameStatus = FindObjectOfType <GameStatusDataHandler>();
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }