summary refs log tree commit diff stats
path: root/src/systems/realizing.h
blob: c68189247c64a32ee6b685db5b1be6fa17ca00ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef REALIZING_H_6853748C
#define REALIZING_H_6853748C

#include "system.h"

class RealizingSystem : public System {
public:

  RealizingSystem(Game& game) : System(game)
  {
  }

  /**
   * Creates the singleton realizable entity and initializes it with the
   * provided world definition.
   */
  id_type initSingleton(std::string filename);

  /**
   * Helper method that returns the entity ID of the (assumed) singleton entity
   * with a RealizableComponent. Throws an exception if the number of realizable
   * entities is not exactly one.
   */
  id_type getSingleton() const;

  /**
   * Loads the given map.
   */
  void loadMap(id_type mapEntity);

  /**
   * Treats the given entity as part of the active map.
   */
  void enterActiveMap(id_type entity);

  /**
   * Stops treating the given entity as part of the active map.
   */
  void leaveActiveMap(id_type entity);

};

#endif /* end of include guard: REALIZING_H_6853748C */