HKI Core
GameSystem.cs
Go to the documentation of this file.
1 using UnityEngine;
2 using System.Collections;
3 using HKI.Core.Loc;
4 
5 namespace HKI.Core.GameSystems
6 {
10  public abstract class GameSystem : ScriptableObject
11  {
12  // Public variables
13  [SerializeField] TextLocalization InitInfoTextLocalization = null;
14  [SerializeField] TextLocalization InitErrorInfoTextLocalization = null;
15 
16  // Private variables
20  protected bool initSuccessful = false;
21 
22  // Getter
23  public TextLocalization GetInitInfoTextLocalization { get { return InitInfoTextLocalization; } }
24  public TextLocalization GetInitErrorInfoTextLocalization { get { return InitErrorInfoTextLocalization; } }
25 
26  public bool InitSuccessful { get { return initSuccessful; } }
27 
28  // Interface functions
32  public virtual IEnumerator Init() { initSuccessful = true; yield break; }
33 
37  public virtual void Update() { }
38 
42  public virtual void FixedUpdate() { }
43 
47  public virtual void LateUpdate() { }
48 
52  public virtual void Shutdown() { initSuccessful = false; }
53  }
54 }
virtual void Shutdown()
If the GameSystem is added to the Shutdown list of the GameSystemUpdateManager this function will be ...
Definition: GameSystem.cs:52
This ScriptableObject contains as a container for all text localization information.
virtual IEnumerator Init()
If the GameSystem is added to the Init list of the GameSystemUpdateManager this function will be call...
Definition: GameSystem.cs:32
virtual void FixedUpdate()
If the GameSystem is added to the FixedUpdate list of the GameSystemUpdateManager this function will ...
Definition: GameSystem.cs:42
virtual void LateUpdate()
If the GameSystem is added to the LateUpdate list of the GameSystemUpdateManager this function will b...
Definition: GameSystem.cs:47
virtual void Update()
If the GameSystem is added to the Update list of the GameSystemUpdateManager this function will be ca...
Definition: GameSystem.cs:37
This ScriptableObject is the abstract base class for all GameSystems. It provides "interface" functio...
Definition: GameSystem.cs:10