54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Cielonos.MainGame.Characters;
|
|
using Sirenix.OdinInspector;
|
|
using SLSUtilities.General;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public partial class CombatManager : Singleton<CombatManager>
|
|
{
|
|
private static Player Player => MainGameManager.Player;
|
|
|
|
[ShowInInspector]
|
|
private EnemySubmodule enemySm;
|
|
|
|
[ShowInInspector]
|
|
private CoordinatorSubmodule coordinatorSm;
|
|
|
|
[ShowInInspector]
|
|
private AttackAreaSubmodule attackAreaSm;
|
|
|
|
[ShowInInspector]
|
|
private CombatRoomSubmodule combatRoomSm;
|
|
|
|
[ShowInInspector]
|
|
[SerializeReference]
|
|
private List<CombatSystemBase> combatSystems;
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
enemySm ??= new EnemySubmodule(this);
|
|
coordinatorSm ??= new CoordinatorSubmodule(this);
|
|
attackAreaSm ??= new AttackAreaSubmodule(this);
|
|
combatRoomSm ??= new CombatRoomSubmodule(this);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
coordinatorSm.CleanupTimeoutSectors();
|
|
}
|
|
}
|
|
|
|
public partial class CombatManager
|
|
{
|
|
public static EnemySubmodule EnemySm => Instance.enemySm;
|
|
public static CoordinatorSubmodule CoordinatorSm => Instance.coordinatorSm;
|
|
public static AttackAreaSubmodule AttackAreaSm => Instance.attackAreaSm;
|
|
public static CombatRoomSubmodule CombatRoomSm => Instance.combatRoomSm;
|
|
}
|
|
}
|