public SSceneBehaviourBase(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c, string e = empty) { behaviour = b; callback = c; eventName = e; if (behaviour == null) { Logger.LogError("create SceneBehaviourBase error ,behaviour data is null"); } }
/// <summary> /// 得到所有的Behaviour /// </summary> /// <param name="b"></param> /// <returns>如果Behaviour没有包含FrameEventID返回本身,如果包含了FrameEventID那么返回本身以及FrameEvent里面包含的所有Behaviour</returns> private List <SceneEventInfo.SceneBehaviour> GetFrameEventBehaviours(SceneEventInfo.SceneBehaviour b) { List <SceneEventInfo.SceneBehaviour> behaviours = new List <SceneEventInfo.SceneBehaviour>(); if (b == null) { return(behaviours); } behaviours.Add(b); //目前只有创建怪物有帧事件 if (b.sceneBehaviorType != SceneEventInfo.SceneBehaviouType.CreateMonster) { return(behaviours); } int frameEventId = b.parameters.GetValue <int>(5); var fe = ConfigManager.Get <SceneFrameEventInfo>(frameEventId); if (fe) { if (fe.eventItems != null && fe.eventItems.Length > 0) { foreach (var f in fe.eventItems) { if (f.behaviours == null) { continue; } foreach (var be in f.behaviours) { behaviours.AddRange(GetFrameEventBehaviours(be)); } } } } return(behaviours); }
/// <summary> /// 创建monster/sceneactor /// </summary> /// <param name="b"></param> private void RealCreateMonster(SceneEventInfo.SceneBehaviour b) { if (b.sceneBehaviorType == SceneEventInfo.SceneBehaviouType.CreateMonster) { SCreateMonsterBehaviour cmb = new SCreateMonsterBehaviour(b, null); MonsterCreature monster = MonsterCreature.CreateMonster(cmb.monsterId, cmb.group, cmb.level, Vector3_.right * cmb.reletivePos, new Vector3(0, 90f, 0), Module_PVE.instance?.currrentStage); if (!monster) { return; } monster.enabledAndVisible = false; if (sceneRoot) { monster.transform.SetParent(sceneRoot); } creaturePool.Add(monster); } else if (b.sceneBehaviorType == SceneEventInfo.SceneBehaviouType.CreateSceneActor) { SCreateSceneActorBehaviour csab = new SCreateSceneActorBehaviour(b, null); MonsterCreature monster = MonsterCreature.CreateMonster(csab.sceneActorId, csab.group, csab.level, Vector3_.zero + Vector3_.right * csab.reletivePos, new Vector3(0, 90f, 0), Module_PVE.instance?.currrentStage); monster.roleId = (ulong)csab.logicId; if (!monster) { return; } monster.enabledAndVisible = false; if (sceneRoot) { monster.transform.SetParent(sceneRoot); } sceneActorPool.Add(monster); } }
public SBackToHomeBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SMoveMonsterPosBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventMoveMonsterPos) { }
public SCreateLittleBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventCreateLittle) { }
public SOperateSceneActorBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventOperateSceneActor) { }
public SDeleteConditionBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventDeleteCondition) { }
public SBossComingBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventBossComing) { }
public SStartStoryBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SAddBufferBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventAddBuff) { }
public SStageClearBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventStageClear) { }
public SDelTimerBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SAddTimerValueBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SStartCountDownBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventCountDown) { }
public SStartGuideBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventStartPVEGuide) { }
public SStopAudioBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SShowMessageBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventShowMessage) { }
public STransportSceneBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventTransportScene) { }
public SOperatingCounterBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SIncreaseConditionAmountBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventIncreaseConditionAmount) { }
public SLeaveMonsterBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventLeaveMonster) { }
public SDelSceneActorEventBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventDelSceneActorEvent) { }
public SSetStateBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventSetState) { }
public SRebuildRandomBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SCheckStageFirstTimeBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }
public SCreateAssistantNpcBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventCreateAssistantNpc) { }
public SAIPauseStateBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c) { }