public GameObject TextRenderer(string spriteFontKey, string text) { var spriteFont = Content.SpriteFonts[spriteFontKey]; _gameObject.AddGameObjectComponent(new TextRenderer(spriteFont, text)); return(_gameObject); }
public void Start(string key) { if (_currentState != null) { GameObject.RemoveGameObjectComponent(_currentState); _currentState.Dispose(); } _currentStateInfo = _stateInfo[key]; _currentState = Activator.CreateInstance(_currentStateInfo.Type) as Behavior; GameObject.AddGameObjectComponent(_currentState); }