Exemple #1
0
    // Use this for initialization
    void Start()
    {
        // get player reference
        player = GameObject.FindGameObjectWithTag("player").GetComponent <PlayerScript>();
        // get generator component
        generator = GetComponent <ObstacleGenerator>();        // assumes the component is on this gameobject
        // get wheel reference
        wheel = GameObject.FindGameObjectWithTag("Roller").GetComponent <BigRoller>();
        // get level select ref
        levelSelect = GetComponent <LevelSelect>();
        // get UI ref
        UI = GetComponent <GameplayUI>();
        // get actual player angle
        player.posOnWheel = Vector3.Angle(Vector3.up, player.transform.position - wheel.transform.position);

        currentLifeStage = 0;

        stressDistance = maxDistance;

        AudioController = GameObject.Find("Global").GetComponent <AudioControl>();

        // Audio test stuff
        //bassTrack.clip = Bass;
        //melodyTrack.clip = Melody;
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        // set initial states
        manager = GameObject.Find("GameManager").GetComponent<GameManagerInit>();
        wheel = manager.Wheel;
        currentLane = Location.lane.middle;

        // Set initial lane
        SetRandomLane();
    }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        // set initial states
        manager     = GameObject.Find("GameManager").GetComponent <GameManagerInit>();
        wheel       = manager.Wheel;
        currentLane = Location.lane.middle;

        // Set initial lane
        SetRandomLane();
    }
 // Use this for initialization
 void Start()
 {
     //gm = GetComponent<GameManagerInit>();
     timer = ObstacleSpawnInterval;
     obstacles = new List<Obstacle>();
     // for now we'll fill this list with the one obstacle in the game
     if (GameObject.FindObjectOfType<Obstacle>() != null) obstacles.Add(GameObject.FindObjectOfType<Obstacle>());
     obstacleSpawnLocation = new Vector3 (0, -981.5f, 1.05f);
     flipQuat = Quaternion.Euler (180, 0, 0);
     roller = GetComponent<GameManagerInit> ().Wheel;
     playerOffset = GetComponent<GameManagerInit> ().Player.posOnWheel;
     initialObstacleSpawnInterval = ObstacleSpawnInterval;
     //IncreaseDifficultyOverTime();
 }
Exemple #5
0
 // Use this for initialization
 void Start()
 {
     //gm = GetComponent<GameManagerInit>();
     timer     = ObstacleSpawnInterval;
     obstacles = new List <Obstacle>();
     // for now we'll fill this list with the one obstacle in the game
     if (GameObject.FindObjectOfType <Obstacle>() != null)
     {
         obstacles.Add(GameObject.FindObjectOfType <Obstacle>());
     }
     obstacleSpawnLocation = new Vector3(0, -981.5f, 1.05f);
     flipQuat     = Quaternion.Euler(180, 0, 0);
     roller       = GetComponent <GameManagerInit> ().Wheel;
     playerOffset = GetComponent <GameManagerInit> ().Player.posOnWheel;
     initialObstacleSpawnInterval = ObstacleSpawnInterval;
     //IncreaseDifficultyOverTime();
 }
    // Use this for initialization
    void Start()
    {
        // get player reference
        player = GameObject.FindGameObjectWithTag("player").GetComponent<PlayerScript>();
        // get generator component
        generator = GetComponent<ObstacleGenerator>(); // assumes the component is on this gameobject
        // get wheel reference
        wheel = GameObject.FindGameObjectWithTag("Roller").GetComponent<BigRoller>();
        // get level select ref
        levelSelect = GetComponent<LevelSelect>();
        // get UI ref
        UI = GetComponent<GameplayUI>();
        // get actual player angle
        player.posOnWheel = Vector3.Angle(Vector3.up, player.transform.position - wheel.transform.position);

        currentLifeStage = 0;

        stressDistance = maxDistance;

        AudioController = GameObject.Find("Global").GetComponent<AudioControl>();

        // Audio test stuff
        //bassTrack.clip = Bass;
        //melodyTrack.clip = Melody;
    }
 // Use this for initialization
 void Start()
 {
     manager = GetComponent<GameManagerInit> ();
     roller = manager.Wheel;
     generator = GetComponent<ObstacleGenerator> ();
 }
Exemple #8
0
 // Use this for initialization
 void Start()
 {
     manager   = GetComponent <GameManagerInit> ();
     roller    = manager.Wheel;
     generator = GetComponent <ObstacleGenerator> ();
 }