index 34fc9e71ef620206bbe9a4eda0a0f21923294519..393e07d6fa7f426cfad03d5b3f83f82033ed89bf 100644 (file)
FAnimState: TAnimationState;
FCurrentWeapon: Byte;
FFlag: Byte;
- FFire: Boolean;
FFireCounter: Byte;
FID: Integer;
procedure SetColor(Red, Green, Blue: Byte);
procedure SetWeapon(Weapon: Byte);
procedure SetFlag(Flag: Byte);
- procedure SetFire(Fire: Boolean);
+ procedure SetFire (Fire: Boolean);
+ function GetFire (): Boolean;
function PlaySound(SoundType, Level: Byte; X, Y: Integer): Boolean;
procedure Update();
function GetName (): String;
published
- property Fire: Boolean read FFire;
property Direction: TDirection read FDirection write FDirection;
property Animation: Byte read FCurrentAnimation;
property Weapon: Byte read FCurrentWeapon;
FColor.B := Blue;
end;
-procedure TPlayerModel.SetFire(Fire: Boolean);
-begin
- FFire := Fire;
- if FFire then
- FFireCounter := PlayerModelsArray[FID].ModelSpeed[A_ATTACK] * PlayerModelsArray[FID].Anim[TDirection.D_RIGHT, A_ATTACK].Frames
- else
- FFireCounter := 0
-end;
+ procedure TPlayerModel.SetFire (Fire: Boolean);
+ begin
+ if Fire then
+ FFireCounter := PlayerModelsArray[FID].ModelSpeed[A_ATTACK] * PlayerModelsArray[FID].Anim[TDirection.D_RIGHT, A_ATTACK].Frames
+ else
+ FFireCounter := 0
+ end;
+
+ function TPlayerModel.GetFire (): Boolean;
+ begin
+ Result := FFireCounter > 0
+ end;
procedure TPlayerModel.SetFlag (Flag: Byte);
begin
FAnimState.Update;
if FFireCounter > 0 then
Dec(FFireCounter)
- else
- FFire := False
end;
procedure g_PlayerModel_LoadAll;