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