这里是测试代码。
procedure TGameMain.Button1Click(Sender: TObject); //请在form中放入一个button 后粘贴代码到单击事件中varFScript : TScript;beginFScript := TScript.Create;FScript.LoadScript(''''E:\projects\GameEngine\Scripts\Test.src''''); //修改为你保存脚本的路径(Sender as TButton).Enabled := FALSE;FScript.RunScript; //等待按键时只需要单击一下form即可继续运行。(Sender as TButton).Enabled := TRUE;FScript.Free;end;
这里是关于上面代码的图解说明:
PrintString NewLine WaitForKeyPress RunScript() Text Console
PrintString
NewLine
WaitForKeyPress
RunScript()
Text Console
阅读完上述的内容后,下一回将讲解如何解释向这样的脚本指令:
DrawBitmap "gfx/copyright.bmp"PlaySound "sound/ambient.wav"Pause 3000PlaySound "sound/wipe.wav"FoldCloseEffectYDrawBitmap "gfx/ynh_presents.bmp"PlaySound "sound/ambient.wav"Pause 3000PlaySound "sound/wipe.wav"FoldCloseEffectXDrawBitmap "gfx/title.bmp"PlaySound "sound/title.wav"WaitForKeyPressPlaySound "sound/wipe.wav"FoldCloseEffectYExit
再见!2004年11月
上一页 [1] [2]
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18