You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
288 lines
10 KiB
288 lines
10 KiB
|
3 weeks ago
|
import { EventTarget } from "cc";
|
||
|
|
|
||
|
|
export class GEvent extends EventTarget {
|
||
|
|
|
||
|
|
private constructor() { super(); }
|
||
|
|
private static _ins: GEvent = null;
|
||
|
|
public static get Ins() {
|
||
|
|
if (!this._ins) this._ins = new GEvent();
|
||
|
|
return this._ins;
|
||
|
|
}
|
||
|
|
|
||
|
|
//-------------------------通用事件-----------------------------
|
||
|
|
|
||
|
|
/**全局触摸事件-开始 */
|
||
|
|
static GlobalTouchStart = "GlobalTouchStart";
|
||
|
|
/**全局触摸事件-移动 */
|
||
|
|
static GlobalTouchMove = "GlobalTouchMove";
|
||
|
|
/**全局触摸事件-结束 */
|
||
|
|
static GlobalTouchEnd = "GlobalTouchEnd";
|
||
|
|
/**全局触摸事件-取消 */
|
||
|
|
static GlobalTouchCancel = "GlobalTouchCancel";
|
||
|
|
/** 跨天事件 */
|
||
|
|
static CrossDay = "CrossDay";
|
||
|
|
|
||
|
|
/** 语言切换事件 */
|
||
|
|
static EVENT_LANG_CHANGE = "onLanguageChange";
|
||
|
|
|
||
|
|
/** 游戏开始 */
|
||
|
|
static GameStart = "GameStart";
|
||
|
|
/** 游戏结束 */
|
||
|
|
static GameOver = "GameOver";
|
||
|
|
/** 游戏暂停 */
|
||
|
|
static GamePause = "GamePause";
|
||
|
|
/** 游戏恢复 */
|
||
|
|
static GameResume = "GameResume";
|
||
|
|
/** 游戏重新开始 */
|
||
|
|
static GameRestart = "GameRestart";
|
||
|
|
/** 游戏复活 */
|
||
|
|
static GameReborn = "GameReborn";
|
||
|
|
/** 复活成功发放桃子(参数:数量 number) */
|
||
|
|
static RevivePeachGrant = "RevivePeachGrant";
|
||
|
|
/** 下一关 */
|
||
|
|
static GameNext = "GameNext";
|
||
|
|
/** 道具数量发生变化 */
|
||
|
|
static UpdateItemNum = "UpdateItemNum";
|
||
|
|
|
||
|
|
/** 显示网络UI */
|
||
|
|
static SHOW_NET_UI = "SHOW_NET_UI";
|
||
|
|
/** 关闭网络UI */
|
||
|
|
static HIDE_NET_UI = "HIDE_NET_UI";
|
||
|
|
|
||
|
|
/**显示loading */
|
||
|
|
static SHOW_LOADING = "SHOW_LOADING";
|
||
|
|
/**隐藏loading */
|
||
|
|
static HIDE_LOADING = "HIDE_LOADING";
|
||
|
|
/**强制隐藏 loading(ref 失配等兜底,由 GameLaunch 监听) */
|
||
|
|
static FORCE_HIDE_LOADING = "FORCE_HIDE_LOADING";
|
||
|
|
|
||
|
|
/** 小游戏平台 onShow(由 SDKManager 派发,AppLifecycle 监听) */
|
||
|
|
static PLATFORM_SHOW = "PlatformShow";
|
||
|
|
/** 小游戏平台 onHide(由 SDKManager 派发,AppLifecycle 监听) */
|
||
|
|
static PLATFORM_HIDE = "PlatformHide";
|
||
|
|
|
||
|
|
|
||
|
|
//-------------------------剧情事件-----------------------------
|
||
|
|
/**剧情任务完成 */
|
||
|
|
static StoryTaskFinish = "StoryTaskFinish";
|
||
|
|
/**开始剧情演绎 */
|
||
|
|
static StartStory = "StartStory";
|
||
|
|
/**开始微信聊天 */
|
||
|
|
static StartWXChat = "StartWXChat";
|
||
|
|
/**剧情步骤触发时 */
|
||
|
|
static OnStoryStep = "OnStoryStep";
|
||
|
|
/**任务更新 */
|
||
|
|
static OnTaskUpdate = "OnTaskUpdate";
|
||
|
|
/**显示剧情字幕 */
|
||
|
|
static OnStoryText = "OnStoryText";
|
||
|
|
/**游戏逻辑天数刷新 */
|
||
|
|
static ChangeDay = "ChangeDay";
|
||
|
|
/**剧情滑动结束 */
|
||
|
|
static StorySlideEnd = "StorySlideEnd";
|
||
|
|
/**剧情拖动结束 */
|
||
|
|
static StoryDragEnd = "StoryDragEnd";
|
||
|
|
/**剧情重新开始 */
|
||
|
|
static StoryRestart = "StoryRestart";
|
||
|
|
/**任务跳过 */
|
||
|
|
static OnTaskSkip = "OnTaskSkip";
|
||
|
|
|
||
|
|
//-------------------------游戏事件-----------------------------
|
||
|
|
/**每秒收益 */
|
||
|
|
static AllProfit = "AllProfit";
|
||
|
|
/**飞钱 */
|
||
|
|
static FlyMoney = "FlyMoney";
|
||
|
|
/** 秒更新 */
|
||
|
|
static SecondUpdate = "SecondUpdate";
|
||
|
|
|
||
|
|
static NormalMoveCheck = "NormalMoveCheck";
|
||
|
|
static DirectTouchMoveCheck = "DirectTouchMoveCheck";
|
||
|
|
|
||
|
|
//-------------------------战斗游戏-----------------------------
|
||
|
|
/**更新战力 */
|
||
|
|
static UpdateCombatPower = 'UpdateCombatPower';
|
||
|
|
/**更新体力 */
|
||
|
|
static UpdateVigour = 'UpdateVigour';
|
||
|
|
/**更新金钱 */
|
||
|
|
static UpdateMoney = 'UpdateMoney';
|
||
|
|
/**更新钻石 */
|
||
|
|
static UpdateDiamond = 'UpdateDiamond';
|
||
|
|
/**武器移除 */
|
||
|
|
static WeaponRemove = 'WeaponRemove';
|
||
|
|
static WeaponRemoveGM = 'WeaponRemoveGM';
|
||
|
|
/**武器使用 */
|
||
|
|
static WeaponUse = 'WeaponUse';
|
||
|
|
static WeaponUseGM = 'WeaponUseGM';
|
||
|
|
/**武器升级 */
|
||
|
|
static WeaponLevelUp = 'WeaponLevelUp';
|
||
|
|
static WeaponLevelUpGM = 'WeaponLevelUpGM';
|
||
|
|
/**怪物攻击 */
|
||
|
|
static MonsterAttack = 'MonsterAttack';
|
||
|
|
/**更新银币 */
|
||
|
|
static UpdateCoin = 'UpdateCoin';
|
||
|
|
/**增加银币 */
|
||
|
|
static AddCoin = 'AddCoin';
|
||
|
|
/**更新已死亡怪物数量 */
|
||
|
|
static UpdateDeadMonster = 'UpdateDeadMonster';
|
||
|
|
/**检查是否游戏结束 */
|
||
|
|
static CheckGameOver = 'CheckGameOver';
|
||
|
|
|
||
|
|
/**检查商店物品是否购买 */
|
||
|
|
static checkShopItem = 'checkShopItem';
|
||
|
|
|
||
|
|
//homeGuideIndex点击步骤引导
|
||
|
|
static homeGuideIndexEvent = 'homeGuideIndexEvent';
|
||
|
|
/**切换商店页面 */
|
||
|
|
static TiaoZhuanShop = 'TiaoZhuanShop';
|
||
|
|
/** 每日商店货架刷新(payload: DailyShopGoods[]) */
|
||
|
|
static DailyShopOffersRefresh = 'DailyShopOffersRefresh';
|
||
|
|
/**切换移动引导完成 */
|
||
|
|
static PlayMoveGuideFinish = 'PlayMoveGuideFinish';
|
||
|
|
/**选择难度 */
|
||
|
|
static SelectDifficult = 'SelectDifficult';
|
||
|
|
/**选择章节 */
|
||
|
|
static SelectChapter = 'SelectChapter';
|
||
|
|
/**刷新任务界面 */
|
||
|
|
static RefreshTaskView = 'RefreshTaskView';
|
||
|
|
static TiaoZhuanShop2 = 'TiaoZhuanShop2';
|
||
|
|
/**选完技能显示升级效果 */
|
||
|
|
static ShowLevelSpine = 'ShowLevelSpine';
|
||
|
|
static jumpLayerOpenBox = 'jumpLayerOpenBox';
|
||
|
|
static homeGuideIndexEventEnd = 'homeGuideIndexEventEnd';
|
||
|
|
/** 选难度引导结束:在开始战斗按钮显示手指(payload: levelId) */
|
||
|
|
static DifficultyGuideStartFinger = 'DifficultyGuideStartFinger';
|
||
|
|
|
||
|
|
/** 第4章剧情:角色升级引导完成后,补播丧尸农场入口(outline 按钮) */
|
||
|
|
static Ch4FarmOutlineGuide = 'Ch4FarmOutlineGuide';
|
||
|
|
|
||
|
|
/** GuideManger:进入某组引导的某一步(payload: IGuideSessionState) */
|
||
|
|
static GuideStepEnter = 'GuideStepEnter';
|
||
|
|
/** GuideManger:一组引导全部完成(payload: { group: number }) */
|
||
|
|
static GuideGroupComplete = 'GuideGroupComplete';
|
||
|
|
/** GuideManger:会话被终止(未完成整组,payload: { group: number; step: number }) */
|
||
|
|
static GuideSessionAbort = 'GuideSessionAbort';
|
||
|
|
|
||
|
|
//副本解锁
|
||
|
|
static UnlockChapter = 'UnlockChapter';
|
||
|
|
|
||
|
|
static EVENT_UPDATE_BUBBLE = 'EVENT_UPDATE_BUBBLE';
|
||
|
|
|
||
|
|
/**获得物品后更新获得物品弹框的逻辑 */
|
||
|
|
static UpdateGetItem = 'UpdateGetItem';
|
||
|
|
|
||
|
|
/**切换皮肤 */
|
||
|
|
static CHANGE_SKIN = 'CHANGE_SKIN';
|
||
|
|
|
||
|
|
/**增加武器图标 */
|
||
|
|
static AddWeaponIcon = 'AddWeaponIcon';
|
||
|
|
/**增加技能图标 */
|
||
|
|
static AddSkillIcon = 'AddSkillIcon';
|
||
|
|
/** 隐藏战斗图鉴引导 ui_illustrated */
|
||
|
|
static HideBattleIllustratedHint = 'HideBattleIllustratedHint';
|
||
|
|
/**更新障碍物个数 */
|
||
|
|
static UpdateObstacleNum = 'UpdateObstacleNum';
|
||
|
|
|
||
|
|
/**更新boss血量 */
|
||
|
|
static UpdateBossBlood = 'UpdateBossBlood';
|
||
|
|
|
||
|
|
|
||
|
|
/**新年签到状态改变 */
|
||
|
|
static NewYearSignChange = 'NewYearSignChange';
|
||
|
|
|
||
|
|
static UpdateLight = 'UpdateLight';
|
||
|
|
|
||
|
|
//目标任务更新
|
||
|
|
static TargetTaskUpdate = 'TargetTaskUpdate';
|
||
|
|
|
||
|
|
/**显示获取银币动画 */
|
||
|
|
static showGetCoinAnim = 'showGetCoinAnim';
|
||
|
|
|
||
|
|
/**战斗波数刷新 */
|
||
|
|
static BattleWaveRefresh = 'BattleWaveRefresh';
|
||
|
|
|
||
|
|
/**切换了皮肤 */
|
||
|
|
static SkinChange = 'SkinChange';
|
||
|
|
/**进入编辑模式 */
|
||
|
|
static EnterEdit = 'EnterEdit';
|
||
|
|
/**结束编辑,在退出编辑事件触发前执行,保证编辑数据正确后,再退出编辑模式 */
|
||
|
|
static EndEdit = 'EndEdit';
|
||
|
|
/**退出编辑模式 */
|
||
|
|
static ExitEdit = 'ExitEdit';
|
||
|
|
|
||
|
|
/**更新红点 */
|
||
|
|
static UpdateRedDotEvent = 'UpdateRedDotEvent';
|
||
|
|
/**更新智能体路径 */
|
||
|
|
static updateAgentPath = 'updateAgentPath';
|
||
|
|
/** 地图格子初始化完成(出怪口/攻击点/距离场可查询) */
|
||
|
|
static MapGridsReady = 'MapGridsReady';
|
||
|
|
|
||
|
|
/**玩家被攻击 */
|
||
|
|
static playerHit = 'playerHit';
|
||
|
|
/**切换宠物 */
|
||
|
|
static CHANGE_PET = 'CHANGE_PET';
|
||
|
|
/**玩家移动 */
|
||
|
|
static onMovePlayer = 'onMovePlayer';
|
||
|
|
|
||
|
|
/**显示boss警告 */
|
||
|
|
static showBossWarn = 'showBossWarn';
|
||
|
|
/**当前温度变更 */
|
||
|
|
static CurentTemperatureChange = 'CurentTemperatureChange';
|
||
|
|
/** 吹风机事件 */
|
||
|
|
static ChuifengjiEvent = 'ChuifengjiEvent';
|
||
|
|
/**修复完成 */
|
||
|
|
static XiufuFinish = 'XiufuFinish';
|
||
|
|
/**领取奖励 */
|
||
|
|
static ReceiveAfkRewards = 'ReceiveAfkRewards';
|
||
|
|
/**丧尸工厂等级变化 */
|
||
|
|
static ZombieLevelChange = 'ZombieLevelChange';
|
||
|
|
/**丧尸工厂层变化 */
|
||
|
|
static ZombieLayerChange = 'ZombieLayerChange';
|
||
|
|
|
||
|
|
/**显示银币飞行动画 */
|
||
|
|
static showCoinFly = 'showCoinFly';
|
||
|
|
/**捕获丧尸成功 */
|
||
|
|
static captureZombieSuccess = 'captureZombieSuccess';
|
||
|
|
|
||
|
|
static checkJuQing = 'checkJuQing';
|
||
|
|
/** 主页叠加流程末尾:引导与新英雄解锁结束后弹保留文字 */
|
||
|
|
static scheduleSaveTextOnHome = 'scheduleSaveTextOnHome';
|
||
|
|
/** 战斗内:己方字块正面 buff 特效需立即与 AttributeComp 同步 */
|
||
|
|
static syncTowerPositiveBuffFx = 'syncTowerPositiveBuffFx';
|
||
|
|
static GachaModeNextWave = 'GachaModeNextWave';
|
||
|
|
|
||
|
|
/**切换皮肤 */
|
||
|
|
static EVENT_SKIN_CHANGE = 'EVENT_SKIN_CHANGE';
|
||
|
|
|
||
|
|
/**更新主界面银币 */
|
||
|
|
static UpdateGameCoinNum = 'UpdateGameCoinNum';
|
||
|
|
|
||
|
|
/** 战斗 TimeScale 变化(暂停/慢放/恢复) */
|
||
|
|
static BattleTimeScaleChanged = 'BattleTimeScaleChanged';
|
||
|
|
/** 背包/地图拖动视觉弱化(特效近隐、怪物半透明) */
|
||
|
|
static BagDragVisualChanged = 'BagDragVisualChanged';
|
||
|
|
/** 战斗倍速切换(1x / 2x) */
|
||
|
|
static BattleSpeedChanged = 'BattleSpeedChanged';
|
||
|
|
/** 自动合成开关变化 */
|
||
|
|
static AutoMergeChanged = 'AutoMergeChanged';
|
||
|
|
|
||
|
|
/**更新角色 */
|
||
|
|
static UpdateRole = 'UpdateRole';
|
||
|
|
|
||
|
|
/** 更新首页头像 */
|
||
|
|
static UpdateHeadIcon = 'UpdateHeadIcon';
|
||
|
|
|
||
|
|
/** 段位星数变化 */
|
||
|
|
static UpdateRankStars = 'UpdateRankStars';
|
||
|
|
|
||
|
|
/**更新最佳摆放点 */
|
||
|
|
static UpdateBestPlace = 'UpdateBestPlace';
|
||
|
|
/**更新主界面 */
|
||
|
|
static UpdateMainUI = 'UpdateMainUI';
|
||
|
|
/** 名将库成品库存变化 */
|
||
|
|
static UpdateHaveEquip = 'UpdateHaveEquip';
|
||
|
|
/** 神将穿戴变化 */
|
||
|
|
static UpdateHeroEquip = 'UpdateHeroEquip';
|
||
|
|
|
||
|
|
/** @deprecated 榴莲装备引导已下线 */
|
||
|
|
static LiulianGuideIndexEvent = 'LiulianGuideIndexEvent';
|
||
|
|
}
|