public static void SetHexagonColor(int hexagonID, ColorID colorID) { ActorHexagon target = GetHexagonActor(hexagonID); if (target != null) { target.SetColor(0, colorID); } }
public static void ResetGrid() { Debug.Log("Resetting grid..."); GameObject[] hexagons = GameObject.FindGameObjectsWithTag(HexagonTag); foreach (GameObject h in hexagons) { ActorHexagon ah = h.GetComponentInChildren <ActorHexagon>(); if (ah != null) { ah.SetColor(0, ColorID.white); ah.SetGoalColor(ColorID.white); ah.SetHoverColor(ColorID.white); } } }
public static void EnterEditMode() { State.gameActivity = GameActivity.edit; GameObject[] hexagons = GameObject.FindGameObjectsWithTag(HexagonTag); foreach (GameObject h in hexagons) { ActorHexagon ah = h.GetComponentInChildren <ActorHexagon>(); if (ah != null) { ColorID currentGoalColor = ah.goalColor; ah.SetGoalColor(ColorID.white); ah.SetColor(0, currentGoalColor); } } }