C# Class Server.GameServerForm

显示文件 Open project: pmyoung/Advanced-Game-Project

Public Methods

Method Description
GameServerForm ( ) : System
OnSend ( IAsyncResult ar ) : void

Actually send out our messages

Update ( ) : void

This is the update loop used to constantly update the game objects checking for collisions, and removing objects

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
Form1_Load ( object sender, EventArgs e ) : void

Form1_Load is called when server is started by the user, sets up the UDP Socket.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

OnReceive ( IAsyncResult ar ) : void

This function is to unpack all the data received from a client.

PlayerAction ( Data msgReceived ) : Data

Setup a player action, by going through the received data and figuring out which action a player is performing (move, shoot, etc.)

txtLog_TextChanged ( object sender, EventArgs e ) : void

This method is currently not in use, will be implemented with chat.

Method Details

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GameServerForm() public method

public GameServerForm ( ) : System
return System

OnSend() public method

Actually send out our messages
public OnSend ( IAsyncResult ar ) : void
ar IAsyncResult Status of the asynchronous operation
return void

Update() public method

This is the update loop used to constantly update the game objects checking for collisions, and removing objects
public Update ( ) : void
return void