R-Type
Namespaces | Classes | Typedefs | Enumerations | Functions
GameEngine Namespace Reference

Namespaces

 Input
 
 Network
 

Classes

class  AssetManager
 Class to manage assets. More...
 
struct  CameraComponent
 
struct  CollisionComponent
 
struct  ControllableComponent
 
struct  DamageComponent
 
struct  GravityComponent
 
struct  HealthComponent
 
struct  InputComponent
 
struct  MusicComponent
 
struct  NetworkIdComponent
 
struct  PressableComponent
 
struct  ScoreComponent
 
struct  TextComponent
 
struct  TextureComponent
 
struct  TransformComponent
 
class  Entity
 Entity class for the game engine. More...
 
struct  NoEventData
 empty struct to describe an event that dosent provide data to subscribed functions More...
 
class  EventHandler
 class that store all the callback functions for a specific event type More...
 
class  EventManager
 class to help create and manage all the event handlers More...
 
class  GameEngine
 Game engine class, will manage all the necessary classes for the game. More...
 
class  PrefabManager
 Class to manage prefabs. More...
 
class  Registry
 Entity component system, handling entities, components and systems. More...
 
class  SceneManager
 Class managing all the scenes for the game. More...
 
class  AnimationSystem
 Class representing the sprite sheet animation system. More...
 
class  CameraSystem
 
class  CollisionSystem
 
class  ControlSystem
 
class  DamageSystem
 
struct  PollEventStruct
 
class  DrawSystem
 Class representing the graphics rendering system. More...
 
class  GravitySystem
 
class  InputSystem
 
class  MusicSystem
 
class  PositionSystem
 
class  PressableSystem
 
class  DeltaTime
 DeltaTime class which handles the delta time. More...
 
class  IScene
 
class  Rect
 class representing a rect More...
 
class  IFont
 Interfaces for the text font. More...
 
class  IRect
 Interface for rectangle. More...
 
class  IClock
 Interface for clock. More...
 
class  ITexture
 Interface for texture. More...
 
class  IMusic
 interface for music handling More...
 
class  ISprite
 Interface for sprite. More...
 
class  IEvent
 Interface for event. More...
 
class  IView
 Interface for view. More...
 
class  IWindow
 Interface for the window. More...
 
class  SEvent
 Class representing a custom event wrapper for sf::Event. More...
 
class  Clock
 
class  Texture
 Class representing a texture wrapper for sf::Texture with an associated area. More...
 
class  View
 Class representing a view wrapper for sf::View. More...
 
class  Window
 Class representing a window wrapper for sf::RenderWindow with additional functionality. More...
 
class  Text
 Class representing a text wrapper for sf::Text with basic functionality. More...
 
class  Music
 Class representing a music wrapper for sf::Music. More...
 
class  Font
 Class representing a font wrapper for sf::Font. More...
 
class  Sprite
 Class representing a sprite wrapper for sf::Sprite with additional functionality. More...
 
class  InputManager
 
class  Vector2
 a Vector2 class More...
 

Typedefs

using EventType = std::size_t
 value to describe the event type More...
 
using GravityFunction = std::function< void(SparseArray< GravityComponent > &)>
 
using PressableFunction = std::function< void(SparseArray< TransformComponent > &transforms, SparseArray< TextureComponent > &textures, SparseArray< PressableComponent > &pressables)>
 
using Rectf = Rect< float >
 
using Recti = Rect< int >
 

Enumerations

enum  PressableState { defaultState , hoveredState , pressedState }
 
enum class  Event : EventType {
  WindowIsOpen , WindowCloseEvent , QuitEvent , PollEvent ,
  GetWorldMousePos , WindowSetView , SetFpsLimitEvent , GetTransform ,
  GetCollision , GetTexture , GetControllable , GetNewEntity ,
  GetEntity , GetDestroy , SendInput , GetEndGame ,
  GetStateTexture , GetScore , DeleteEntity , EnemiesSpawnedEvent ,
  EnemiesMoveEvent , EnemiesDieEvent , PlayerMoveEvent , PlayerSpawnedEvent ,
  PlayersDieEvent , PlayerShootEvent
}
 enum of all event types More...
 

Functions

template<typename T >
int replaceOnTop (Vector2< T > &pos1, const Rect< T > &rect1, const Vector2< T > &pos2, const Rect< T > &rect2)
 
void from_json (const json &j, Input::Keyboard::Key &key)
 Function to convert a json object to a key. More...
 
template<typename T >
void from_json (const json &j, Rect< T > &rect)
 Function to convert a json object to a rect. More...
 
template<typename T >
void from_json (const json &j, Vector2< T > &vec)
 
void from_json (const json &j, Texture &texture)
 Function to convert a json object to a Texture. More...
 
void from_json (const json &j, TransformComponent &tc)
 Function to convert a json object to a TransfromComponent. More...
 
void from_json (const json &j, HealthComponent &hc)
 Function to convert a json object to a HealthComponent. More...
 
