Changeset 211 for trunk/UGameClient.pas
- Timestamp:
- May 23, 2018, 8:53:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGameClient.pas
r205 r211 21 21 FOnChange: TNotifyEvent; 22 22 FOnDestroy: TNotifyEvent; 23 FOnGameEnd: TNotifyEvent; 23 24 FOnReceive: TCommandEvent; 24 25 FOnMove: TMoveEvent; … … 35 36 procedure ReceiveCmd(Command: TCommand; DataOut, DataIn: TStream); virtual; 36 37 procedure DoTurnStart(Sender: TObject); virtual; 38 procedure DoGameEnd(Sender: TObject); 37 39 public 38 40 Name: string; … … 54 56 property OnChange: TNotifyEvent read FOnChange write FOnChange; 55 57 property OnTurnStart: TNotifyEvent read FOnTurnStart write FOnTurnStart; 58 property OnGameEnd: TNotifyEvent read FOnGameEnd write FOnGameEnd; 56 59 property Active: Boolean read FActive write SetActive; 57 60 end; … … 134 137 if Assigned(FOnTurnStart) then 135 138 FOnTurnStart(Self); 139 end; 140 141 procedure TClient.DoGameEnd(Sender: TObject); 142 begin 143 if Assigned(FOnGameEnd) then 144 FOnGameEnd(Self); 136 145 end; 137 146 … … 191 200 Protocol := TGameProtocolClient.Create; 192 201 Protocol.OnTurnStart := DoTurnStart; 202 Protocol.OnGameEnd := DoGameEnd; 193 203 end; 194 204
Note:
See TracChangeset
for help on using the changeset viewer.