/// <summary> /// Creates an Entity with all Components of a Player and adds it to the World. /// </summary> public static void CreatePlayer() { //Create Entity and add to world ulong newEntity = _world.NextEntityID; PlayerSystem.PLAYER_ENTITY_ID = newEntity; //Create components and pass to world to send to Systems List <Component> components = new List <Component>(); components.Add(new CPlayerTeam()); components.Add(new CRenderable(CreateCastleImg())); components.Add(new CPosition(CASTLE_X, CASTLE_Y, CASTLE_WIDTH, CASTLE_HEIGHT)); components.Add(new CPlayer()); components.Add(new CHealth(CASTLE_HP)); components.Add(new CCollidable()); _world.AddEntity(newEntity, components); }