void from_json (const json &j, DamageComponent &dc)
 Function to convert a json object to a DamageComponent. More...
 
void from_json (const json &j, ControllableComponent &cc)
 Function to convert a json object to a ControllableComponent. More...
 
void from_json (const json &j, TextureComponent &tc)
 Function to convert a json object to a TextureComponent. More...
 
void from_json (const json &j, CollisionComponent &cc)
 Function to convert a json object to a CollisionComponent. More...
 
void from_json (const json &j, GravityComponent &gc)
 Function to convert a json object to a GravityComponent. More...
 
void from_json (const json &j, CameraComponent &cc)
 Function to convert a json object to a CameraComponent. More...
 
void from_json (const json &j, TextComponent &tx)
 

Typedef Documentation

◆ EventType

using GameEngine::EventType = typedef std::size_t

value to describe the event type

◆ GravityFunction

using GameEngine::GravityFunction = typedef std::function<void(SparseArray<GravityComponent> &)>

◆ PressableFunction

using GameEngine::PressableFunction = typedef std::function<void(SparseArray<TransformComponent> &transforms, SparseArray<TextureComponent> &textures, SparseArray<PressableComponent> &pressables)>

◆ Rectf

using GameEngine::Rectf = typedef Rect<float>

◆ Recti

using GameEngine::Recti = typedef Rect<int>

Enumeration Type Documentation

◆ Event

enum of all event types

Enumerator
WindowIsOpen 
WindowCloseEvent 
QuitEvent 
PollEvent 
GetWorldMousePos 
WindowSetView 
SetFpsLimitEvent 
GetTransform 
GetCollision 
GetTexture 
GetControllable 
GetNewEntity 
GetEntity 
GetDestroy 
SendInput 
GetEndGame 
GetStateTexture 
GetScore 
DeleteEntity 
EnemiesSpawnedEvent 
EnemiesMoveEvent 
EnemiesDieEvent 
PlayerMoveEvent 
PlayerSpawnedEvent 
PlayersDieEvent 
PlayerShootEvent 

◆ PressableState

Enumerator
defaultState 
hoveredState 
pressedState 

Function Documentation

◆ from_json() [1/13]

void GameEngine::from_json ( const json j,
CameraComponent cc 
)

Function to convert a json object to a CameraComponent.

Parameters
jreference to the json object
ccreference to the camera component

◆ from_json() [2/13]

void GameEngine::from_json ( const json j,
CollisionComponent cc 
)

Function to convert a json object to a CollisionComponent.

Parameters
jreference to the json object
ccreference to the collision component

◆ from_json() [3/13]

void GameEngine::from_json ( const json j,
ControllableComponent cc 
)

Function to convert a json object to a ControllableComponent.

Parameters
jreference to the json object
ccreference to the controllable component

◆ from_json() [4/13]

void GameEngine::from_json ( const json j,
DamageComponent dc 
)

Function to convert a json object to a DamageComponent.

Parameters
jreference to the json object
tcreference to the damage component

◆ from_json() [5/13]

void GameEngine::from_json ( const json j,
GravityComponent gc 
)

Function to convert a json object to a GravityComponent.

Parameters
jreference to the json object
gcreference to the gravity component

◆ from_json() [6/13]

void GameEngine::from_json ( const json j,
HealthComponent hc 
)

Function to convert a json object to a HealthComponent.

Parameters
jreference to the json object
tcreference to the health component

◆ from_json() [7/13]

void GameEngine::from_json ( const json j,
Input::Keyboard::Key key 
)

Function to convert a json object to a key.

Parameters
jreference to the json object
keyreference to the key

◆ from_json() [8/13]

template<typename T >
void GameEngine::from_json ( const json j,
Rect< T > &  rect 
)

Function to convert a json object to a rect.

Template Parameters
Ttype of the rect
Parameters
jreference to the json object
rectreference to the rect

◆ from_json() [9/13]

void GameEngine::from_json ( const json j,
TextComponent tx 
)

◆ from_json() [10/13]

void GameEngine::from_json ( const json j,
Texture texture 
)

Function to convert a json object to a Texture.

Parameters
jreference to the json object
texturereference to the texture

◆ from_json() [11/13]

void GameEngine::from_json ( const json j,
TextureComponent tc 
)

Function to convert a json object to a TextureComponent.

Parameters
jreference to the json object
tcreference to the texture component

◆ from_json() [12/13]

void GameEngine::from_json ( const json j,
TransformComponent tc 
)

Function to convert a json object to a TransfromComponent.

Parameters
jreference to the json object
tcreference to the transform component

◆ from_json() [13/13]

template<typename T >
void GameEngine::from_json ( const json j,
Vector2< T > &  vec 
)

◆ replaceOnTop()

template<typename T >
int GameEngine::replaceOnTop ( Vector2< T > &  pos1,
const Rect< T > &  rect1,
const Vector2< T > &  pos2,
const Rect< T > &  rect2 
)