Проблема вот в чем: хочу создать новый объект (для простенькой игрушки):
Код: Выделить всё
TEnemy = class
Level: TLevel;
Energy: TEnergy;
Coords: TCoordinate;
................................
Constructor Create(const PictureLevel: TPictureLevel; const EOwner: TWinControl; const NewEnemy: shortint);
.................................
end;
Код: Выделить всё
constructor TEnemy.Create(const PictureLevel: TPictureLevel; const EOwner: TWinControl; const NewEnemy: shortint);
begin
randomize;
Level := Random(3); // Срабатывает исключительная ситуция EAccessViolation
Coords.x := Random(EOwner.Width); // Срабатывает исключительная ситуция EAccessViolation
Coords.y := 0;
......................................