Class UnityGameUiService
Inheritance
UnityGameUiService
Assembly: Serenity.UnityGameUi.Infrastructure.dll
Syntax
public class UnityGameUiService : MonoBehaviour, IGameUiService, IService, IFoundationSettings
Constructors
UnityGameUiService()
Declaration
public UnityGameUiService()
Fields
LOG_CATEGORY
Declaration
protected const string LOG_CATEGORY = "GameUiService"
Field Value
_eventDispatcherService
Declaration
protected IEventDispatcherService _eventDispatcherService
Field Value
_guid
Declaration
Field Value
_hudPresenter
Declaration
protected IGameHudPresenter _hudPresenter
Field Value
_id
Declaration
Field Value
_logService
Declaration
protected ILogService _logService
Field Value
_resultsPresenter
Declaration
protected IGameResultsPresenter _resultsPresenter
Field Value
_screenPresenter
Declaration
protected IGameScreenPresenter _screenPresenter
Field Value
_uiState
Declaration
protected UiState _uiState
Field Value
Properties
ActiveScreen
Declaration
public UiScreenId ActiveScreen { get; }
Property Value
CurrentHudState
Declaration
public HudState CurrentHudState { get; }
Property Value
CurrentResultsState
Declaration
public ResultsState CurrentResultsState { get; }
Property Value
Guid
Declaration
public string Guid { get; set; }
Property Value
Id
Declaration
public string Id { get; set; }
Property Value
LogService
Declaration
public ILogService LogService { get; set; }
Property Value
Methods
HideHud()
Declaration
public virtual void HideHud()
HideResults()
Declaration
public virtual void HideResults()
InitializeService(ILogService, IGameHudPresenter, IGameResultsPresenter, IGameScreenPresenter, IEventDispatcherService)
Initializes the service with required dependencies.
Declaration
public virtual void InitializeService(ILogService logService, IGameHudPresenter hudPresenter, IGameResultsPresenter resultsPresenter, IGameScreenPresenter screenPresenter, IEventDispatcherService eventDispatcherService = null)
Parameters
| Type |
Name |
Description |
| ILogService |
logService |
The logging service for diagnostic output.
|
| IGameHudPresenter |
hudPresenter |
The HUD presenter implementation.
|
| IGameResultsPresenter |
resultsPresenter |
The results screen presenter implementation.
|
| IGameScreenPresenter |
screenPresenter |
The screen navigation presenter implementation.
|
| IEventDispatcherService |
eventDispatcherService |
Dispatcher this service subscribes to for ShowHudSignal/HideHudSignal,
so a HUD can be shown or hidden with no generated code. Optional: null skips the subscription
(e.g. in a test that only exercises the presenter-forwarding API).
|
SetActiveScreen(UiScreenId)
Declaration
public virtual void SetActiveScreen(UiScreenId screenId)
Parameters
SetHudState(HudState)
Declaration
public virtual void SetHudState(HudState hudState)
Parameters
ShowHud()
Declaration
public virtual void ShowHud()
ShowResults(bool, float)
Declaration
public virtual void ShowResults(bool isVictory, float finalTime)
Parameters
| Type |
Name |
Description |
| bool |
isVictory |
|
| float |
finalTime |
|
Implements