private void Awake()
    {
        floorBackground2 = GameObject.Find("backgroundTextureOne");
        floorBackground1 = GameObject.Find("backgroundTextureTwo");

        Color tmp = floorBackground1.GetComponent <MeshRenderer> ().material.color;

        tmp.a = 0;
        floorBackground1.GetComponent <MeshRenderer> ().material.color = tmp;

        Color tmp2 = floorBackground2.GetComponent <MeshRenderer>().material.color;

        tmp2.a = 1;
        floorBackground2.GetComponent <MeshRenderer>().material.color = tmp2;

        CreateFirstFloor();
        player           = GameObject.Find("Player").GetComponent <PlayerControlls>();
        cameraController = GameObject.Find("Main Camera").GetComponent <CameraController>();
        levelCounter     = GameObject.Find("GameStatsCounter").GetComponent <GameStatsCounter>();

        audioSrc = GetComponent <AudioSource>();
    }
예제 #2
0
 private void Awake()
 {
     creator          = GetComponentInParent <LevelCreator>();
     gameStatsCounter = GameObject.FindGameObjectWithTag("GameStatsCounter").GetComponent <GameStatsCounter>();
 }