Class Documentation

advertisement
Folder src/client
Class: TAlWrapper
Parent Class: TPersistent
METHODS:
constructor Create
procedure Init;
procedure SetListenerPosition(X,Y,Z : ALFLoat);
procedure SetListenerVelocity(X,Y,Z : ALFloat);
procedure SetListenerOrientation(X1,Y1,Z1,X2,Y2,Z2 : ALFloat);
Class: TClient
Parent Class: None
PROPERTIES:
RatModel : TQuakeModel; Creates the model for the rat class
CowModel : TQuakeModel; Creates the model for the cow class
METHODS:
procedure OnError(const AMsg: string; ASocket: TLSocket); generates an error message
when an error occurs
procedure OnReceive(ASocket: TLSocket); interacts with the various commands given in the
game (when the player wants to type, this
method starts the chat screen, when you die, a
message will appear)
procedure OnDisconnect(ASocket: TLSocket); generates a message when the connection
with the game is lost
procedure UpdateObject(s : String); updates the cow and rat classes when the player
interacts with them
procedure Run; Initializes the game after the player specified his/her name
procedure SendMsg(AMsg: string); used to transfer data from one method to the other, for
example the player's name
Class: TEventHandler
Parent Class: None
METHODS:
procedure OnKey(AK, AX, AY: Integer); handles the reactions of the game to certain keys
being pussed, for example: jumping and attacking
procedure OnKeyUp(AK, AX, AY: Integer); returns the player to his/her original position after
jumping
procedure AfterAttackAnimation(Sender : TObject); activates the attack animation
This class also contains the 'Key Map.' In this section the various keys and their respective
actions are displayed. Also, after the player provided the game with his/her name, this class
loads the map and creates the character.
Class: TScene
Parent Class: TGameObj
PROPERTIES:
SkyBox : TSkyBox;
Shield: TQuakeModel;
Sword: TQuakeModel;
Sword1: TQuakeModel;
Tree: TQuakeModel;
Palm: TQuakeModel;
Fern: TQuakeModel;
BurnedTreeModel: TQuakeModel;
OldTreeModel: TQuakeModel;
Man: TQuakeModel;
Head: TQuakeModel;
Tower2Model : TQuakeModel;
Chicken: TQuakeModel;
HouseModel: TQuakeModel;
TimeLastMessage: TDateTime;
GrassTexture: TTexture;
StoneTexture: TTexture;
SkyTexture: TTexture;
SoldierTexture: TTexture;
SoldierBackTexture: TTexture;
Class: TSkyBox
Parent Class: None
PROPERTIES:
FFront: TTextureImaging; provides the front of the surrounding environment
FBack: TTextureImaging; provides the back of the surrounding environment
FLeft: TTextureImaging; provides the left of the surrounding environment
FRight: TTextureImaging; provides the right of the surrounding environment
FUp: TTextureImaging; provides the top of the surrounding environment
FDown: TTextureImaging; provides the bottom of the surrounding environment
METHODS:
procedure Show; generates the surrounding environment
Folder src/common
Class: TCharLists
Parent Class: TFPObjectsList
METHODS:
function Add(AName: string): THuman; Adds the name to your character
procedure Remove(AId: Integer); Removes the name from your character
function GetByName(AName: string): THuman; Gets your character by searching for its name
function GetById(AId: Integer): THuman; Gets your character by searching for its ID
Class: Tcow
Parent Class: TGameObj
PROPERTIES:
AttackedChar : Player that was being attacked (if any)
METHODS:
constructor Create(AModel : TQuakeModel) : Constructor Class, uses the AModel
QuakeModel.
function UpdateMessage : String; Returns the update message
procedure Manage; Manage the behavior of the Cow, decide if it walk or attack.
procedure HurtObj(Amount : Real; Attacker : TGameObj); Hurt the obj Attacker an Amount
of Life.
Class: THuman
Parent Class: TGameObj
PROPERTIES:
property AfterAttackAnimation: TNotifyEvent read FAfterAttackAnimation write
FAfterAttackAnimation;
property GoalX : Real read GetGoalX write setGoalX;
property GoalY : Real read GetGoalY write setGoalY;
property GoalZ : Real read GetGoalZ write setGoalZ;
Sword : TQuakeModel;
Shield : TQuakeModel;
constructor Create(AModel: TQuakeModel);
METHODS:
procedure Jump; after the jump-key is pressed, this procedure makes the character jump
Class: TMap
METHODS:
procedure LoadObjects; loads all the objects
Class TRat
Parent Class: TGameObj
PROPERTIES:
AttackedChar : Player that was being attacked (if any)
METHODS:
constructor Create(AModel : TQuakeModel) : Constructor Class, uses the AModel
QuakeModel.
function UpdateMessage : String; Returns the update message
procedure Manage; Manage the behavior of the Rat, decide if it walk or attack.
procedure HurtObj(Amount : Real; Attacker : TGameObj); Hurt the obj Attacker an Amount
of Life.
Folder src/server
Class: TMundoConnection
METHODS;
procedure SendUpdateInfo;
procedure oner(const AMsg: string; ASocket: TLSocket);
procedure onre(ASocket: TLSocket);
procedure onac(ASocket: TLSocket);
procedure onds(ASocket: TLSocket);
procedure SendMessageToAll(AMsg: string);
procedure SendMsg(AMsg: string; ASocket: TLSocket);
procedure SendCharge(ASocket: TLSocket);
Download