y
2016-09-07 16:39:00 0 举报
在无尽的宇宙中,存在着一颗神秘的星球,它被命名为“Y”。这颗星球充满了未知和奇迹,它的表面覆盖着翠绿的草地,蓝色的湖泊如同宝石般镶嵌其中。天空中总是挂着五彩斑斓的彩虹,仿佛是大自然的调色板。星球上的生物形态各异,有的像精灵一样小巧可爱,有的像巨人一样威武雄壮。他们和谐共处,共同守护着这个美丽的家园。Y星球的夜晚更是美轮美奂,满天繁星闪烁,银河如瀑布般流淌,令人陶醉。这就是Y星球,一个充满奇幻色彩的世界。
作者其他创作
大纲/内容
createClientSocket()
protobuf工具生成的类
CGameTicker
+ OnTick()+ GetTickName()......
- void * m_pTickContext
SetCallbackInterface()
Lua环境搭建
客户端全局参数工具类,提供的基本都是静态的方法和静态的字段,供其他类快速使用
OnInit()
AllocatedObjectBase
+ void* operator new()+ void operator delete+ static void* AllocMemory()+ static void FreeMemory
寻路
ConfStageXml
+ static ConfStageXml* Instance()+ init()- Create()......
+ int sn+ int num+ int face......
GameStateWorld
+ InitModules()+ OnKeyboardHandler()+ OnTouchHandler()+ OnReconnect()+ OnServerHandler()......
- GameObjManager* game_obj_manager_- BuddyModule buddy_module_- ItemModule item_module_- QuestModule quest_module_- SceneMapModule scenemap_module_- SettingModule setting_module_- SkillModule skill_module_- StickModule stick_module_- GameObjModule gameobj_module_- AlertModule alert_module_- CommonModule common_module_- StageModule stage_module_- StoryModule story_module_- BloodModule blood_module_- GameDebugManager debug_manager_
Logic()
主角控制器
StoryLineDataHero
+ Process()+ PaseData()- RunMoveLogic()......
+ Vector3 initScale+ String actRes+ String actSkin......
CreateRoleCameraMgr
+ moveCameraToPos()+ SetCameraPos()+ PlayCameraAni()......
- LORD::CameraAnimClient* camera_ani_- int camera_state_- Vector3 tag_pos_- Vector3 start_pos_......
GameObjLogicPush
+ Process()+ Play()+ SetData()......
- ScenePathData data_path_- star::Vector3 pos_- star::Vector3 speed_......
GameHeroData
+ PaseServerData()+ IsSameTeam()+ IsSameUnion()+ gold()+ coin()+ goldGift()+ hornor()+ vit()+ exp_cur()+ pos()+ energy()+ can_move()+ move_type()......
- star::i64 gold_- star::i64 coin_- star::i64 goldGift_- star::i32 honor_- star::i32 vit_- star::i64 exp_cur_- star::i32 credit_level_- star::i32 focus_- int move_type_- String move_end_param_- int speed_server_......
继承自CEGUI类
EffectClient
+ CreateInstance()+ DestroyInstance()+ setPosition()+ setTimeScale()+ isStopped()
- void* const m_pEffectProxy
SkillLogicData
+ int skill_sn+ SkillSpecialData data_special+ SkillChargeData data_charge+ SkillHideData data_hide......
StoryModule
+ OnInit()+ OnUpdate()+ Play()+ PlayStory()......
- StoryMainData story_data_- bool is_play_- bool is_cleanup_
GameCamera
+ Process()+ SetPosition()+ SetDir()+ LookAt()+ dir()+ distance()......
- star::Vector3 now_pos_- bool is_have_tag_- star::Vector3 start_pos_- star::Vector3 start_dir_......
SettingModule
+ OnInit()+ InitSettingStr()......
- String opNumStr_......
Init()
View
+ OnInit()+ OnShow()+ OnHide()+ OnGUIMessage()......
- bool show_- int param_......
这几个方法之间的调用关系:run里面调用了setup,setup里面调用了initWindow和onInit
GameObjPanelInfo
......
QuestModule
+ OnInit()+ Update()......
- QuestDataManager* manager_data_
SERVER_CMD_FUNC_IMPL
GameObjData
+ Process()+ SetHpMpChange()+ SetHpMpMaxChange()+ AddFollow()+ DelFollow()+ logic_id()+ name()+ posX()+ posY()+ posZ()+ height()+ hp_cur()+ model()+ weapon()+ scale()+ hp_max()+ can_move()+ level()+ speed()+ angle()+ is_death()+ is_hero()+ CheckMove()+ StartMove()+ StartJump()+ StartCharge()+ SetFightMsg()+ UpdateMPSP()+ FireFightPropChange()+ UpdatePos()......
- star::i64 logic_id_- star::String logic_key_- star::String name_- GAME_OBJ_TYPE type_- star::Vector3 pos_- float height_- star::i64 hp_cur_- star::i64 hp_max_- star::i64 hp_show_- int mp_cur_- int mp_max_- int mp_show_- bool is_death_- bool is_hero_- bool is_show_name_panel_- bool fly_can_local_- int fly_step_- Vector3 fly_src_pos_- Vector3 fly_tag_pos_......
引擎的回调函数类,声明了引擎提供的回调接口
GameDrop
+ Process()+ PlayAction()......
- star::list::type list_clone_effect_
VideoMgr
+ Process()+ PlayVideo()......
- static STORY_STATE vieo_state_;......
SystemCallback
SkillStateData
+ ParseDSkill()
- int sn- star::String name- star::String icon......
游戏类,客户端的管理者Init:检查版本更新、设置服务器列表地址、检查和获得当前程序的目录、初始化引擎(设置log目录、设置引擎提供的回调等)、
GameObjStateAttack
+ Stop()+ Play()+ CheckNextState()......
- SkillData* skill_data_- SkillLogicData* skill_data_logic......
GamePick
+ Process()+ Create()+ UpdateData()......
GameMarryHorse
+ ActorCreate()+ PlayAction()......
- LORD::ActorClient* actor_ride_- LORD::ActorClient* actor_ride_sub_- float ride_scale_
initWindow()
GameMonster
+ Create()+ Process()+ UpdateData()......
- bool is_anim_tween_- int add_shadow_count_
模板 Singleton
CNavigation
+ static CNavigation* getInstance+ LoadNavMesh()+ getNavMesh()+ findPath()+ findSpecilPath()+ findStraightPath()+ rayCast()+ findNearestPoint()......
- dtNavMesh*\t\t m_navMesh- dtNavMeshQuery*\t m_navQuery- dtCrowd*\t\t m_crowd- InputGeometryData* m_InputGeometryData......
CommonModule
+ OnInit()+ OnUpdate()+ PaseCommand()......
- int time_slow_
说明
GameObjManager
+ OnInit()+ Process()+ GetGameObj()+ GetGameObjForServer()+ GetHeroObj()+ GetAttackTag()+ GetNearObj()+ GetHeroCurState()+ GetServerTime()+ GetObjManager()+ OnHeroPosChange()+ HideScene()+ StopHeroMove()+ OnHumanFightingChange()+ SendMsg()+ StartHeroAniMove()+ PauseAllEffect()+ CreateNpc()......
- GameCamera* game_camera_- GameMouse* game_mouse_- GameHumanManager manager_human_- GameMonsterManager manager_monster_- GameObjDataManager manager_data_- GameNpcManager manager_npc_- GameHeroManager manager_hero_- GameTriggerManager manager_trigger_- GameCommonManager manager_common_- GameEffectManager manager_effect_- GameDropManager manager_drop_- GameBuddyManager manager_buddy_- GameConvoyManager manager_convoy_- GamePickManager manager_pick_- FightModule* module_fight_- BuffModule* module_buff_- GameSceneManager game_scene_manager_- GameCameraManager game_camera_manager_- GameActorCreateManager* manager_actor_creater_- GameWoundTextManager* manager_woundtext_- CGameWoundManager* manager_wound_......
Game
+ Init()+ Logic()+ OnTouchHandler()+ OnKeyboardHandler()+ root_path()+ StartPause()+ OnTouchHandler()......
- CScriptModule *script_- YTSystemCallback *cb_sys_- FrameState *fm_sta_- SocketEncryptMgr *se_mgr_- EventMgr *ev_mgr_- ViewMgr *vw_mgr_- GameObjPanelManager *panel_mgr_- GameObjBloodManager * GameObjBloodManager- NetWorkMgr *nt_mgr_- GameStateMgr *gs_mgr_
SocketEncryptMgr
+ key()+ RsaDecrypt()......
- rsa_- aes_- rc4_......
GameState
+ RegisterModule()+ OnKeyboardHandler()+ OnTouchHandler()+ OnServerHandler()+ OnServerDefaultHandler()+ RegisterServerMsg()+ SendServerMsg()+ OnEventMessage()+ OnReconnect()+ OnUpdate()......
msg_id_manager.h
static const int CSLogin = 11;static const int SCLoginResult = 12;static const int CSAccountReconnect = 21;static const int SCAccountReconnectResult = 22;static const int SCAccountLoginQueue = 26;static const int CSAccountActive = 27;static const int SCAccountActiveResult = 28;static const int TeamStart = 101;static const int TeamEnd = 200;static const int CSTeamCreate = 102;static const int SCTeamMyResult = 103;static const int CSTeamTransfer = 104;......
LordSystemInf.h
type_def.h
typedef signed char i8 typedef short i16 typedef int i32 ...... template deque template vector template map ...... #define STAR_PLATFORM_WINDOWS 1 #define STAR_PLATFORM_LINUX 2 ......
SkillHitData
- star::String res_att- star::StringArray res_hit- star::StringArray res_death- int blood_num......
SCFightHpChg
StageModule
+ OnInit()+ Update()+ SendOutOfCurPos()+ SendEnterStage()......
- int msg_send_time_- String msg_send_key_......
ConfigMgr
+ Init()+ UnInit()
main.cpp
+ WinMain()
Lua环境设置类OnInit:初始化lua和c++交互的环境、设置tolua++的使用环境addLuaLoader:设置lua脚本自定义loaderBBZS_Lua_Loader:设置lua脚本自定义loader
CScriptModule
+ OnInit()+ addLuaLoader()+ BBZS_Lua_Loader()
- CEventLuaWrapper *m_pLuaSrvMsg
YTSystemCallback
+ OnActorWound()+ OnActorMessage()+ OnActorSkillEnd()+ OnVideoSelfDefEvent()
聚合
GameObj
+ Process()+ Create()+ UpdateState()+ UpdateData()+ AddState()+ RunState()+ AddPick()+ AddBuffEff()+ DelBuffEff()+ PlayAction()+ GetNextStateData()+ GetCurrStateData()+ ClearNextStateData()- ActorCreate()- UpdateNamePanel()- AddShadow()+ type()+ logic_id()+ ActorClient()+ HasAction()......
- LORD::ActorClient* actor_- LORD::ActorClient* actor_weapon_- GAME_OBJ_TYPE type_- star::i64 logic_id_- String play_action_name_- bool is_show_- String model_- float model_scale_- String skin_- String child_- String child_skin_- String weapon_- float weapon_scale_- bool is_show_weapon_- bool is_show_body_......
GameTrigger
- int time_destroy_- star::String effect_key_
CEventLuaWrapper
ViewMgr
+ CreateLayout()+ GetWindow()+ OnUpdate()......
Init()、Logic()
组合
FightHpChangeData
+ bool hasHp+ star::i64 attID+ star::i64 tagID+ star::i64 hpCur......
Process()
StickModule
+ OnInit()+ Update()+ showstick()+ stick_move()......
- StickView* stick_- int posx_- int posy_......
GlobalParam
+ InitClientCfg()+ GetInfoResVersion()+ GetInfoCodeVersion()+ GetVerResVersion()......
CClientDataLoader
GameStateLogin
onInit()、Logic()
GameStateSelectRole
SCFightDotHpChg
FrameState
- draw_call_- fps_- triangle_num_- draw_call_detail_- triangle_num_detail_
GameActorCreateManager
+ CreateObj()+ Process()+ CreateObjList()......
- int human_show_count_- int npc_show_count_- int create_obj_time_......
run()
SystemClient
+ initEngine()+ onSize()+ setFrameBufferScale()+ renderOneFrame()+ getRootPath()+ getCurrentTime()+ getFrameTime()+ getFPS()+ openXMLResourceFile()+ GetPureFilename()+ GetFileDirPath()+ IsFileExist()+ PlayBackGroundSound()+ StopSound()+ hasScene()+ IsPointInScreen()+ PlayVideo()+ NavLoadMesh()+ NavSetIncludeFlag()+ NavAddAgent()+ NavRemoveAgent()+ NavRemoveAllAgent()+ NavUpdateAgentOnly()+ NavRaycast()+ NavFindPath()+ NavGetPosion()......
GameObjPanelManager
+ CreateObjPanel()+ SetTitleText()- ShowHumanVip()......
SkillData
+ PaseConfig()+ PaseSkillLogic()+ PaseSkillHitData()
- int sn- star::String name- star::String icon- int skill_type......
各个data类,分别对应各个obj
GameBuddyDataGameCommonDataGameCommonUnionDataGameConvoyDataGameDropDataGameEffectDataGameHeroDataGameHumanDataGameMarryCarDataGameMarryDataGameMarryHorseDataGameMonsterDataGameNpcDataGamePickDataGameTriggerData......
GameBuddy
+ Create()+ PlayAction()+ ActorCreate()......
- bool is_anim_tween_
InputGeometryData
+ getVerts()+ getTris()+ getVertCount()+ getTriCount()+ addVertex()+ addTriangle()
- float*\tm_verts- int*\t\tm_tris- int\t\tm_vertCount- int\t\tm_triCount
借助Recast Navigation这个第三方寻路工具而建立的工具类
物体头顶上的血条数据管理类
GameNpc
+ Create()+ UpdateState()+ IsRealShow()
UIRenderEffect
+ Play()+ Stop()+ SetScale()......
- float scale_x_- float scale_y_- LORD::UIEffectClient* effect_......
SkillModule
+ OnInit()+ Update()+ UseSkill()+ SkillNum()......
- int cd_skill_sn_- int cd_skill_time_......
工具类或接口头文件
ItemData
+ ParseServerMsg()+ ParseConfItem()+ SetPropVal()+ GetPropInt()+ GetPropString()+ id()+ id_str()......
- i64 id_- String id_str_- PropData prop_- PropData prop_random_- PropData prop_random_conf_- ItemRuleData rule_item_......
GameStateMgr
+ ChangeState()+ OnUpdate()+ OnSocketSendError()+ current_state()+ get_state()+ create_state()+ switch_state()......
- bool dirty_- int target_type_- GameState* current_state_- bool key_board_enable_
WinMain()
GameCommonUnion
+ UpdateModel()+ Create()+ IsMyActor()
ActorClient
+ CreateActor()+ DestroyActor()+ RayPickActor()+ AttachChildActor()+ AddChildMesh()+ DeleteChildMesh()+ AddPluginEffect()+ PlaySkill()+ HasSkill()+ SetUserData()+ SetPosition()+ GetPosition()......
- void* const m_pActor- void* m_Data
各个mgr类,分别对应各个obj
GameActorCreateManagerGameBuddyManagerGameCommonManagerGameConvoyManagerGameDropManagerGameEffectManagerGameHeroManagerGameHumanManagerGameMonsterManagerGameNpcManagerGameObjBloodManagerGameObjPanelManagerGamePickManagerGameTriggerManager......
同时继承自Singleton和AllocatedObjectBase
LuaViewCreateManager
+ CreateSlotView()+ CreateSlotGridView()+ CreateBagGridView()+ DestoryView()......
- ViewList list_view_
SceneMapModule
+ CreateSceneMap()+ GetSceneMap()+ OnUpdate()......
- SceneMaps scene_maps_
这个头文件里面写着一些公共类比如ActorClient等
GameConvoy
+ Process()+ Create()......
- int sn_npc_- star::i64 id_follow_......
继承
GameWoundTextManager
+ AddWoundText()+ Process()+ ClearWoundText()+ SetWoundTextInfo()......
GameObjDataManager
+ UpdateHeroData()+ GetTagData()+ GetPickListBySN()+ GetNearPickID()+ GetAllTagIdStr()+ data_scene()+ data_hero()......
+ int fight_msg_count
OnUpdate()
StoryLineData
+ Process()+ PaseData()- Play()......
- String type- Vector3 initPos- Vector3 initFace
setup()
输出信息、指令或请求到客户端平台SDK
SkillSequenceData
+ ParseDSkillSequence()
- int sn- int pos- star::String icon......
CEGUI::ScriptModule
GameObjBloodManager
+ CreateGameObjBlood()+ BloodChange()- UpdateMonsterBlood()......
继承自AllocatedObjectBase
MsgStreamMgr
+ Stream2Msg()+ Byte2Int()+ Int2Byte()
初始化各个excel配置表的配置类,主要在Init里面初始化JsonCpp生成的json类
GameHuman
+ Process()+ Create()+ UpdatePosition()......
- LORD::ActorClient* ride_- bool rided_- LORD::ActorClient* artifact_- int weapon_effect_key_......
CEGUI::System
+ setScriptingModule()
GameModule
+ OnEventMessage()+ OnUpdate()+ OnServerHandler()+ SendServerMsg()......
GameObjLogicMoveHero
+ Process()+ Stop()+ StartMove()+ StartKongfuMove()+ CalculationPos()......
- bool path_has_tag_- Vector3 path_pos_tag_- String path_param_
SlotBodyData
+ ParseServerMsg()+ exp_cur()+ id_str()......
- i64 slot_id_- String id_str_- i32 slot_pos_......
开始
GameScene
+ Create()+ LoadNav()+ IsCurScene()+ sn()+ res()+ name()......
- int sn_- String res_- String name_- const char* type_......
客户端平台SDK(比如ios、android)的接入类,有断线重连、进入后台等功能的入口
GameStateSelectServer
StoryLineDataCamera
- bool restore_- Vector3 init_camera_dir_- Vector3 init_camera_pos_
状态机控制器
StoryMainData
+ Process()+ LoadStory()+ PlayCameraZoom()......
- ListStoryLineData story_line_list- StoryLineDataCamera* cameraData- StoryLineDataHero* heroData- int tatol_time- int curr_time
AlertModule
+ OnInit()+ ShowSysAlert()+ Update()......
- MarQuee* horse_alert_- PopAlert* pop_alert_......
GameSceneData
+ PaseServerMsg()+ SetData()+ PaseXml()+ GetNpcPointListStr()+ GetMonsterPointListStr()+ PaseData()+ id()+ sn()......
- star::i64 id_- int sn_- int nav_name_- int conf_name_- int max_height_- int min_height_......
GameStateCreate
BuffData
+ PaseData()+ id()+ sn()......
- star::String name_- star::String des_- int type_......
GameMarry
+ UpdateFollowPos()
- int last_update_follow_time_
GameHeroManager
+ Process()+ UpdateObjData()+ StartDirGuide()+ OnInfoChange()+ PlayDeath()+ hero_obj()+ hero_data()+ StartMove()+ StartJump()+ StartPush()+ StartJumpCharge()+ StartMove()......
- GameHero* hero_obj_- GameHeroData* hero_data_- i64 hero_id_- bool move_tag_has- Vector3 move_tag_- Vector3 move_end_pos_- String move_param_- int move_type_- bool is_move_- bool is_dir_- float dir_angel_......
准确是GameObjManager调用GameObj
如果处理GameObj的数据会调用GameObjDataManager的方法,这个类里没有写数据处理和存储
GameCommon
+ UpdateState()+ Create()+ UpdatePosition()
SDKInterfaceOut
+ BackToLogin()+ PopupLogin()+ AccountManager()+ GameSocial()+ GamePay()+ GoToUrl()+ GameLocalNotification()+ PlayMovie()+ StopMovie()+ UnZipFolder()+ ExitGame()+ SetMediaPakMD5()+ SetGameFPS()+ GetInternationalType()+ CloseKeyboard()+ GetConnectedState()+ DownLoadHeroInfo()+ gotoEvaluate()......
FightModule
+ OnUpdate()+ OnGetThrowMsg()+ OnInit()......
CameraAnimClient
+ CreateInstance()+ DestroyInstance()+ play()+ stop()......
- void* const m_pCameraAnim
SkillThrowData
- bool is_have- star::String res_atter_model- star::String res_atter_point- star::String res_hurt_play
SceneMap
+ CreateSceneMap()+ Update()+ UpdataNpcData()+ SetIcon()+ IsCurrentScene()......
- i32 map_sn_- float scene_width_- float scene_height_......
类名或.h文件名
+ 公共方法- 私有或保护方法
+ 公共成员变量- 私有或保护成员变量
CEGUI::EventSet
GameScenePoint
+ PaseJson()+ PosX()+ PosY()+ PosZ()......
+ String key+ int sn+ String name+ String type......
QuestDataManager
+ OnUpdateQuest()+ GetTagQuest()+ AddQuest()+ DelQuest()+ list_accepted()+ list_accept_can()......
- QuestDataList list_accepted_- QuestDataList list_accept_can_- String str_accepted_- String str_accept_can_- bool is_change_......
VoiceModule
+ Update()+ OnPlayRecordStart()......
SkillBreakData
- int type- int start_time- star::vector::type break_list
负责播放、停止剧情,发送停止消息
GameApp
+ run()+ setup()+ onInit()+ initWindow()+ Logic()+messageHandler()
GameObjModule
+ OnInit()+ OnUpdate()+ OnEnterStage()+ OnLoadingFinish()+ OnPosChange()+ OnQuestAddCanAccept()+ OnQuestComplete()+ OnQuestFinish()+ OnQuestUpdate()+ OnQuestTrigger()+ OnHeroStateChange()+ OnClickActor()
- GameObjListener listener_- ConfChangeMap path_find_manager_- star::i64 selected_id_- GAME_OBJ_TYPE selected_type_......
SlotMgr
+ ServerMsgInit()+ GetSlotNum()+ GetSlotByIndex()......
- star::vector::type slot_vec_
网络和Socket
LuaScriptModule
+ create()
BBZS_Lua_Loader()
SkillFlyData
- bool is_have- int timeLast- int timeFlyUp......
GameMouse
+ Process()+ Play()......
- LORD::ActorClient* actor_- star::String res_- int time_show_
用来测试程序和调试的类,查看当前程序的性能比如drawCall数等
SCFightSkill
模板 CEGUI::Singleton
GameMarryTwo
- LORD::ActorClient* actor_two_- LORD::ActorClient* actor_eff2_- float tween_angle_
PropData
+ CopyFrom()+ CreatePropData()+ ParseDProp()+ GetPropString()......
- i32 prop_
SkillSpecialData
- bool is_have- star::String bind- star::String type......
BuffModule
+ AddBuff()+ DelBuff()+ HasBuff()......
GameObjLogicMove
+ Process()+ Stop()+ StartMove()+ CalculationPos()+ GetCurrPoint()......
- SPathList path_list_- PathPoint path_point_- Vector3 path_point_center_......
ClientSocketManager
+ initialize()+ destroy()+ createClientSocket()+ destroyClientSocket()+ getLastErrorCode()
物体头顶上的血条、文字UI管理类
GameObjStateControl
+ Process()+ AddState()+ OnSkillMsg()+ OnHit()+ OnModelChange()+ curr_state_data()......
- GameObjStateData* curr_state_data_- GameObjStateData* next_state_data_- GameObjStateBase* run_state_......
StickView
+ OnShow()+ OnHide()+ StickMainLogic()+ ValidTouch()......
- CEGUI::Window * stick_layout_- CEGUI::PushButton * stick_btn_- CEGUI::Window * stick_bg_......
GameMarryCar
+ ChangeModel()+ PlayAction()......
- LORD::ActorClient* actor_1_- LORD::ActorClient* actor_2_......
SceneMapData
+ static SceneMapData* Instance+ LoadMapConfig()+ GetMonsterInfo()+ GetNpcInfo()+ GetPlayerInfo()......
- vector::type monsters_info_- vector::type npcs_info_- vector::type players_info_- vector::type stage_switch_
GameHero
+ Process()+ UpdatePosition()+ PlayAction()......
- Vector3 dir_eff_pos_- String quest_eff_accept_- LORD::ActorClient* actor_dir_......
SkillChargeData
- bool is_have- int start_time- int end_time......
场景控制
关联(调用)
GameSceneManager
+ OnUpdate()+ CreateScene()+ GetXmlData()+ GetPoint()+ LoadScene()+ SendStageEnter()+ SendLoadingFinish()+ PaseXml()+ scene()+ scene_data()+ old_scene_sn()......
- GameSceneData scene_data_- int switch_secne_sn_- int old_scene_sn_- int new_scene_sn_- i64 new_scene_id_- bool is_enter_- bool is_finish_- int loading_state_......
GameObjBloodInfo
EventMgr
+ AddEvent()+ Fire()+ DelEvent()......
DynPointLightClient
+ CreateInstance()+ DestroyInstance()+ setPosition()+ setParam()
- void* const m_pPointLight
ClientSocket
+ getIp()+ getPort()+ getIpString()+ Connect()+ Send()+ Recv()+ SetNonBlocking()+ SetReuseAddr()......
- star::String addr_- star::ui32 port_- SOCKET socket_- int time_out_
game_enum_def.h
+ static const star::String ACT_STAND = \"stand\"+ static const star::String ACT_ATK_STAND = \"wait\"......+ enum GAME_OBJ_STATE_TYPE+ enum GAME_OBJ_STATE_LOGIC_TYPE+ enum GAME_OBJ_TYPE+ enum TASK_TYPE......
ItemMgr
+ ServerMsgInit()+ ItemBagNum()+ ItemBagIndex()+ ItemEquipNum()+ ItemBuddyNum()+ ItemMentalNum()+ ItemCollectionNum()+ ItemUniqueWeaponNum()+ GetItemByID()+ GetItemData()+ AddItem()+ DelItem()......
- ITEM_LIST item_bag_- ITEM_LIST item_equip_- ITEM_LIST item_buddy_- ITEM_LIST item_buddy_token_- ITEM_LIST item_mental_- ITEM_LIST item_collection_- ITEM_LIST item_unique_weapon_- star::vector::type equipt_new_vec_
GameObjStateApper
+ CheckNextState()+ Play()+ PreCheckState()......
run:主循环,这里面有一个最主要的while,while里面执行Logic()setup:初始化的入口,初始化音效系统、SDK的接入onInit:初始化脚本环境如LuainitWindow:初始化PC上程序的窗口比如分辨率、屏幕适配等Logic:执行游戏逻辑,里面主要是调用了Game类的Logic方法messageHandler:win32程序或引擎提供的事件回调接口,所有的点击或按键事件的入口都在这里面
CMsgIDMgr
+ InitMsg2ID()+ AddMsg2IDEle()+ GetIDByMsg()+ GetMsgByID()
- MSG2IDMAP moMsg2ID
GameObjStateData
+ GAME_OBJ_STATE_TYPE type+ int fly_time_total+ int skill_sn+ int start_time_......
UIEffectClient
+ CreateInstance()+ DestroyInstance()+ setRotation()+ UpdateAndRender()+ isStopped()
CGameTickerMgr
+ RegisterTicker()+ UnregisterTicker()+ PushTickOnce()......
ParamDataMgr
+ ServerMsgInit()+ GetParamStr()+ role_id_str()+ vit_buy_num()......
- bool payfirst_- int starIronExp_- int strengthGoldCost_- int strengthCoinCost_- int refineStoneSn_- String clientParams_......
GameObjLogicBase
+ Process()+ Stop()+ SetControl()+ control_id()+ is_play()......
- GameObjData* control_data_- star::i64 control_id_- GAME_OBJ_TYPE control_type_......
GameObjBaseManager
+ CreateObj()+ UpdateObjData()+ Process()+ GetTagObj()+ OnInfoChange()+ StartMove()+ StartJump()+ StartPush()+ StopMove()......
- GAME_OBJ_TYPE type_- GameObjMap map_obj_- GameObjDataMap map_obj_data_- int max_count_- GameObjTypeIDList obj_type_id_list_......
ItemModule
NetWorkMgr
+ OnInitialize()+ Connect()+ ProcessMsg()......
接收&处理语音聊天逻辑
StringUtil
+ ToString()+ ParseFloat()+ ParseDouble()+ Replace()+ Split()+ Format()+ StartWith()+ EndWith()+ Equal()......
UI层级管理类
注释
网络管理器,负责socket的建立、连接和网络消息的解析
GameEffect
+ ActorCreate()+ UpdatePosition()......
- StringArray list_effect_name_
SDKInterfaceIn
+ OnUpdate()+ PlatformQuitGame()+ SetNewVersion()+ GetNewVersion()+ EnterBackground()+ EnterForeground()+ OnReconnect()......
- std::string mstrSDKAccount- std::string mStrQuDao- bool bNewVersion- std::string m_sAlertTxt- std::string loginjson_mac_- bool m_keycode_show
其他游戏状态(即非进入游戏前)
BloodModule
+ OnInit()+ UpdateObjBlood()+ ShowObjBlood()......
onInit()
获取各类obj的data数据。由于是单例类,这个类在代码中多数地方是被其他模块直接获取实例
单例类,继承自Singleton
CGameWoundManager
+ Process()+ PlayBlood()+ ShowBlood()......
- BloodPackList bloodlist_- SNumSplinter splinter_
网络消息加密解密类
客户端全局类,提供了各种各样的引擎的接口比如获得当前帧速率、文件目录等
事件类,用于添加、删除、广播事件
GameHumanData
+ PaseServerData()+ Process()+ Sit()+ can_skill()+ can_attack()+ vip_level()+ exp()+ union_id()+ sit_state()+ is_married()+ countryId()......
- bool can_skill_- bool can_attack_- bool can_attack_local_- int evil_- bool robot_- int combat_- PropData* pro_data_- star::i64 exp_- star::i64 exp_upgrade_- i64 union_id_- String union_name_- int pegasus_sn_- int\t countryid_......
0 条评论
下一页