Пример #1
0
    public void goodSelection()
    {
        interfControl.activateBienMessage();
        hits += 1;
        diffRegulator.addHit();
        interfControl.gotApple();

        audioScript.MakeSuccessSound(); //Sonido positivo al acertar manzana.
    }
Пример #2
0
    public void activateStation()
    {
        if (GameData.currentGame.coins >= stationPrize && !station.activeSelf && gridTrees.Count > 0)
        {
            station.SetActive(true);
            fireworks.GetComponent <ParticleSystem>().Play();

            GameData.currentGame.stationActive = true; //Almaceno estado de estación.
            GameData.currentGame.coins        -= stationPrize;
            sceneInterface.StartCoinAnimation();

            BuildingBarRefresh(); //Actualizamos estado BuildingBar

            setSceneState("InGame");

            SaveGame();                     //Guardado estado del juego automatico.

            audioScript.MakeSuccessSound(); //Genera sonido de exito al construir la estación.
        }
        else
        {
            audioScript.MakeErrorSound();
        }                                      //Genera sonido de error al clicar sin recursos suficientes
    }