PlayerFactory.cs 363 B

12345678910111213
  1. namespace Model
  2. {
  3. public static class PlayerFactory
  4. {
  5. public static Player Create(long id)
  6. {
  7. Player player = EntityFactory.CreateWithId<Player>(id);
  8. PlayerComponent playerComponent = Game.Scene.GetComponent<PlayerComponent>();
  9. playerComponent.Add(player);
  10. return player;
  11. }
  12. }
  13. }