Changeset 185 for trunk/UGameClient.pas


Ignore:
Timestamp:
Feb 12, 2018, 3:08:27 PM (7 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGameClient.pas

    r184 r185  
    66
    77uses
    8   Classes, SysUtils, UGame, Forms, fgl;
     8  Classes, SysUtils, UGame, Forms, fgl, UGameProtocol;
    99
    1010type
     
    1717    FControlPlayer: TPlayer;
    1818    FOnChange: TNotifyEvent;
    19     FOnReceive: TReceiveEvent;
     19    FOnReceive: TCommandEvent;
    2020    FOnMove: TMoveEvent;
    2121    procedure SetControlPlayer(AValue: TPlayer);
     
    2424    procedure PlayerMove(CellFrom, CellTo: TCell; var CountOnce, CountRepeat: Integer;
    2525      Update: Boolean; var Confirm: Boolean);
     26    procedure ReceiveCmd(Command: TCommand; DataOut, DataIn: TStream);
    2627  public
    2728    Name: string;
    2829    View: TView;
     30    Protocol: TGameProtocolClient;
    2931    procedure DoChange;
    30     procedure Send(Command: TCommand; DataOut, DataIn: Pointer);
    3132    constructor Create;
    3233    destructor Destroy; override;
     
    3536    property Form: TForm read FForm write SetForm;
    3637    property OnMove: TMoveEvent read FOnMove write FOnMove;
    37     property OnReceive: TReceiveEvent read FOnReceive write FOnReceive;
     38    property OnReceive: TCommandEvent read FOnReceive write FOnReceive;
    3839    property OnChange: TNotifyEvent read FOnChange write FOnChange;
    3940  end;
     
    101102end;
    102103
    103 procedure TClient.Send(Command: TCommand; DataOut, DataIn: Pointer);
     104procedure TClient.ReceiveCmd(Command: TCommand; DataOut, DataIn: TStream);
    104105begin
     106
    105107end;
    106108
     
    126128  FControlPlayer := nil;
    127129  View := TView.Create;
     130  Protocol := TGameProtocolClient.Create;
    128131end;
    129132
     
    132135  ControlPlayer := nil;
    133136  FreeAndNil(View);
     137  FreeAndNil(Protocol);
    134138  inherited Destroy;
    135139end;
Note: See TracChangeset for help on using the changeset viewer.