📄 main.pas
字号:
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4300:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4350:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4400:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4450:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4500:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4550:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
4600:
begin
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=0;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALCLine;
TransmitType:=TTRadian;
Bulletspeed:=2;
Score:=300;
end;
with TEnemy.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy10');
Width:=Image.Width;
Height:=Image.Height;
X:=DXDraw.Width - 20;
Y:=DXDraw.Height - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
AnimSpeed:=150 / 1000;
Speed:=4;
TransmitProbability:=30;
DeadTimes:=50;
DeadImage:= 'BombEnemy3';
LineType:=TALC1Line;
BuildArt:=ArtCircle;
TransmitType:=TTCircle;
Bulletspeed:=2;
Score:=300;
end;
end;
//Boss段!!
4800:for i:=0 to 20 do
BackPlayer[i].Stop:=True;
5000:
begin
with TBoss.Create(SpriteEngine.Engine) do
begin
Image:=FMain.Image.Items.Find('Enemy6');
Width:=Image.Width;
Height:=Image.Height;
Y:=Random(FMain.DXDraw.Height) - Image.PatternHeight;
AnimCount:=Image.PatternCount - 1;
Z:=0;
Hp:=10;
Speed:=5;
LineType:=TALOLine;
X:=DXDraw.SurfaceWidth - 80;
Y:=50;
TransmitProbability:=80;
Bulletspeed:=100; //Boss HP
Probability:=0;
TransmitType:=TTCircle;
Score:=10000;
Bullet:= 'Enemybullet6';
DeadTimes:=150;
Bulletspeed:=10;
BuildArt:=ArtNone;
ShootSound:=Drip;
end;
end;
end;
end;
procedure TFMain.GetOnArticle(ArticleType:TArticleType;Sender:TObject);
begin
case ArticleType of
ArtNone:;
Artsupper:
begin
MainPlayer.SupperTotalTime:=300;
MainPlayer.Supper:=True;
end;
ArtMoon:
MainPlayer.BulletType:=BTMoon;
ArtCircle:
MainPlayer.BulletType:=BTCircle;
ArtWave:
MainPlayer.BulletType:=BTWave;
ArtFire:
MainPlayer.BulletType:=BTFire;
ARTLaser:
begin
MainPlayer.BulletType:=BTLaser;
MainPlayer.ShootSound:=LaserGun;
end;
ArtPointA:Inc(TotalScore,500);
ArtPointB:Inc(TotalScore,2000);
DiamondA:Inc(BlueDiam);
DiamondB:Inc(YellowDiam);
DiamondC:Inc(GreenDiam);
end;
end;
function TFMain.CreateMainPlayer(const t:Cardinal):Boolean;
begin
Result:=False;
if ((t = FCount) or (t = 0)) then
begin
MainPlayer:=TMainPlayer.Create(SpriteEngine.Engine);
MainPlayer.Image:=Image.Items.Find('MainPlayer');
MainPlayer.Width:=MainPlayer.Image.Width;
MainPlayer.Height:=MainPlayer.Image.Height;
MainPlayer.AnimCount:=MainPlayer.Image.PatternCount - 1;
MainPlayer.AnimSpeed:=0.5;
MainPlayer.Z:=0;
MainPlayer.Y:=216;
MainPlayer.Speed:=10;
MainPlayer.DeadSound:=PlayerBom;
MainPlayer.DeadTimes:=100;
MainPlayer.DeadImage:= 'BombPlayer';
MainPlayer.SupperTotalTime:=100;
MainPlayer.Supper:=True;
MainPlayer.BulletType:=BTStandard;
Result:=True;
end;
end;
procedure TFMain.GamePassAndAddScore;
begin
// dxfont.TextOut(dxdraw.Surface,dxdraw.Width div 2-100,dxdraw.Height div 2,'the end');
// DXFont.TextOut(DXDraw.Surface,00,100, '0123456789');
//dxfont.TextOut(dxdraw.Surface,0,100,'abcdefghijk');
// dxfont.EffectsParameters.angle:=fcount*iangle;
// dxfont.EffectsParameters.WLenght:=fcount;
//DXFont.EffectsParameters.AlphaValue:=iangle;
//DXFont.EffectsParameters.CenterX:=iangle;
// if FCount - BossFCount > 200 then
MainPlayer.SupperTotalTime:=1000;
MainPlayer.Supper:=True;
MainPlayer.AnimCount:=MainPlayer.AnimCount - 1;
MainPlayer.NCanControl:=True;
DXFont.TextOut(DXDraw.Surface,DXDraw.Width div 2 - 77,DXDraw.Height div 2, 'The End');
if GameClasses.SleepEx(50) then
begin
LogoDIB:=TDIBEffect.Create;
LogoDIB.Assign(DXDraw.Surface);
GameStatus:=GamePass;
end;
end;
procedure TFMain.FormCloseQuery(Sender:TObject;var CanClose:Boolean);
begin
GameStatus:=GameExit;
ApplicationExit:=True;
end;
procedure TFMain.Timer1Timer(Sender:TObject);
begin
LogoDIB.Free;
Timer1.Enabled:=False;
Close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -