Changeset 185 for trunk/UGameClient.pas
- Timestamp:
- Feb 12, 2018, 3:08:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGameClient.pas
r184 r185 6 6 7 7 uses 8 Classes, SysUtils, UGame, Forms, fgl ;8 Classes, SysUtils, UGame, Forms, fgl, UGameProtocol; 9 9 10 10 type … … 17 17 FControlPlayer: TPlayer; 18 18 FOnChange: TNotifyEvent; 19 FOnReceive: T ReceiveEvent;19 FOnReceive: TCommandEvent; 20 20 FOnMove: TMoveEvent; 21 21 procedure SetControlPlayer(AValue: TPlayer); … … 24 24 procedure PlayerMove(CellFrom, CellTo: TCell; var CountOnce, CountRepeat: Integer; 25 25 Update: Boolean; var Confirm: Boolean); 26 procedure ReceiveCmd(Command: TCommand; DataOut, DataIn: TStream); 26 27 public 27 28 Name: string; 28 29 View: TView; 30 Protocol: TGameProtocolClient; 29 31 procedure DoChange; 30 procedure Send(Command: TCommand; DataOut, DataIn: Pointer);31 32 constructor Create; 32 33 destructor Destroy; override; … … 35 36 property Form: TForm read FForm write SetForm; 36 37 property OnMove: TMoveEvent read FOnMove write FOnMove; 37 property OnReceive: T ReceiveEvent read FOnReceive write FOnReceive;38 property OnReceive: TCommandEvent read FOnReceive write FOnReceive; 38 39 property OnChange: TNotifyEvent read FOnChange write FOnChange; 39 40 end; … … 101 102 end; 102 103 103 procedure TClient. Send(Command: TCommand; DataOut, DataIn: Pointer);104 procedure TClient.ReceiveCmd(Command: TCommand; DataOut, DataIn: TStream); 104 105 begin 106 105 107 end; 106 108 … … 126 128 FControlPlayer := nil; 127 129 View := TView.Create; 130 Protocol := TGameProtocolClient.Create; 128 131 end; 129 132 … … 132 135 ControlPlayer := nil; 133 136 FreeAndNil(View); 137 FreeAndNil(Protocol); 134 138 inherited Destroy; 135 139 end;
Note:
See TracChangeset
for help on using the changeset viewer.