목록언어/심심풀이 (1)
Dailelog

#include #include class GravitySource { sf::Vector2f pos; float strength; sf::CircleShape s; public: GravitySource(float pos_x, float pos_y, float strength) { pos.x = pos_x; pos.y = pos_y; this->strength = strength; s.setPosition(pos); s.setFillColor(sf::Color::Red); s.setRadius(15); //반지름 } void render(sf::RenderWindow& wind) { wind.draw(s); } sf::Vector2f get_pos() { return pos; } float get_st..
언어/심심풀이
2022. 9. 2. 18:25