コード例 #1
0
 /// <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());
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
 /// <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;
 }
コード例 #4
0
 /// <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>();
 }
コード例 #5
0
 /// <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();
 }
コード例 #6
0
 /// <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;
 }
コード例 #7
0
 public SharperInputSystem(GameRunner game) : base(game)
 {
     ComponentUnRegistered += OnInputComponentUnRegistered;
     ComponentRegistered   += OnInputComponentRegistered;
 }