Created
June 25, 2020 13:59
-
-
Save ongaeshi/7db87ac900f70a6417d741042ddbbc37 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.4.3 | |
| void Main() | |
| { | |
| const std::array<Texture, 3> textures = | |
| { | |
| Texture(Emoji(U"π")), | |
| Texture(Emoji(U"π")), | |
| Texture(Emoji(U"π")), | |
| }; | |
| constexpr Size imageSize = Emoji::ImageSize; | |
| while (System::Update()) | |
| { | |
| Rect(0, 300, 800, 300).draw(ColorF(0.2, 0.3, 0.4)); | |
| for (auto [i, texture] : Indexed(textures)) | |
| { | |
| const Vec2 pos(140 + i * 200, 220); | |
| texture.draw(pos); | |
| // εε°γγγγ―γΉγγ£ | |
| texture(0, imageSize.y * 0.25, imageSize.x, imageSize.y * 0.75).flipped() | |
| .draw(pos.x, pos.y + imageSize.y, | |
| Arg::top = AlphaF(0.5), Arg::bottom = AlphaF(0.0)); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment