コード例 #1
0
 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");
     }
 }
コード例 #2
0
    /// <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);
    }
コード例 #3
0
    /// <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);
        }
    }
コード例 #4
0
 public SBackToHomeBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #5
0
 public SMoveMonsterPosBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventMoveMonsterPos)
 {
 }
コード例 #6
0
 public SCreateLittleBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventCreateLittle)
 {
 }
コード例 #7
0
 public SOperateSceneActorBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventOperateSceneActor)
 {
 }
コード例 #8
0
 public SDeleteConditionBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventDeleteCondition)
 {
 }
コード例 #9
0
 public SBossComingBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventBossComing)
 {
 }
コード例 #10
0
 public SStartStoryBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #11
0
 public SAddBufferBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventAddBuff)
 {
 }
コード例 #12
0
 public SStageClearBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventStageClear)
 {
 }
コード例 #13
0
 public SDelTimerBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #14
0
 public SAddTimerValueBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #15
0
 public SStartCountDownBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventCountDown)
 {
 }
コード例 #16
0
 public SStartGuideBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventStartPVEGuide)
 {
 }
コード例 #17
0
 public SStopAudioBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #18
0
 public SShowMessageBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventShowMessage)
 {
 }
コード例 #19
0
 public STransportSceneBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventTransportScene)
 {
 }
コード例 #20
0
 public SOperatingCounterBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #21
0
 public SIncreaseConditionAmountBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventIncreaseConditionAmount)
 {
 }
コード例 #22
0
 public SLeaveMonsterBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventLeaveMonster)
 {
 }
コード例 #23
0
 public SDelSceneActorEventBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventDelSceneActorEvent)
 {
 }
コード例 #24
0
 public SSetStateBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventSetState)
 {
 }
コード例 #25
0
 public SRebuildRandomBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #26
0
 public SCheckStageFirstTimeBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }
コード例 #27
0
 public SCreateAssistantNpcBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c, Module_PVEEvent.EventCreateAssistantNpc)
 {
 }
コード例 #28
0
 public SAIPauseStateBehaviour(SceneEventInfo.SceneBehaviour b, Action <SSceneBehaviourBase> c) : base(b, c)
 {
 }