Prototype.World.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
public void Start()
	{
Lidgren.Network.NetPeerConfiguration config = new Lidgren.Network.NetPeerConfiguration("AsteroidShooter");
NetworkAPI.Client = new Lidgren.Network.NetClient(config);
NetworkAPI.Client.Start();
NetworkAPI.Client.Connect("127.0.0.1", 5432);
this.Connected = false;
		Ships = (

(new Cons<Ship>(new Ship(new Microsoft.Xna.Framework.Vector2(0f,0f)),(new Empty<Ship>()).ToList<Ship>())).ToList<Ship>()).ToList<Ship>();
		Input = Microsoft.Xna.Framework.Input.Keyboard.GetState();
		Connected = false;
		
foreach(var entity in Ships) {
                                    NetworkAPI.ShipInfos.Add(entity.Net_ID, new NetworkInfo<Ship>(entity, true));;
                                 }}
		public System.Boolean Connected;

Usage Example

Example #1
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
   // TODO: Add your initialization logic here
   world = new World();
   world.Start();
   base.Initialize();
 }