1 #ifndef GAMES_STARDASH_PROJECTILE_H
2 #define GAMES_STARDASH_PROJECTILE_H
14 #include <unordered_map>
16 #include <initializer_list>
18 #include "../../joueur/src/any.hpp"
20 #include "game_object.hpp"
22 #include "impl/stardash_fwd.hpp"
87 Projectile_(std::initializer_list<std::pair<std::string, Any&&>> init);
88 Projectile_() : Projectile_({}){}
89 virtual void resize(
const std::string& name, std::size_t size)
override;
90 virtual void change_vec_values(
const std::string& name, std::vector<std::pair<std::size_t, Any>>& values)
override;
91 virtual void remove_key(
const std::string& name, Any& key)
override;
92 virtual std::unique_ptr<Any> add_key_value(
const std::string& name, Any& key, Any& value)
override;
93 virtual bool is_map(
const std::string& name)
override;
94 virtual void rebind_by_name(Any* to_change,
const std::string& member, std::shared_ptr<Base_object> ref)
override;
105 #endif // GAMES_STARDASH_PROJECTILE_H
Tracks any projectiles moving through space.
Definition: projectile.hpp:37
A player in this game. Every AI controls one player.
Definition: player.hpp:37
const int & fuel
The amount of remaining distance the projectile can move.
Definition: projectile.hpp:49
A unit in the game. May be a corvette, missleboat, martyr, transport, miner.
Definition: unit.hpp:37
const double & y
The y value this projectile is on.
Definition: projectile.hpp:69
const double & x
The x value this projectile is on.
Definition: projectile.hpp:64
const Player & owner
The Player that owns and can control this Projectile.
Definition: projectile.hpp:54
const Unit & target
The unit that is being attacked by this projectile.
Definition: projectile.hpp:59
An object in the game. The most basic class that all game classes should inherit from automatically...
Definition: game_object.hpp:37
const int & energy
The remaining health of the projectile.
Definition: projectile.hpp:44