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