The author has 4 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1202 3
目前调用公共事件的AS3代码非常麻烦
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 12/13/15 0:23
var ex:EventExecutor = new EventExecutor();
ex.messageWindow = Game.messageWindow; // 设置显示文章用的窗口
ex.eventCharacter = Game.map.events[1]; // 将窗口上的人物设置为地图上事件1的人物
ex.provideID(1, Game.map.id); // 设置在公共事件中使用的地图id和事件id
ex.onFinish = function(){ }; // 当公共事件执行完毕后调用的回调函数
ex.setCommandList(Game.commonEventInfo[公共事件ID].list); // 装入公共事件的执行内容
ex.execute(); // 开始执行
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 12/13/15 0:24
执行ex.provideID(a, b)这句话后,在公共事件中就可以使用变量eventID和mapID,它们的值分别是a和b。
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 3 Posted at: 12/13/15 0:25
不过这也展示了EventExecutor类的使用方法。
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 4 Posted at: 12/13/15 0:26
EventExecutor类也可以用来手动调用普通的地图上的事件,或者数据库中的战斗事件,甚至是指定的事件指令数组。
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1202 Replies: 3
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 12/13/15 0:26
Announcements