private void CreateAndSendAdditionalAsteroid() { Asteroid a = ServerSceneObjectFactory.CreateNewAsteroidOnEdge(mgr, objects.Count % 2 == 0); objects.Add(a); NetOutgoingMessage msg = mgr.CreateNetMessage(); a.WriteObject(msg); mgr.BroadcastMessage(msg); }
public override void OnObjectDestroyed(ISceneObject obj) { if (!(obj is Asteroid)) { return; } obj = ServerSceneObjectFactory.CreateNewAsteroidOnEdge(mgr, (obj as Asteroid).IsHeadingRight); GameLevelManager.SendNewObject(mgr, obj); objects.Add(obj); }