package Entities.Players.Little_Keen is
type Little_Keen is new Player with private;
type A_Little_Keen is access all Little_Keen'Class;
private
type Action_Type is
(
Act_Moving,
Act_Bored
);
type State is abstract tagged limited
record
action : Action_Type;
end record;
type A_State is access all State'Class;
function Get_Frame( this : State;
k : Little_Keen'Class ) return Natural is abstract;
procedure Update( this : State;
k : A_Little_Keen ) is abstract;
type Little_Keen is new Player with
record
state : A_State := null;
stateStart : Time_Span := Time_Span_Zero;
stateDuration : Time_Span := Time_Span_Zero;
idleStart : Time_Span := Time_Span_Zero;
swimming : Boolean := False;
walkSpeed,
walkAcceleration : Float := 0.0;
end record;
procedure Construct( this : access Little_Keen );
procedure Change_State( this : not null access Little_Keen'Class;
state : not null A_State;
length : Time_Span := Time_Span_Zero );
procedure Die( this : access Little_Keen );
function Is_Busy( this : not null access Little_Keen'Class ) return Boolean;
function Object_Input( stream : access Root_Stream_Type'Class ) return Little_Keen;
for Little_Keen'Input use Object_Input;
procedure Object_Read( stream : access Root_Stream_Type'Class; obj : out Little_Keen );
for Little_Keen'Read use Object_Read;
procedure Object_Write( stream : access Root_Stream_Type'Class; obj : Little_Keen );
for Little_Keen'Write use Object_Write;
procedure Reset_Idle( this : not null access Little_Keen'Class );
procedure Update( this : access Little_Keen; time : Tick_Time );
procedure Update_Frame( this : access Little_Keen; notify : Boolean := True );
end Entities.Players.Little_Keen;