Exemple #1
0
    // Use this for initialization

    void Start()
    {
        generating             = false;
        objPooler              = GetComponent <ObjectPooler>();
        gameManager            = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
        speed                  = gameManager.Speed;
        hillGenerateTimeScaled = HillGenerateTime * (25 / speed);
        StartCoroutine(GenerateHills());
    }
Exemple #2
0
 private void OnEnable()
 {
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
     //Invoke("Destroy", 80/gameManager.Speed);
     StartCoroutine(_Destroy());
 }
Exemple #3
0
 private void Start()
 {
     anim        = GetComponent <Animator>();
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
     StartCoroutine(GoAnimation());
 }
Exemple #4
0
 // Update is called once per frame
 private void Start()
 {
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
 }
Exemple #5
0
 private void Awake()
 {
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
     uiManager   = GameObject.Find("Canvas").GetComponent <SkiUIManager>();
     rb          = GetComponentInChildren <Rigidbody>();
 }