void MonitorLevelsVelocity() //Monitor gems velocity - allow clicking again when landed //Designed For the levels game { if (gemList.Count > 0) { if (gemList[gemList.Count - 1].gameObject.GetComponent <Rigidbody>().velocity.y == 0.0f) { gemClick = GemClicked; doUpdateStuff -= MonitorLevelsVelocity; ResetLastCombo(); } } else { UpdateLevelText("\r\n Level done "); if (Stars > objectiveStars) { myBlock.LevelUpdateStars(myRank, Stars); } doUpdateStuff = null; doUpdateStuff += CenterStars; ResetLastCombo(); myBlock.ShowNextLevelBtn(); } }
void GemClicked(GemController oldGem) { //Debug.Log("GemClick"); oldGem.raycasted = true; //mark as part of the gems to destroy gemClick = WaitClick; //send clicks to waitin function while monitoring velocity gameVars.GemClicked(oldGem.dynamicGemType, gemsColors[oldGem.dynamicGemType]); //send gem type to score data gameVars.SetComboScore(); //start comboingScore oldGem.GetMeAndMySisters(); //destroy gems of the same color gameVars.Moves++; //add a move to the move counter }
public void LoadMenu() { if (!gameOver) { gemClick = WaitClick; confirmExitHolder.SetActive(true); } else { LoadMenuConfirmed(); } }
public void GemClicked(GemController oldGem) { //Debug.Log("Clicked : " + oldGem.name); //Debug.Log("last combo : " + lastCombo); oldGem.raycasted = true; //mark as part of the gems to destroy gemClick = WaitClick; //send clicks to waiting function while monitoring velocity //lastCombo = 1; comboStart = true; oldGem.GetMeAndMySisters();//destroy gems of the same color doUpdateStuff += MonitorLevelsVelocity; Moves++; }
void MonitorGameVelocity() //Monitor last created gem's velocity - allow clicking again when landed, reset spawn array (upwards from board), go back to no bonus scoring //Designed For the scoring game { if (fullList[fullList.Count - 1].gameObject.GetComponent <Rigidbody>().velocity.y > 0.0f) { gameVars.ResetSpawnArray(); gameVars.SetRegularScore(); if (!gameOver) { gemClick = GemClicked; doUpdateStuff = null; } } }
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(); }
public void HideConfirmExit() { gemClick = GemClicked; confirmExitHolder.SetActive(false); }
void Awake() { gameVars = gameObject.GetComponent <GameVariables>(); gemClick = CreateNewGem; }