public override void OnControllerActivated() { // find spawn points and tell gm GameManager.Instance.SetSpawnPoints(GameObject.FindGameObjectsWithTag(Constants.Tags.SpawnPoint)); // spawn players GameManager.Instance.SpawnAllPlayers(); // initialize gamemode Gamemode = Gamemode.Create(GamemodeType, this); Gamemode.Initialize(); }
private void InitializeGame() { //Initialize game World = new FarseerPhysics.Dynamics.World(Vector2.Zero); TimerFactory = new Timer.Factory(); AnimationEngine = new Rendering.Animations.AnimationEngine(); ParticleEngine = new Rendering.Particles.ParticleEngine(this); EventEngine = new Core.Events.EventEngine(this); SharedRandom = new Random(); Diagnostics = new Diagnostics(); RPCHelper = new RPC.RemoteProcedureCallHelper(this); LightEngine = new Rendering.Lighting.LightEngine(); SoundEngine = new Sound.SoundEngine(this); DiagnosticsParent = "Game Update"; Gamemode.Create(); Logger.Info(Strings.Engine.GameCreated + $" ({Gamemode.DisplayName})"); }