void Start() { //permulaan game scoreText = GameObject.Find("Score Text").GetComponent <TextMesh>(); jellyText = GameObject.Find("Jelly Text").GetComponent <TextMesh>(); initialObjectFallingDuration = objectFallingDuration; numberOfColumns = LevelStructure.instance.numberOfColumns; numberOfRows = LevelStructure.instance.numberOfRows; numberOfItemsPoppedInaRow = 0; StringPusher.addStringDependInt(scoreText, score, 6, "0"); scoreText.text += score.ToString(); jellyText.text = "Jelly : " + totalNoOfJellies.ToString(); cEC = GetComponent <CrushEffectCreator>(); }
internal void AddScore() { //saat proses matching berhasil int temp = 10 * numberOfItemsPoppedInaRow * (numberOfItemsPoppedInaRow / 5 + 1); // print(temp); score += temp; StringPusher.addStringDependInt(scoreText, score, 6, "0"); scoreText.text += score.ToString(); cEC.createCrushEffect(); if (!WinLoseSystem.gameStateIsWin() && !WinLoseSystem.gameStateIsLose()) { hugeStone.GetComponent <Animator>().SetBool("IsHit", true); } }
void Update() { textMovesLeft.text = ""; StringPusher.addStringDependInt(textMovesLeft, PlayerPrefs.GetInt("movesLeftAK"), 2, "0"); textMovesLeft.text += (PlayerPrefs.GetInt("movesLeftAK") + " Left"); }