1 #ifndef NEBULA_H 2 #define NEBULA_H 3 4 #include "spaceObject.h" 5 6 class NebulaCloud 7 { 8 public: 9 sf::Vector2f offset; 10 int texture; 11 float size; 12 }; 13 class Nebula : public SpaceObject 14 { 15 static PVector<Nebula> nebula_list; 16 static const int cloud_count = 32; 17 18 int radar_visual; 19 NebulaCloud clouds[cloud_count]; 20 21 public: 22 Nebula(); 23 24 #if FEATURE_3D_RENDERING 25 virtual void draw3DTransparent(); 26 #endif 27 virtual void drawOnRadar(sf::RenderTarget& window, sf::Vector2f position, float scale, float rotation, bool long_range); 28 virtual void drawOnGMRadar(sf::RenderTarget& window, sf::Vector2f position, float scale, float rotation, bool long_range); canHideInNebula()29 virtual bool canHideInNebula() { return false; } 30 31 static bool inNebula(sf::Vector2f position); 32 static bool blockedByNebula(sf::Vector2f start, sf::Vector2f end, float radar_short_range); 33 static sf::Vector2f getFirstBlockedPosition(sf::Vector2f start, sf::Vector2f end); 34 static PVector<Nebula> getNebulas(); 35 getExportLine()36 virtual string getExportLine() { return "Nebula():setPosition(" + string(getPosition().x, 0) + ", " + string(getPosition().y, 0) + ")"; } 37 }; 38 39 #endif//NEBULA_H 40