/*public void CreateButton(string text, Vector3 position) * { * GameObject button = new GameObject(); * button.AddComponent<RectTransform>(); * button.AddComponent<Button>(); * button.transform.position = position; * }*/ public void PostTurn() { // this function is used to process the endin of a turn after a normal tile // jumps if needed and proceeds to next turn float delay = GameData.GetActivePiece().JumpIfNeeded(); //ends tile effect HideAllEffects(); if (delay == 0) { // since no jump happened bool collision = false; bool merge = false; if (GameData.GetMergeCollide()) { collision = CheckCollision(); merge = CheckMerge(); } //if no collision move on to next turn if (!collision && !merge) { // hide message screen GameGUI.HideMessageScreen(); //check for winner StartCoroutine(CheckWinner(delay)); } } }
public void DoSpecialCommand() { //hides the tile effect HideAllEffects(); // executes the special command GameGUI.HideMessageScreen(); if (GameData.GetMergeCollide()) { CheckCollision(); CheckMerge(); } Invoke(GameData.GetActivePiece().GetCurrTile().GetSpecialCommand(), 0); }
void ShowOtherLines() { // make line normal when mouse is not over it LightSaberFactor = 1; //hide the next tile preview GameGUI.HideMessageScreen(); //show other lines //hide other lines foreach (Line line in hiddenLines) { line.gameObject.SetActive(true); } }