refresh;
bgimg:=Tpngimage.Create;
bgimg.LoadFromFile(extractfilepath(application.ExeName)+'pictures\battleback'+inttostr(battleid)+'.png');
canvas.Draw(imgbg.Left,imgbg.Top,bgimg);
for i := 1 to 6 do
begin
optimg[i]:=Tpngimage.Create;
randomize;
j:=random(12)+1;
optimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\'+event[j]+'.png');
canvas.Draw(imgbg.Left,50*(i-1)+imgbg.Top,optimg[i]);
end; //在场景中安置敌人
setlength(enyimg,enytotal);
for i := 1 to enytotal do
begin
enyimg[i]:=Tpngimage.Create;
randomize;
enyimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\battlers\'+enyenglishname[i]+'.png');
eny_x:=random(imgbg.Width-enyimg[i].Width)+imgbg.Left+40;
eny_y:=random(imgbg.Height-enyimg[i].Height)+imgbg.Top;
canvas.Draw(eny_x,eny_y,enyimg[i]);
end;
//在场景中安置我方队友
setlength(chtimg,chttotal);
for i := 1 to chttotal do
begin
chtimg[i]:=Tpngimage.Create;
randomize;
chtimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\battlers\'+chtenglishname[i]+'.png');
cht_x:=random(imgbg.Width-chtimg[i].Width)+imgbg.Left+40;
cht_y:=random(imgbg.Height-chtimg[i].Height)+imgbg.Top;
canvas.Draw(cht_x,cht_y,chtimg[i]);
end;到在场景中安置敌人这一部就读不出来了。请教一下各位!
bgimg:=Tpngimage.Create;
bgimg.LoadFromFile(extractfilepath(application.ExeName)+'pictures\battleback'+inttostr(battleid)+'.png');
canvas.Draw(imgbg.Left,imgbg.Top,bgimg);
for i := 1 to 6 do
begin
optimg[i]:=Tpngimage.Create;
randomize;
j:=random(12)+1;
optimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\'+event[j]+'.png');
canvas.Draw(imgbg.Left,50*(i-1)+imgbg.Top,optimg[i]);
end; //在场景中安置敌人
setlength(enyimg,enytotal);
for i := 1 to enytotal do
begin
enyimg[i]:=Tpngimage.Create;
randomize;
enyimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\battlers\'+enyenglishname[i]+'.png');
eny_x:=random(imgbg.Width-enyimg[i].Width)+imgbg.Left+40;
eny_y:=random(imgbg.Height-enyimg[i].Height)+imgbg.Top;
canvas.Draw(eny_x,eny_y,enyimg[i]);
end;
//在场景中安置我方队友
setlength(chtimg,chttotal);
for i := 1 to chttotal do
begin
chtimg[i]:=Tpngimage.Create;
randomize;
chtimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\battlers\'+chtenglishname[i]+'.png');
cht_x:=random(imgbg.Width-chtimg[i].Width)+imgbg.Left+40;
cht_y:=random(imgbg.Height-chtimg[i].Height)+imgbg.Top;
canvas.Draw(cht_x,cht_y,chtimg[i]);
end;到在场景中安置敌人这一部就读不出来了。请教一下各位!
解决方案 »
- 使用TWebBrowser时候怎么忽略所打开的网页链接中的target="_blank"之类属性
- 我怎么在Tchart1上得到当前有效的X值?
- 请教各位高手 怎样屏蔽掉Memo控件的键盘事件
- 2000系统 如何把已经删除的文件恢复? 急~~~
- 关于Treeview,救急!
- 关于DLL退出的奇怪问题。
- 真不理解delphi的语法特点 ,求语法标准
- 请问Delphi7的Update Patch在哪里可以下载,100分相送?
- 请教:有没有函数能直接把字符串后的空格去掉?
- 谁能告诉我为什么,难道真的是delphi的bug吗?
- 如何实现如下功能:双击dbgrid中一条记录,将内容显示到编辑区
- INI文件从光盘复制到电脑中变成只读文件了,为什么?
for i := 1 to enytotal do //超出范围,跳过。
enyimg[i].LoadFromFile(extractfilepath(application.ExeName)+'pictures\battlers\'+enyenglishname[i]+'.png');