aboutsummaryrefslogtreecommitdiff
path: root/src/example/rendering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/example/rendering.cpp')
-rw-r--r--src/example/rendering.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/example/rendering.cpp b/src/example/rendering.cpp
index ecd3f6a..01794f8 100644
--- a/src/example/rendering.cpp
+++ b/src/example/rendering.cpp
@@ -30,17 +30,16 @@ int main() {
// Normal adding components
{
Color color(0, 0, 0, 0);
- Sprite & sprite
- = obj.add_component<Sprite>(make_shared<Texture>("../asset/texture/img.png"),
- color, FlipSettings{false, false});
+ Sprite & sprite = obj.add_component<Sprite>(
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{false, false});
sprite.sorting_in_layer = 2;
sprite.order_in_layer = 1;
- obj.add_component<Camera>(Color::get_red());
+ obj.add_component<Camera>(Color::RED);
}
{
Color color(0, 0, 0, 0);
Sprite & sprite = obj1.add_component<Sprite>(
- make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{true, true});
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{true, true});
sprite.sorting_in_layer = 2;
sprite.order_in_layer = 2;
}
@@ -48,7 +47,7 @@ int main() {
{
Color color(0, 0, 0, 0);
Sprite & sprite = obj2.add_component<Sprite>(
- make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{true, true});
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{true, true});
sprite.sorting_in_layer = 1;
sprite.order_in_layer = 2;
}
@@ -56,7 +55,7 @@ int main() {
/*
{
Color color(0, 0, 0, 0);
- auto img = mgr.cache<Texture>("../asset/texture/second.png");
+ auto img = mgr.cache<Texture>("asset/texture/second.png");
obj2.add_component<Sprite>(img, color, FlipSettings{true, true});
}
*/