示例#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());
    }
示例#2
0
 private void OnEnable()
 {
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
     //Invoke("Destroy", 80/gameManager.Speed);
     StartCoroutine(_Destroy());
 }
示例#3
0
 private void Start()
 {
     anim        = GetComponent <Animator>();
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
     StartCoroutine(GoAnimation());
 }
示例#4
0
 // Update is called once per frame
 private void Start()
 {
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
 }
示例#5
0
 private void Awake()
 {
     gameManager = GameObject.Find("GameManager").GetComponent <SkiGameManager>();
     uiManager   = GameObject.Find("Canvas").GetComponent <SkiUIManager>();
     rb          = GetComponentInChildren <Rigidbody>();
 }