Ejemplo 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");
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        projectileScriptv2 = GameObject.Find("Projectile Group").GetComponent <ProjectileScriptv2>();
        obstaclesScript    = GameObject.Find("Obstacles Group").GetComponent <ObstaclesScript>();
        slingshotScriptv2  = GameObject.Find("Slingshot Group").GetComponent <SlingshotScriptv2>();
        scoreScript        = GameObject.Find("ScoreScript").GetComponent <ScoreScript>();

        character = "Cat";
        gameStart = false;
        replay    = false;

        timeLeft = 60;
    }