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); } }
// 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); }
// 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); }