Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        scoreText            = GameObject.Find("ScoreText").GetComponent <Text>();
        scoreText2           = GameObject.Find("ScoreText2").GetComponent <Text>();
        timeText             = GameObject.Find("TimeText").GetComponent <Text>();
        replayScoreText      = GameObject.Find("ReplayButtonText").GetComponent <Text>();
        scoreScript          = GameObject.Find("ScoreScript").GetComponent <ScoreScript>();
        gameControllerScript = GameObject.Find("GameControllerScript").GetComponent <GameControllerScript>();
        projectileScriptv2   = GameObject.Find("Projectile Group").GetComponent <ProjectileScriptv2>();
        slingshotScriptv2    = GameObject.Find("Slingshot Group").GetComponent <SlingshotScriptv2>();
        obstaclesScript      = GameObject.Find("Obstacles Group").GetComponent <ObstaclesScript>();
        background           = GameObject.Find("Background");
        selectChar           = GameObject.Find("Selectcharacter");

        CatSelect    = GameObject.Find("CatSelect");
        PigSelect    = GameObject.Find("PigSelect");
        BearSelect   = GameObject.Find("Bear");
        PandaSelect  = GameObject.Find("Panda");
        GameStarter  = GameObject.Find("StartButton");
        ReplayButton = GameObject.Find("ReplayButton");
        Logo         = GameObject.Find("Logo");
        GameStarter.SetActive(false);
        ReplayButton.SetActive(false);
        scoreText2.enabled = false;

        Plank = GameObject.Find("Seg6");
    }
Esempio n. 2
0
    public void GameStart()
    {
        gameControllerScript.gameStart = true;
        CatSelect.SetActive(false);
        PigSelect.SetActive(false);
        BearSelect.SetActive(false);
        PandaSelect.SetActive(false);
        background.SetActive(false);
        selectChar.SetActive(false);
        Logo.SetActive(false);
        scoreScript.score = 0;

        Plank.GetComponent <Rigidbody2D>().freezeRotation = false;

        projectileScriptv2.launched = true;

        GameStarter.SetActive(false);
    }
Esempio n. 3
0
 public void SelectPanda()
 {
     gameControllerScript.character = "Panda";
     GameStarter.SetActive(true);
 }
Esempio n. 4
0
 public void SelectBear()
 {
     gameControllerScript.character = "Bear";
     GameStarter.SetActive(true);
 }
Esempio n. 5
0
 public void SelectCat()
 {
     gameControllerScript.character = "Cat";
     GameStarter.SetActive(true);
 }