|
12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Svelto.ECS;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- using RobocraftX.SimulationModeState;
-
- namespace GamecraftModdingAPI.Utility
- {
- class GameStateEngine : IApiEngine
- {
- public string Name { get; } = "GamecraftModdingAPIGameStateGameEngine";
-
- public IEntitiesDB entitiesDB { set; private get; }
-
- private bool _isInGame = false;
-
- public bool IsInGame { get { return _isInGame; } }
-
- public void Dispose()
- {
- _isInGame = false;
- }
-
- public void Ready()
- {
- _isInGame = true;
- }
-
- public bool IsBuildMode()
- {
- return _isInGame && SimModeUtil.IsBuildMode(entitiesDB);
- }
-
- public bool IsSimulationMode()
- {
- return _isInGame && SimModeUtil.IsSimulationMode(entitiesDB);
- }
-
- }
- }
|