Exemplo n.º 1
0
        //EndingArea
        public TileTrack(int id, Transform root = null)
        {
            m_TrackID = id;

            m_RunningTiles = new List <TouchTileBase>();

            m_TrackRoot = root;

            m_TrackView = InstanceTrackView();
            m_TrackView.SetTrack(this);
        }
Exemplo n.º 2
0
        private ITileTrackView InstanceTrackView()
        {
            string     prefabName = "TrackRes/TrackView_0";
            GameObject prefab     = Resources.Load <GameObject>(prefabName);

            GameObject     go       = GameObject.Instantiate(prefab);
            ITileTrackView instance = go.GetComponent <ITileTrackView>();

            if (instance == null)
            {
                Debug.LogError("null track view" + prefabName);
            }

            return(instance);
        }