/// <summary> /// 注销并销毁 /// </summary> protected virtual void DeregisterSpawner() { Facade.DeregisterObjectSpawnPool(this); GameManagerAgent.KillObject(deactiveObjectMount); }
public virtual void ClearAll() { Facade.ClearObjectSpawnPool(this); }
public void Register() { Facade.AddEventListener(EventKey, Handler); }
/// <summary> /// 立即停止 /// </summary> public virtual void StopTimerAction() { Facade.StopCoroutine(tempRoutine); }
public override void StopAudio() { Facade.StopBackgroundAudio(); }
/// <summary> /// 注销事件,当事件中心的此类Key事件为空时,自动注销这个key。 /// </summary> public void Deregister() { Facade.RemoveEventListener(EventKey, Handler); }
public override void UnpauseAudio() { Facade.UnpauseWorldAudio(AudioAttachTarget); }
/// <summary> /// 注销事件,默认将EventHandler从事件中心注销 /// 如果需要注销其他事件,则移步RemoveEventListener /// </summary> protected void RemoveDefaultEventListener(string eventKey) { Facade.RemoveEventListener(eventKey, EventHandler); }
/// <summary> /// 注销对象池 /// 非空虚函数 /// </summary> protected virtual void DeregisterObjectSpawnPool() { Facade.DeregisterObjectSpawnPool(SpawnObjectPoolKey); }
public override void StopAudio() { Facade.StopWorldAudio(AudioAttachTarget); }
/// <summary> /// 注册对象池 /// 非空虚函数 /// </summary> protected virtual void RegisterObjectSpawnPool() { Facade.RegisterObjcetSpawnPool(SpawnObjectPoolKey, SpawnItem, OnSpawn, OnDespawn); }
public override void UnpauseAudio() { Facade.UnpauseBackgroundAudio(); }
public override void PauseAudio() { Facade.PauseBackgroundAudio(); }
protected void DispatchEvent(string eventKey, GameEventArgs args) { Facade.DispatchEvent(eventKey, this, args); }
protected override void OnDestroy() { Facade.DeregisterController(this); }
/// <summary> /// 注册事件,默认将EventHandler注册到事件中心 /// 如果需要注册其他事件,则移步AddEventListener /// </summary> protected void AddDefaultEventListener(string eventKey) { Facade.AddEventListener(eventKey, EventHandler); }
private void Start() { Facade.DispatchEvent(ControllerEventCodeParams.CONTROLLER_INPUT, this, controllerEventArgs); }
protected void RemoveEventListener(string eventKey, Action <object, GameEventArgs> handler) { Facade.RemoveEventListener(eventKey, handler); }
void SaveClick() { Facade.SaveJsonDataToLocal("Inventory", "InventoryCache.json", inventoryDataSet); Utility.Debug.LogInfo("SaveJsonDataToLocal"); }