/// <summary> /// Initializes a new instance of the <see cref="SystemBuilder"/> class. /// </summary> /// <param name="game">The <see cref="GameRunner"/> being built by this <see cref="GameBuilder"/>.</param> internal SystemBuilder(GameRunner game) { _game = game; _systemBuilders = new List <ConstructorInfo>(); _registeredSystemParameters = new Dictionary <Type, object> { { typeof(GameRunner), _game } }; _systemBuilders.AddRange(typeof(SharperInputSystem).GetConstructors()); }
/// <summary> /// Initializes a new instance of the <see cref="ComposeBuilder"/> class. /// </summary> /// <param name="game">The <see cref="GameRunner"/> being built by this <see cref="GameBuilder"/>.</param> internal ComposeBuilder(GameRunner game) { _game = game; }
/// <summary> /// Initializes a new instance of the <see cref="OptionsBuilder"/> class. /// </summary> /// <param name="game">The <see cref="GameRunner"/> being built by this <see cref="GameBuilder"/>.</param> internal OptionsBuilder(GameRunner game) { _game = game; }
/// <summary> /// Initializes a new instance of the <see cref="EntityBuilder"/> class. /// </summary> /// <param name="game">The <see cref="GameRunner"/> being built by this <see cref="GameBuilder"/>.</param> internal EntityBuilder(GameRunner game) { _game = game; _entities = new List <SharperEntity>(); }
/// <summary> /// Initializes a new instance of the <see cref="GameBuilder"/> class. /// </summary> public GameBuilder() { // Prime our game runner, and add to it as we construct the builder _game = new GameRunner(); }
/// <summary> /// Base constructor for any <see cref="BaseSharperSystem{T}"/>. This must be called for the system to function correctly. Do not pass <see cref="ISharperSystem{T}"/> types in an overriden constructor. Instead, use <see cref="SharperInjectAttribute"/>. /// </summary> /// <param name="game">The current GameRunner this system should be registered to.</param> protected BaseSharperSystem(GameRunner game) { Components = new List <T>(); game.RegisterSystem(this); Game = game; }
public SharperInputSystem(GameRunner game) : base(game) { ComponentUnRegistered += OnInputComponentUnRegistered; ComponentRegistered += OnInputComponentRegistered; }