What component to derive my 'TCard' from? (game)
I am trying to make a TCard component for a game. What class should I
derive it from?
This is for a card game like MTG or yu gi oh. The card should have a blank
image, and when created it will load either a front or back view.
If it loads the front view, it will then have to have a few labels (for
properties like power/cost/def/text). Cards must be clickable.
type
TCard = class(zzzzzzzzz)
private
Now once that is done, do I have to add anything to the
constructor/destructor? Currently I have:
constructor TCard.Create(AOwner: Tcomponent);
begin
inherited Create(AOwner);
end;
{******************************************************************************}
{ Free any resources allocated to component
}
destructor TCard.Destroy;
begin
inherited Destroy;
end;
Also I think I added the onclick parts right but not sure. In the
published area I have
{Inherited properties}
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnClick;
property OnDblClick;
etc...
No comments:
Post a Comment