[占领] 预留代码位置
parent
4dff70a8eb
commit
90eb8bb623
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c37d868154254230b198179b3af39c10
|
||||
timeCreated: 1717045195
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 36c32565f15f4065a76815f6e07fd6d3
|
||||
timeCreated: 1717045243
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
namespace Gameplay.Fight.Capture
|
||||
{
|
||||
public class CaptureInst
|
||||
{
|
||||
|
||||
public int cellIndex;
|
||||
|
||||
public void LogicUpdate(float dt)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d220f5b364c8479f87416c4e5e988fcc
|
||||
timeCreated: 1717045271
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
using System.Collections.Generic;
|
||||
namespace Gameplay.Fight.Capture
|
||||
{
|
||||
/// <summary>
|
||||
/// 用于管理战场内的所有占领点
|
||||
/// 仅在战场内使用
|
||||
/// </summary>
|
||||
public class CaptureManager
|
||||
{
|
||||
|
||||
public List<CaptureInst> captureInsts = new List<CaptureInst>();
|
||||
|
||||
public static CaptureManager instance { get; private set; }
|
||||
|
||||
public static void CreateInstance()
|
||||
{
|
||||
instance = new CaptureManager();
|
||||
}
|
||||
|
||||
private CaptureManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void LogicUpdate(float dt)
|
||||
{
|
||||
for (int i = 0; i < captureInsts.Count; i++)
|
||||
{
|
||||
var captureInst = captureInsts[i];
|
||||
captureInst.LogicUpdate(dt);
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
instance = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 300b9b59f0fa41c1ba496a34a50ebb9a
|
||||
timeCreated: 1717045254
|
||||
|
|
@ -7,6 +7,7 @@ using Gameplay.Area;
|
|||
using Gameplay.Buff;
|
||||
using Gameplay.Bullet;
|
||||
using Gameplay.Character;
|
||||
using Gameplay.Fight.Capture;
|
||||
using Gameplay.Pause;
|
||||
using Gameplay.Skill;
|
||||
using Gameplay.Summon;
|
||||
|
|
@ -48,6 +49,9 @@ namespace Gameplay.Level
|
|||
|
||||
GameUnitManager.instance.EnterBattle();
|
||||
|
||||
CaptureManager.CreateInstance();
|
||||
CaptureManager.instance.Init();
|
||||
|
||||
// 这个必须在GameUnitManager.instance.EnterBattle()之后
|
||||
// 因为他会给unit增加buff
|
||||
BoundsManager.instance.Init();
|
||||
|
|
@ -72,6 +76,7 @@ namespace Gameplay.Level
|
|||
AreaManager.instance.LogicUpdate(deltaTime);
|
||||
PauseManager.instance.LogicUpdate(deltaTime);
|
||||
TireMarkManager.instance.LogicUpdate(deltaTime);
|
||||
CaptureManager.instance.LogicUpdate(deltaTime);
|
||||
EventManager.Instance.Send(EventManager.EventName.LevelTimeIncrease,deltaTime);
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +85,7 @@ namespace Gameplay.Level
|
|||
_level.isInBattle = false;
|
||||
|
||||
|
||||
|
||||
CaptureManager.instance.Dispose();
|
||||
BulletManager.instance.Dispose();
|
||||
BoundsManager.instance.Dispose();
|
||||
TireMarkManager.instance.Dispose();
|
||||
|
|
|
|||
Loading…
Reference in New Issue