123456789101112131415161718192021222324252627282930 |
- using System;
- using Fort23.Core;
- using GameLogic.Combat.CombatTool;
- using UnityEngine;
- using Utility;
- namespace GameLogic.Combat
- {
- public class CombatDrive : Singleton<CombatDrive>
- {
- public CombatController CombatController;
- public async CTask AddCombatController(CombatController combatController)
- {
- this.CombatController = combatController;
- await CombatController.InitCombat();
- StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
- }
- public void Update()
- {
- CombatController.Update(Time.deltaTime);
- }
- public void Dispose()
- {
- StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
- }
- }
- }
|