// part of uber 3
//{$I uber_defaults.inc}
type
PWorld = ^TWorld;
PEntity = ^TEntity;

TForEachProc = procedure (Entity: PEntity);
TForEachProcObj = procedure (Entity: PEntity) of object;
TForEachFunc = function (Entity: PEntity): Boolean;
TForEachFuncObj = function (Entity: PEntity): Boolean of object;

TEntityPtr = record
private
  FId: LongInt;
  FEntity: PEntity;
public
  procedure SetNull; inline;
  constructor Store(Entity: PEntity);
  function Alive: Boolean; inline;
  property Entity: PEntity read FEntity;
end;

TBaseEntity = object
public
  constructor Init;
  destructor Done; virtual;
  procedure Render; virtual;
  procedure RenderSubObjects; virtual;
protected
  procedure OnSpawn; virtual;
  procedure OnDie; virtual;
  procedure OnUpdate; virtual;
  procedure OnRender; virtual;
end;
