コード例 #1
0
 void Start()
 {
     NotificationCenter.DefaultCenter().AddObserver(this, "UserGenerateMapPiece");
     if (isServer)
     {
         mapGenerator = new MapGenerationScript();
         mapGenerator.SetMapInterface(this);
         mapGenerator.SetNotificationInterface(this);
         mapGenerator.Ground  = Ground;
         mapGenerator.GroundT = GroundT;
         mapGenerator.BridgeF = BridgeF;
         mapGenerator.BridgeT = BridgeT;
         mapGenerator.BridgeU = BridgeU;
         mapGenerator.Start(startPiece);
     }
 }
コード例 #2
0
 void Start()
 {
     NotificationCenter.DefaultCenter().AddObserver(this, "UserGenerateMapPiece");
     if (isServer)
     {
         mapGenerator = new MapGenerationScript();
         mapGenerator.SetMapInterface(this);
         mapGenerator.SetNotificationInterface(this);
         mapGenerator.Ground = Ground;
         mapGenerator.GroundT = GroundT;
         mapGenerator.BridgeF = BridgeF;
         mapGenerator.BridgeT = BridgeT;
         mapGenerator.BridgeU = BridgeU;
         mapGenerator.Start(startPiece);
     }
 }
コード例 #3
0
    // Use this for initialization
    void Start () {
        mapGenerator = new MapGenerationScript();
        mapGenerator.SetMapInterface(this);
        mapGenerator.SetNotificationInterface(this);
        mapGenerator.Ground = Ground;
        mapGenerator.GroundT = GroundT;
        mapGenerator.BridgeF = BridgeF;
        mapGenerator.BridgeT = BridgeT;
        mapGenerator.BridgeU = BridgeU;
        mapGenerator.Start(startPiece);

        NotificationCenter.DefaultCenter().AddObserver(this, "UserGenerateMapPiece");
        NotificationCenter.DefaultCenter().AddObserver(this, "IncreaseLevel");

        if(!_debugging)
            StartCoroutine(GenerateMapPiece());
        Instantiate(car, new Vector3(0,0.25f,0), Quaternion.identity);
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        mapGenerator = new MapGenerationScript();
        mapGenerator.SetMapInterface(this);
        mapGenerator.SetNotificationInterface(this);
        mapGenerator.Ground  = Ground;
        mapGenerator.GroundT = GroundT;
        mapGenerator.BridgeF = BridgeF;
        mapGenerator.BridgeT = BridgeT;
        mapGenerator.BridgeU = BridgeU;
        mapGenerator.Start(startPiece);

        NotificationCenter.DefaultCenter().AddObserver(this, "UserGenerateMapPiece");
        NotificationCenter.DefaultCenter().AddObserver(this, "IncreaseLevel");

        if (!_debugging)
        {
            StartCoroutine(GenerateMapPiece());
        }
        Instantiate(car, new Vector3(0, 0.25f, 0), Quaternion.identity);
    }