void Awake() { board = new GameBoard(); debugOutput = GetComponent <DebugOutput>(); inputManager = GetComponent <InputManager>(); showGuidesChanged = new UnityEvent_Bool(); playerColorChanged = new UnityEvent_Int(); if (!PlayerPrefs.HasKey("GameType")) { PlayerPrefs.SetInt("GameType", (int)GameType.RandomFirst); } if (!PlayerPrefs.HasKey("EngineOneStrength")) { PlayerPrefs.SetInt("EngineOneStrength", 1); } if (!PlayerPrefs.HasKey("EngineTwoStrength")) { PlayerPrefs.SetInt("EngineTwoStrength", 1); } if (!PlayerPrefs.HasKey("ShowDebugLog")) { PlayerPrefs.SetInt("ShowDebugLog", 0); } if (!PlayerPrefs.HasKey("ShowPlacementGuides")) { PlayerPrefs.SetInt("ShowPlacementGuides", 0); } ShowDebugText(PlayerPrefs.GetInt("ShowDebugLog") != 0); gameType = (GameType)PlayerPrefs.GetInt("GameType"); }
void Awake() { gm = GetComponent <GameMaster>(); lastMousePosition = Vector3.positiveInfinity; repeatInterval = Math.Max(repeatInterval, 0.05f); selectionChanged = new UnityEvent_Int(); selectionActivated = new UnityEvent_Int_Int(); showSelectionChanged = new UnityEvent_Bool(); columnColliders = new BoxCollider2D[columns.Length]; for (int i = 0; i < columns.Length; i++) { columnColliders[i] = columns[i].GetComponent <BoxCollider2D>(); } }