public void AddModule(BaseModule module) { module.SetOwner(this); if (module is IThinkModule) _mThinkModule = module as IThinkModule; if (module is IDrawExecuter) _mDrawModule = module as IDrawExecuter; if (module is IInteractModule) _mInteractModule = module as IInteractModule; if (module is IDieModule) _mDieModule = module as IDieModule; if (module is ICollideModule) _mCollideModule = module as ICollideModule; }
internal void RemoveAllModules() { _mCollideModule = null; _mInteractModule = null; _mThinkModule = null; _mDieModule = null; _mDrawModule = null; }
public IncreaseCounterOnDeath(String counterIdentifier,IDieModule dieModule) { _followUpModule = dieModule; _counter = "counter_" + counterIdentifier; GlobalState.RegisterValue<int>(_counter); }