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

沒有留言:

張貼留言