void Awake() { if (gemsPrefabs == null || gemsPrefabs.Count < 5) { Debug.Log("Warning not enough prefabs set"); } if (SceneManager.GetActiveScene().name == "FacebookGameScene" || SceneManager.GetActiveScene().name == "FreeplayGameScene") { gemClick = GemClicked; gemDeath = CreateNewGem; gameVars = gameObject.GetComponent <GameVariables>(); } doUpdateStuff = null; }
void Start() { gemClick = WaitClick; gemDeath = GemDied; doUpdateStuff += WaitForStart; levelText = levelTextContainer.GetComponent <TextMesh>(); goalsText = goalsTextContainer.GetComponent <TextMesh>(); scoreText = movesTextContainer.GetComponent <TextMesh>(); InitStars(); InitMoves(); Stars = startingStars; Moves = 0; UpdateLevelText(""); StartCoroutine("CheckHighestCube"); PauseGame(); //ShowLevelGoal(); }