2013年8月19日 星期一

draw monster

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/)

沒有留言:

張貼留言