This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
struct Planet | |
{ | |
Vec2 pos; | |
Vec2 v; | |
int id; | |
}; | |
void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> //OpenSiv3D v0.1.5 | |
# include <HamFramework.hpp> | |
struct Node | |
{ | |
Vec2 pos; | |
double mass; | |
bool isFixed; | |
Vec2 v; | |
Array<Node*> spring; | |
Vec2 f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.1.5 | |
# include <HamFramework.hpp> | |
struct Unit | |
{ | |
Unit(const Vec2& _pos) | |
: pos(_pos) | |
, isPlant(RandomBool(0.95)) | |
, angle(RandomVec2(1.0)) | |
, v(RandomVec2(0.0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.1.5 | |
struct Bug | |
{ | |
Bug() {} | |
Bug(const int& _type) : type(_type) {} | |
int type = Random(4); | |
Vec2 p = { -16, Random(Window::Center().y - 120, Window::Center().y + 120) }; | |
double v = Random(1.0, 2.0); | |
Vec2 dv = { 0, 0 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.1.5 | |
struct Ball | |
{ | |
Ball(const Vec2& _p, const Vec2& _v) : p(_p), v(_v) {} | |
Vec2 p; | |
Vec2 v; | |
}; | |
void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.1.5 | |
struct Glass | |
{ | |
Glass(const Vec2& _pos, const double& _n, const double& _r) | |
: pos(_pos), n(_n), r(_r) {} | |
Vec2 pos; | |
double n; | |
double r; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
# include <HamFramework.hpp> | |
struct Compass | |
{ | |
Compass(const Vec2& _pos) : pos(_pos), ang(Vec2::Up), v(0.0) {} | |
Vec2 pos; | |
Vec2 ang; | |
double v; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
struct Junction | |
{ | |
Junction(const Vec2& _pos) | |
: pos(_pos), temp(false), family(-1) {} | |
Vec2 pos; | |
bool temp; | |
int family; | |
Array<Junction*> connects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.1.5 | |
struct Face | |
{ | |
Texture tex; | |
Point pos; | |
Vec2 dPos; | |
}; | |
void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> // OpenSiv3D v0.1.5 | |
//方位磁針 | |
struct Compass | |
{ | |
Compass(const Vec2& _pos) : pos(_pos), ang(Vec2::Up()), v(0) {} | |
Vec2 pos; //位置座標 | |
Vec2 ang; //現在角度 | |
double v; //回転速度 | |
}; |
OlderNewer