GameEnum.js 10 KB

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