GameEnum.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. // 在需要使用的项目里, 直接这样require
  2. // var RoomState = require("asdasd").RoomState
  3. var RoomState = cc.Enum({
  4. Invaild: 0,
  5. Lock: 1,
  6. UnLock: 2,
  7. Update: 3,
  8. Full: 4,
  9. WatchVideo: 5
  10. });
  11. /**
  12. * 网络回调状态码 code
  13. */
  14. var ResponseStateCode = cc.Enum({
  15. LOGIN_INVALIDATE: -5,
  16. OK: 0,
  17. });
  18. //主线任务状态[0 : 未完成, 1 : 完成可领取, 2 : 完成已经领取]
  19. var QuestMainMissionType = cc.Enum({
  20. NoFinished: 0,
  21. CanGain: 1,
  22. AlreadyGet: 2
  23. });
  24. //每日任务状态[0 : 完成可领取, 1 : 未完成, 2 : 完成已经领取]
  25. var QuestDailyMissionType = cc.Enum({
  26. CanGain: 0,
  27. NoFinished: 1,
  28. AlreadyGet: 2
  29. });
  30. //任务状态[0 : 完成可领取, 1 : 未完成, 2 : 完成已领取]
  31. var InviteMissionItemType = cc.Enum({
  32. Gain: 0,
  33. NoFinished: 1,
  34. Finished: 2
  35. });
  36. //新手教程提示框文字[0 : 上方箭头在左, 1 : 上方箭头在右, 2 : 下方箭头在左]
  37. var HomeGuideDialogType = cc.Enum({
  38. TopLeft: 0,
  39. TopRight: 1,
  40. BottomLeft: 2
  41. });
  42. //新手教程箭头方向[0 : 上, 1 : 右, 2 : 下,3 : 左]
  43. var HomeGuideArrowType = cc.Enum({
  44. Top: 0,
  45. Right: 1,
  46. Bottom: 2,
  47. Left: 3
  48. });
  49. //点击分享的操作
  50. var WechatShareType = cc.Enum({
  51. None: 0,
  52. ResetSkill: 1, //重置技能
  53. DrawLottery: 2, //分享抽奖
  54. StoreGetGift: 3, //商店分享获得奖励
  55. OfflineIncome: 4, //离线收益
  56. InviteFriend: 5, //邀请好友
  57. LoginReward: 6, //七天登录分享奖励
  58. UpBuilding: 7, /// 升级房间等级奖励
  59. BuyStar: 8, /// 购买明星
  60. UpRoomLevel: 9, ///升级楼层等级
  61. FriendHelp: 10, //好友助力
  62. drawShare: 11, //抽奖分享炫耀
  63. buyStar: 12, /// 购买明星炫耀
  64. });
  65. //视频广告的状态
  66. var ADVideoLoadState = cc.Enum({
  67. success: 0, /// 视频load成功
  68. fail: 1, /// 视频加载失败
  69. closeFail: 2, /// 没有正常完成关闭
  70. closeFinish: 3, /// 正常完成关闭
  71. });
  72. //明星类型
  73. var StarType = cc.Enum({
  74. None: 0,
  75. Common: 1, //普通
  76. Draw: 2, //抽奖
  77. Gift: 3 //礼包
  78. });
  79. var ReportType = cc.Enum({
  80. ID: "roomId",
  81. // 上报事件类型, 0是普通上报, 1是升级建筑
  82. Event: "cmd",
  83. Seq: "seq",
  84. /** 总金额 */
  85. Gold: "gold",
  86. /** 星星数 */
  87. Stars: "s",
  88. /** 建筑 */
  89. Build: "userRooms",
  90. /** 建筑 */
  91. UnLockBuild: "ub",
  92. /** 建筑等级 */
  93. Level: "roomLevel",
  94. /** 事件戳 */
  95. Timestamp: "t",
  96. /** 未收金币的次数 */
  97. NotPickupCoinCount: "cc",
  98. /** 手动点击获取金币次数 */
  99. ClickCount: "clickCount"
  100. });
  101. const GameNotificationKey = cc.Enum({
  102. /** 显示好友系统 */
  103. ShowFriendSystem: "show_friend_system",
  104. /** 访问好友家园 */
  105. VisitFriendHome: "visit_friend_home",
  106. /** 返回自己家园 */
  107. BackOwnerHome: "back_owner_home",
  108. /** 处理通过点击分享链接进入游戏的各种操作 */
  109. ProcessShareAction: "process_share_action",
  110. /** 显示用户信息 */
  111. ShowUserInfomation: "show_user_information",
  112. /** 升级建筑 */
  113. RoomUpdate: "room_update",
  114. /** 重新刷新首页数据 */
  115. HomeReloadData: "home_reload_data",
  116. /** 更新首页数据 */
  117. HomeUpdateData: "home_update_data",
  118. /** 数据上报 */
  119. UserReportGross: "user_report_gross",
  120. /** 刷新好友列表 */
  121. RefreshFriendList: "refresh_friend_list",
  122. /** 打开亲密度相关页面 */
  123. ShowInteraction: "show_user_interaction",
  124. ShowJobPage: 'show_job_page',
  125. BeginArtistTrain: 'BeginArtistTrain',
  126. /** 用户收取金币 */
  127. UserCollectCoin: "user_collect_coin",
  128. /** 打开亲密度相关页面 */
  129. RefreshUserInformation: 'RefreshUserInformation',
  130. /** 培养完成 */
  131. ArtistTrainCompletion: 'ArtistTrainCompletion',
  132. /** 播放成功的动画 */
  133. PlaySuccessAnimation: "PlaySuccessAnimation",
  134. ShowJobPageFromTalent: "show_job_page_from_talent",
  135. /** 显示物品描述 */
  136. ShowPropDesc: "show_prop_desc",
  137. /** 关闭物品描述 */
  138. HidePropDesc: "hide_prop_desc",
  139. /** 刷新背包列表未选中状态*/
  140. RefreshPackItem: "refresh_item_normal",
  141. /** 打开背包*/
  142. OpenPack: "open_pack",
  143. /** 装备卡片*/
  144. InsertCardToUser: "insert_card_to_user",
  145. /** 刷新背包物品数量*/
  146. RefreshPackInfo: "refresh_pack_info",
  147. /** 刷新入驻艺人列表样式 */
  148. ChangeArtistResidentState: "ChangeArtistResidentState",
  149. /** 刷新插卡界面显示*/
  150. RefreshInsertCardsInfo: "refresh_insert_cards_info",
  151. /** 全局history后退 */
  152. HistoryBack: "history_back",
  153. ShowCityMap: "show_citymap",
  154. /** 触发入驻成功通知 */
  155. NoticeRoleOpt: "NoticeRoleOpt",
  156. /** 入驻艺人 */
  157. ResidentArtist: "ResidentArtist",
  158. /** 更新我的入驻艺人列表 */
  159. RefreshLevelHomeArtistList: "RefreshLevelHomeArtistList",
  160. RefreshArtistManagerList: "RefreshArtistManagerList",
  161. CurrentCompanyMax: 'current_company_max',
  162. // 单个建筑满级时的通知
  163. LevelHomeItemBuildingFull: "LevelHomeItemBuildingFull",
  164. // 当所有建筑都满级时的通知
  165. LevelHomeItemBuildingAllFull: "LevelHomeItemBuildingAllFull",
  166. // 刷新入驻艺人列表
  167. RefreshResidentArtistList: "RefreshResidentArtistList",
  168. showCatFlyAnimation: 'show_cat_fly_animation',
  169. afterCatFly: 'after_cat_fly',
  170. PlayUpdateCoinAnimation: 'PlayCoinAnimation',
  171. ReloadLevelHomeData: "ReloadLevelHomeData",
  172. ResetLevelHomePaddingBottom: 'ResetLevelHomePaddingBottom',
  173. // 星探任务领取奖励通知
  174. InviteGainAward: 'InviteGainAward',
  175. // 离线收益动画
  176. HandleOfflineIncomeAnim: 'HandleOfflineIncomeAnim',
  177. //点击招财猫
  178. ClickAddMoney: 'click_add_money',
  179. //解锁、升级建筑刷新数据
  180. RefreshBuildingData: 'refresh_building_data',
  181. //tabbar点击招财猫
  182. TabbarClickCat: 'tabbar_click_cat',
  183. //楼层一级的时候解锁
  184. UnlockLevelHome: 'unlock_level_home',
  185. //自动点击加金币
  186. AutoClickGold: 'auto_click_gold',
  187. /// 升级总部大楼
  188. UpBuildingLevel: 'up_building_level',
  189. ///使用实时技能
  190. UseTimeSkill: 'use_time_skill',
  191. ///升级或解锁固定技能
  192. UpdateFixationSkill: 'update_fixtion_skill',
  193. /// 升级实时技能
  194. UpdateTimeSkill: 'update_time_skill',
  195. /// 第三个技能使用完毕
  196. SkillThreeHasDone: 'skill_three_hasDone',
  197. /// 明星入驻房间
  198. StarEnterRoom: 'star_enter_room',
  199. /// 重置技能
  200. ResetSkill: 'reset_skill',
  201. ///获取房间的里程碑
  202. GetRoomAward: 'get_room_award',
  203. ///获取房间的里程碑或总部里程碑显示提示
  204. GameShowAdditionTips: 'game_show_addition_tips',
  205. ///显示群排行
  206. GameShowGroupRank: 'game_show_group_rank',
  207. /// 游戏红点更新
  208. GameRedDotUpdate: 'game_redDota_update',
  209. //// 游戏重新回到前台的通知
  210. GameShowNotificationKey: 'game_show_notification_key',
  211. //// 游戏重新回到前台判断使用技能状态
  212. GameSkillOnHide: 'game_skill_on_hide',
  213. /// 单个明星离开房间
  214. StarLeaveRoom: 'star_leave_room',
  215. /// 全部明星离开房间
  216. AllStarLeaveRoom: 'all_star_leave_room',
  217. /// 分享操作
  218. ShowShareAction: 'show_share_action',
  219. ///更新信息流数据
  220. GameUpdateMessageList: 'game_update_messageList',
  221. GameUpdateStarContentBuyGold: 'game_update_star_content_buyGold',
  222. //
  223. LoginRewardGainOneDay: 'LoginRewardGainOneDay',
  224. //
  225. LoginRewardGainFinish: 'LoginRewardGainFinish',
  226. /// 广告刷新状态
  227. AdUpdateStateNotification: 'AdUpdateStateNotification',
  228. /// 总部大楼的广告状态需要更新
  229. AdBuildingStateUpdate: 'ad_bulding_state_update',
  230. /// 明星的广告状态需要更新
  231. AdStarStateUpdate: 'ad_star_state_update',
  232. /// 房间的广告状态需要更新
  233. AdRoomStateUpdate: 'ad_room_state_update',
  234. ///刷新签约明星列表数据
  235. RefreshSignArtistList: 'refresh_sign_artist_list',
  236. ///
  237. GainFriendHelpClick: 'gain_friend_help_click'
  238. });
  239. var LevelHomeFriendItemStyle = cc.Enum({
  240. AllFriend: 1,
  241. Friend: 2,
  242. Talent: 3, // 星探
  243. Artist: 4,
  244. });
  245. /** 场景节点地图 */
  246. const SenceMap = cc.Enum({
  247. /** 我的家园界面 */
  248. LevelHome: "sence_levelHome",
  249. /** 用户详细信息 */
  250. UserPanel: "sence_userPanel",
  251. /** 好友系统、好友推荐Tab等 */
  252. FriendSystem: "sence_friendSystem",
  253. /** 好友家园界面 */
  254. FriendHome: "sence_friendHome",
  255. /** 突破界面 */
  256. BreakOut: "sence_breakOut",
  257. /** 转职界面 */
  258. JobChange: "sence_jobChange",
  259. /** 星探界面 */
  260. Finder: "sence_finder"
  261. })
  262. // type:1为商品购买通知,2为主线任务通知,3为每日任务通知,4:为技能可使用或可重置的通知,5为可进行抽奖的通知,6为可以免费分享购买砖石的通知,7为可以免费分享购买金币的通知
  263. const GameRedDot = cc.Enum ({
  264. /// 商品购买通知红点
  265. shop: 1,
  266. ///主线任务通知
  267. mainTask: 2,
  268. /// 每日任务通知
  269. dayTask: 3,
  270. ///技能可使用或可重置的通知
  271. // skill: 4, 不用了
  272. /// 抽奖时间到了
  273. draw: 5,
  274. ///商城可以免费购买钻石的通知
  275. storeDiamond: 6,
  276. /// 商城可以免费获得金币的通知
  277. storeCoin: 7,
  278. /// 客户端字段
  279. star: 8,
  280. /// 邀请好友
  281. inviteFriend: 9,
  282. ///七天登陆
  283. sign: 10,
  284. /// 好友助力
  285. friendAward: 11,
  286. ///每天奖励
  287. award: 12,
  288. });
  289. // 将需要导出的枚举用这种方式exports给外界使用
  290. module.exports.RoomState = RoomState;
  291. module.exports.QuestMainMissionType = QuestMainMissionType;
  292. module.exports.QuestDailyMissionType = QuestDailyMissionType;
  293. module.exports.InviteMissionItemType = InviteMissionItemType;
  294. module.exports.HomeGuideDialogType = HomeGuideDialogType;
  295. module.exports.HomeGuideArrowType = HomeGuideArrowType;
  296. module.exports.WechatShareType = WechatShareType;
  297. module.exports.StarType = StarType;
  298. module.exports.ResponseStateCode = ResponseStateCode;
  299. module.exports.ReportType = ReportType;
  300. module.exports.GameNotificationKey = GameNotificationKey;
  301. module.exports.LevelHomeFriendItemStyle = LevelHomeFriendItemStyle;
  302. module.exports.SenceMap = SenceMap;
  303. module.exports.GameRedDot = GameRedDot;
  304. module.exports.ADVideoLoadState = ADVideoLoadState;