yyl
2025-06-17 007fbd542c30f5fa8308128aac26ce6584b3067a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System.Collections.Generic;
using UnityEngine;
 
 
 
public class BattleManager : GameSystemManager<BattleManager>
{
    public StoryBattleField storyBattleField = new StoryBattleField();//主线战场
 
    protected Dictionary<int, BattleField> battleFields = new Dictionary<int, BattleField>();
 
    public override void Init()
    {
        base.Init();
    }
 
    public override void Release()
    {
        base.Release();
    }
 
    public void StartStoryBattle()
    {
        if (null == storyBattleField)
        {
            storyBattleField = new StoryBattleField();
 
        }
    }
 
    public void Run()
    {
        if (null != storyBattleField)
        {
            storyBattleField.Run();
        }
 
        foreach (var battleField in battleFields)
        {
            battleField.Value?.Run();
        }
    }
 
}