void Awake() { OnMouseClickEvent = new MouseClickEvent(); OnEnvChangeShapeEvent = new EnvChangeShapeEvent(); OnStaticCaseItemEvent = new StaticCaseItemEvent(); OnRightButtonClickEvent = new RightButtonClickEvent(); OnDoorEvent = new DoorEvent(); OnCaseEvent = new CaseEvent(); OnNextQuestEvent = new NextQuestEvent(); //OnDialogEvent = new QuestDialogEvent(); OnUseOnPlayerEvent = new UseOnPlayerEvent(); OnStartDialogEvent = new StartDialogEvent(); OnTerminalOpen = new TerminalEvent(); OnTerminalClose = new TerminalEvent(); OnChangeSpriteEvent = new ChangeSpriteEvent(); OnNewTicEvent = new NewTicEvent(); OnAddBuffEvent = new AddBuffEvent(); OnRemoveBuffEvent = new RemoveBuffEvent(); }
private void OnRemoveBuff(IComponentEvent componentEvent) { RemoveBuffEvent notification = (RemoveBuffEvent)componentEvent; m_Property.GetBuff(notification.buffID)?.OnRemoveBuff(); m_Property.RemoveBuff(notification.buffID); }
private void OnBuffRemove(KProtoBuf buf) { var msg = buf as S2C_DEL_BUFF_NOTIFY; SpacecraftEntity entity = m_GameplayProxy.GetEntityById <SpacecraftEntity>(msg.herID); if (entity != null) { RemoveBuffEvent buffEvent = new RemoveBuffEvent(); buffEvent.buffID = msg.wBuffID; m_EntityManager.SendEventToEntity(msg.herID, ComponentEventName.BuffRemove, buffEvent); } MSAIBossProxy mSAI = GameFacade.Instance.RetrieveProxy(ProxyName.MSAIBossProxy) as MSAIBossProxy; mSAI.CheckBuffPlaySound(msg.wBuffID, false); }
public override float eventStart() { foreach (var b in owner.effectList) { if (b.modificator == null) { continue; } b.modificator.owner = owner; b.modificator.target = target; b.modificator.updateMakingBuff(buff); } foreach (var b in target.effectList) { if (b.modificator == null) { continue; } b.modificator.owner = target; b.modificator.target = owner; b.modificator.updateGettingBuff(buff); } target.addEffect(buff); if (owner.enemy.Equals(target.ally)) { owner.updateAgro(owner.agro + 1); } logEvent("add buff " + buff.name + " on " + target.name); var removeEvent = new RemoveBuffEvent { owner = owner, target = target, buff = buff, eventTime = eventTime + buff.duration }; EventQueueSingleton.queue.add(removeEvent); return(0.0f); }
/// <summary> /// 删除buf /// </summary> private static void DisposeDeleteBuf(DeleteBuf result) { BaseEntity entity = GameplayManager.Instance.GetEntityManager().GetEntityById <BaseEntity>(result.HeroId); if (entity == null) { return; } Leyoutech.Utility.DebugUtility.LogWarning("广播", string.Format("删除buf EntitId = {0}, BuffId = {1}", result.HeroId, result.BufId)); RemoveBuffEvent buffEvent = new RemoveBuffEvent(); buffEvent.buffID = result.BufId; entity.SendEvent(ComponentEventName.BuffRemove, buffEvent); MSAIBossProxy mSAI = GameFacade.Instance.RetrieveProxy(ProxyName.MSAIBossProxy) as MSAIBossProxy; mSAI.CheckBuffPlaySound(result.BufId, false); }
public void OnRemoveBuff(Event e) { RemoveBuffEvent ee = e as RemoveBuffEvent; OnBuffChanged(ee.characer); }