R-Type
R-Type project
EnemyScript.hpp
1 #pragma once
2 
3 #include "MapScript/Lua.hpp"
4 #include "MapScript/MapScript.hpp"
5 #include "Vector2Script.hpp"
6 #include "RectangleScript.hpp"
7 #include "SpriteAnimationScript.hpp"
8 #include "Debug.hpp"
9 #include <string>
10 #include <iostream>
11 
12 namespace RType {
13  class MapScript;
14 }
15 
16 namespace RType::Script {
17  class Enemy {
18  public:
19  std::string name;
20  std::string pathSprite;
21  Rectangle *rectangle = nullptr;
22  Vector2 *scale = nullptr;
23  SpriteAnimation *animation = nullptr;
24 
25  Enemy() = default;
26  ~Enemy() = default;
27 
28  void dump() const;
29 
30  static void initScript(lua_State *L, RType::MapScript *mapScript);
31 
32  private:
33  static int __create(lua_State *L);
34  static int __destroy(lua_State *L);
35  static int __index(lua_State *L);
36  static int __newIndex(lua_State *L);
37  static int __dump(lua_State *L);
38  };
39 } // namespace RType::Script
RType::Script::Enemy
Definition: EnemyScript.hpp:17
RType::Script::SpriteAnimation
Definition: SpriteAnimationScript.hpp:7
RType::Script::Rectangle
Definition: RectangleScript.hpp:6
RType::Script::Vector2
Definition: Vector2Script.hpp:6
RType::MapScript
Definition: MapScript.hpp:23