Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        milestoneObserver = trackManager as MilestoneObserver;

        shortTrack       = Instantiate(Resources.Load("TrackBuildingBlocks/Short_Track")) as GameObject;
        mediumTrack      = Instantiate(Resources.Load("TrackBuildingBlocks/Medium_Track")) as GameObject;
        longTrack        = Instantiate(Resources.Load("TrackBuildingBlocks/Long_Track")) as GameObject;
        coin             = Instantiate(Resources.Load("TrackBuildingBlocks/Coin")) as GameObject;
        crackedFloor     = Instantiate(Resources.Load("TrackBuildingBlocks/Cracked_Floor")) as GameObject;
        milestoneSubject = Instantiate(Resources.Load("TrackBuildingBlocks/MilestoneSubject")) as GameObject;
        fallSubject      = Instantiate(Resources.Load("TrackBuildingBlocks/FallSubject")) as GameObject;
        segmentHolder    = Instantiate(Resources.Load("TrackBuildingBlocks/SegmentHolder")) as GameObject;
        laneHolder       = Instantiate(Resources.Load("TrackBuildingBlocks/LaneHolder")) as GameObject;

        //player = Instantiate(Resources.Load("TrackBuildingBlocks/PlayerHolder")) as GameObject;
        //cameraHolder = Instantiate(Resources.Load("TrackBuildingBlocks/CameraHolder")) as GameObject;

        shortTrack.SetActive(false);
        mediumTrack.SetActive(false);
        longTrack.SetActive(false);
        coin.SetActive(false);
        crackedFloor.SetActive(false);
        milestoneSubject.SetActive(false);
        fallSubject.SetActive(false);
        segmentHolder.SetActive(false);
        laneHolder.SetActive(false);
        //player.SetActive(false);
        //cameraHolder.SetActive(false);
    }
Beispiel #2
0
 public void addObserver(ref MilestoneObserver milestoneObserver)
 {
     this.milestoneObserver[0] = milestoneObserver;
 }