The Table Engine
gameobjectfactory.h
Go to the documentation of this file.
1 
10 #include "gameobject.h"
11 #include "vec2.h"
12 #include <string>
13 
22 public:
28  static GameObject* createPlayerTest();
29 
35  static GameObject* createBow();
36 
44  static GameObject* createArrow(int dx, int dy);
45 
52 
66  static GameObject* createEnemyWarriorCustom(std::string path, int row, int col, float animationTime, int pos_x, int pos_y, int size_x, int size_y);
67 
73  static GameObject* createTile1();
74 
85  static GameObject* createTileCustom(std::string path, Vec2 pos, Vec2 size, Vec2 sprite_size, Vec2 sprite_pos, Vec2 rc);
86 
97  static GameObject* createWallCustom(std::string path, Vec2 pos, Vec2 size, Vec2 sprite_size, Vec2 sprite_pos);
98 
109  static GameObject* createTableCustom(std::string path, Vec2 pos, Vec2 size, Vec2 sprite_size, Vec2 sprite_pos);
110 
116  static GameObject* createKey();
117 
123  static GameObject* createCrosshair();
124 };
Factory for constructing different types of game objects.
static GameObject * createEnemyWarriorCustom(std::string path, int row, int col, float animationTime, int pos_x, int pos_y, int size_x, int size_y)
Creates a customized enemy warrior object with specific texture and animations.
static GameObject * createArrow(int dx, int dy)
Creates an arrow object with specified dynamics.
static GameObject * createTableCustom(std::string path, Vec2 pos, Vec2 size, Vec2 sprite_size, Vec2 sprite_pos)
Creates a customized table object with specific texture.
static GameObject * createKey()
Creates a key object.
static GameObject * createEnemyWarrior()
Creates an enemy warrior object.
static GameObject * createTileCustom(std::string path, Vec2 pos, Vec2 size, Vec2 sprite_size, Vec2 sprite_pos, Vec2 rc)
Creates a customized tile object with specific texture.
static GameObject * createTile1()
Creates a basic tile object.
static GameObject * createCrosshair()
Creates a crosshair object.
static GameObject * createWallCustom(std::string path, Vec2 pos, Vec2 size, Vec2 sprite_size, Vec2 sprite_pos)
Creates a customized wall object with specific texture.
static GameObject * createPlayerTest()
Creates a test player object.
static GameObject * createBow()
Creates a bow object.
Core class representing an entity in the game world.
Definition: gameobject.h:20
A structure to represent 2D vectors.
Definition: vec2.h:16
Definition of Vec2 structure for 2D vector operations.