void Awake() { #if UNITY_EDITOR input = gameObject.AddComponent <MouseInputManager>(); #else input = gameObject.AddComponent <TouchInputManager>(); #endif dh = new DataHandler(); gameStatus = FindObjectOfType <GameStatusDataHandler>(); }
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); }
void Start() { gameStatus = FindObjectOfType <GameStatusDataHandler>(); }
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); }
// 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); }