Monster.as: monster data (hp, name...)
MonsterManager.as: manage Monster (data)
MonsterMovie.as: contains functions to set monster's bitmap frame
MonsterActionManager.as: determine which function in MonsterMovie should be called to set monster's bitmap frame
MapInfoMonster.as: set/get monster's map info(direction on the map, mouse event handler about the monster on the map control), control map monsters' display status (what monster's components (hp bar, name...) should be shown on screen)
MapInfoMonsterView.as: contains all DisplayObjects(functions for display objects on/off and position setting) of a monster shown on the screen, also set mouse event handler for the displayed monster
WorldScene.process: this.m_sortedLayer.monsterEnter(fightObj as MapInfoMonster) -> in WorldSortedLayer -> in WorldSortedLayer.monsterEnterView: invokeDataListener -> In WorldSortedLayerView.as: onDataChanged-> case WorldSortedLayer.DATA_CHANGE_TYPE_MONSTER_ENTER: create and add MonsterView: bandInfo(MapInfoMonster.as).createView -> new MapInfoMonsterView as DataListener, in MapInfoMonster.onDataChanged: get monster's status to determine how to display the monster
load(/res/swf/monster/)
2013年8月19日 星期一
2013年8月16日 星期五
add player BitmapMC to screen
(WorldScene.as)process(): check NetMessage(include UserData), process() is registered to NetManager in WorldScene.registerHandler() (done in initCore() in "Launcher.as" ->(when process() called) (MapInfoManager.as) loadMapData-> loadMiniMapCompleteCallback->loadMiniMapComplete->(WorldScene.as) mapLoadComplete->initScene->stage.addChildAt(m_gameLayer,0);
how the avatar generated
WorldScene.process -> if(msg is DWorldUserEnter) -> this.m_sortedLayer.userEnter(wUser) -> userEnterView(user) -> this.invokeDataListener(params);//invoke new WorldSortedLayerView.onDataChanged -> case WorldSortedLayer.DATA_CHANGE_TYPE_USER_ENTER -> userView = user.createView(null) as WorldUserView -> tempView.initAvatar() -> this._graphics = PlayerManager.instance.getAvator(race,sex,userClothes,weapons,userMount,bool) ->var playerPath:String = this.getClothesPath(professional,sex,clothes,userMount), var player:Player = PlayerManager.instance.getPlayer(playerPath,weaponsPath,mountPath,isHigh);
swf path: /res/swf/avatar/
Avatar setting:
sex: in WorldUser
professional (race): UserData
how the avatar generated
WorldScene.process -> if(msg is DWorldUserEnter) -> this.m_sortedLayer.userEnter(wUser) -> userEnterView(user) -> this.invokeDataListener(params);//invoke new WorldSortedLayerView.onDataChanged -> case WorldSortedLayer.DATA_CHANGE_TYPE_USER_ENTER -> userView = user.createView(null) as WorldUserView -> tempView.initAvatar() -> this._graphics = PlayerManager.instance.getAvator(race,sex,userClothes,weapons,userMount,bool) ->var playerPath:String = this.getClothesPath(professional,sex,clothes,userMount), var player:Player = PlayerManager.instance.getPlayer(playerPath,weaponsPath,mountPath,isHigh);
swf path: /res/swf/avatar/
Avatar setting:
sex: in WorldUser
professional (race): UserData
2013年8月15日 星期四
log in flow
Main -> onAdd( when Main.swf is added to stage) -> preloading complete -> startClient() -> enter "Launcher.as" initToLogin (pass id, pw to Launcher) : MainUI init, stage.addChild(MainUI) -> initCore() -> stage.addChild(currentScene) -> initLogin() ->onLoginConnect: when connect succeed, send login info to server (sendLoginMessage) -> enter "Login.as": loginLoginServer(id, pw) ->enter "NetManager.as": sendMessage : login info into message queue -> back to "Launcher.as" in initCore() -> back to initToLogin: loadAllResComplete() :connect -> enter "Link.as": ConnectHandler -> outerConnectEventHandler (defined in "NetManager.as" onConnect() -> sendMessage()
2013年8月12日 星期一
2013年6月14日 星期五
2013年6月11日 星期二
grid type
public static const POINT_BLOCK:int = 0;//不可通过点
public static const POINT_SHELTER:int = 2;//遮挡点
public static const POINT_TRANSMISSION:int = 3; //传送点
public static const POINT_MONSTER:int = 4; //怪物
public static const POINT_EFFECT:int = 100; //特效
public static const POINT_BORN:int = 6; //出生点
public static const POINT_BORDER:int = 7; //边界
public static const POINT_NPC:int = 8; //npc
public static const POINT_BOSS_BOX:int = 9;
public static const POINT_SHELTER:int = 2;//遮挡点
public static const POINT_TRANSMISSION:int = 3; //传送点
public static const POINT_MONSTER:int = 4; //怪物
public static const POINT_EFFECT:int = 100; //特效
public static const POINT_BORN:int = 6; //出生点
public static const POINT_BORDER:int = 7; //边界
public static const POINT_NPC:int = 8; //npc
public static const POINT_BOSS_BOX:int = 9;
訂閱:
文章 (Atom)