unit LandZone;

interface

uses
  _Geometry,
  Frost.Engine,
  Frost.GL,
  _PNG;

type
TLandZone = class(TComponent)
  private
    class var FMesh: TMesh;
    class var FMaterial: TMaterial;
  private
    FRenderer: TMeshRenderer;
    FActive: Boolean;
    FBounds: TVector3;
  public
    procedure OnStart; override;
    procedure OnDestroy; override;
  end;

implementation

uses
  Bullet,
  Hero;

{$REGION 'Factory'}
procedure TLandZone.OnStart;
var
  FactoryObject: TGameObject;
begin
  if FMesh = nil then
  begin
    FMesh := Resources.LoadMMSMesh('data/models/land_zone.mms', 0.14);
    FMaterial := TTexturedMaterial.Create(LoadPNGTexture('data/textures/h.png'));
  end;
  FRenderer := TMeshRenderer.CreateMeshRenderer(FMesh, FMaterial);
  GameObject.AddComponent(FRenderer);
end;

procedure TLandZone.OnDestroy;
begin

end;
{$ENDREGION}
end.
