public void Init() { uiSystem = FindObjectOfType <GameUIRoot>(); trackSystem = FindObjectOfType <Track>(); roleSystem = FindObjectOfType <ChanController>(); speedController = FindObjectOfType <SpeedController>(); levelID = GameManager.Instance.GetLeveleID(); GameManager.Instance.levelManager = this; trackSystem.datas = GameManager.Instance.sectionDatas; speedController.startSpeed = GameManager.Instance.startSpeed; trackSystem.coinRate = GameManager.Instance.coinRate; trackSystem.maxLength = GameManager.Instance.levelLength; RegEvents(); }
private void Start() { //SpeedController.Instance.SpeedChangeAction += OnSpeedChange; follow = GameObject.FindGameObjectWithTag("Player").GetComponent <ChanController>(); }