Esempio n. 1
0
 /// <summary>
 /// Adding a Monolike module to Executor (and invoke its .StartFunc)
 /// </summary>
 /// <param name="module">Module.</param>
 public void AddModule(IMonolike module)
 {
     _monolikes.Add(module);
     // StartFunc is called here, as whenever we add the Monolike object,
     // the addition itself could be seen as initialization (Start() in Monobehaviour)
     module.StartFunc();
 }
Esempio n. 2
0
 /// <summary>
 /// Remove a Monolike module so its UpdateFunc would no longer be called
 /// </summary>
 /// <param name="module">Module.</param>
 public void RemoveModule(IMonolike module)
 {
     _monolikes.Remove(module);
 }