C# Class Gruppe22.Backend.NetLogic

All Game Logic events are handled server side -> send / receive events via network instead of handling them locally
Inheritance: Logic, IHandleEvent
Mostrar archivo Open project: propra13-orga/gruppe22

Protected Properties

Property Type Description
_network Gruppe22.Client.NetPlayer

Public Methods

Method Description
HandleEvent ( bool DownStream, Events eventID ) : void

React to incoming events

NetLogic ( IHandleEvent parent, NetPlayer network ) : System

Constructor

RequestMap ( ) : void

Update local version of map

SendChat ( string text ) : void

Exchange text messages

Update ( GameTime gameTime ) : void

Exchange events with server

Method Details

HandleEvent() public method

React to incoming events
public HandleEvent ( bool DownStream, Events eventID ) : void
DownStream bool
eventID Events
return void

NetLogic() public method

Constructor
public NetLogic ( IHandleEvent parent, NetPlayer network ) : System
parent IHandleEvent A local event handler to send messages to
network Gruppe22.Client.NetPlayer The network connection to use for handling events
return System

RequestMap() public method

Update local version of map
public RequestMap ( ) : void
return void

SendChat() public method

Exchange text messages
public SendChat ( string text ) : void
text string Text to send to other users
return void

Update() public method

Exchange events with server
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Current elapsed time
return void

Property Details

_network protected_oe property

An object representing the network connection
protected NetPlayer,Gruppe22.Client _network
return Gruppe22.Client.NetPlayer