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