C# Class AngryTanks.Server.Player

Datei anzeigen Open project: dvicory/AngryTanks Class Usage Examples

Public Properties

Property Type Description
Callsign String
Connection Lidgren.Network.NetConnection
Slot Byte
Team TeamType

Public Methods

Method Description
Die ( NetIncomingMessage incomingMessage ) : void

Handles death reports by players and broadcasts that to all other Players.

EndShot ( NetIncomingMessage incomingMessage ) : void

Handles end shots by players and broadcasts that to all other Players.

GetMsgScore ( ) : NetOutgoingMessage

HandleData ( NetIncomingMessage incomingMsg ) : void

Player ( AngryTanks.Server.GameKeeper gameKeeper, Byte slot, NetConnection connection, PlayerInformation playerInfo ) : System
SendMessage ( NetOutgoingMessage msg, NetDeliveryMethod method ) : NetSendResult
SendMessage ( NetOutgoingMessage msg, NetDeliveryMethod method, int sequenceChannel ) : NetSendResult
Shoot ( NetIncomingMessage incomingMessage ) : void

Handles new shots by players and broadcasts that to all other Players.

Spawn ( ) : void

Spawns the Player and notifies all other Players about it.

Update ( System.DateTime lastUpdate ) : void

Private Methods

Method Description
BroadcastUpdate ( NetIncomingMessage msg ) : void

Broadcasts a MsgPlayerServerUpdatePacket to all other Players after receiving a MsgPlayerClientUpdatePacket.

SendState ( ) : void

Sends initial state to this Player.

Method Details

Die() public method

Handles death reports by players and broadcasts that to all other Players.
public Die ( NetIncomingMessage incomingMessage ) : void
incomingMessage Lidgren.Network.NetIncomingMessage
return void

EndShot() public method

Handles end shots by players and broadcasts that to all other Players.
public EndShot ( NetIncomingMessage incomingMessage ) : void
incomingMessage Lidgren.Network.NetIncomingMessage
return void

GetMsgScore() public method

public GetMsgScore ( ) : NetOutgoingMessage
return Lidgren.Network.NetOutgoingMessage

HandleData() public method

public HandleData ( NetIncomingMessage incomingMsg ) : void
incomingMsg Lidgren.Network.NetIncomingMessage
return void

Player() public method

public Player ( AngryTanks.Server.GameKeeper gameKeeper, Byte slot, NetConnection connection, PlayerInformation playerInfo ) : System
gameKeeper AngryTanks.Server.GameKeeper
slot Byte
connection Lidgren.Network.NetConnection
playerInfo PlayerInformation
return System

SendMessage() public method

public SendMessage ( NetOutgoingMessage msg, NetDeliveryMethod method ) : NetSendResult
msg Lidgren.Network.NetOutgoingMessage
method NetDeliveryMethod
return NetSendResult

SendMessage() public method

public SendMessage ( NetOutgoingMessage msg, NetDeliveryMethod method, int sequenceChannel ) : NetSendResult
msg Lidgren.Network.NetOutgoingMessage
method NetDeliveryMethod
sequenceChannel int
return NetSendResult

Shoot() public method

Handles new shots by players and broadcasts that to all other Players.
public Shoot ( NetIncomingMessage incomingMessage ) : void
incomingMessage Lidgren.Network.NetIncomingMessage
return void

Spawn() public method

Spawns the Player and notifies all other Players about it.
public Spawn ( ) : void
return void

Update() public method

public Update ( System.DateTime lastUpdate ) : void
lastUpdate System.DateTime
return void

Property Details

Callsign public_oe property

public String Callsign
return String

Connection public_oe property

public NetConnection,Lidgren.Network Connection
return Lidgren.Network.NetConnection

Slot public_oe property

public Byte Slot
return Byte

Team public_oe property

public TeamType Team
return TeamType