diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-09 11:28:06 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-09 11:28:06 +0100 |
commit | 6cee1cff083fc50eeedf88537965d3c79e7b790a (patch) | |
tree | 7e292157b73ab6d10e4ff3a63ddc5d5a909d009d /src/example/AITest.cpp | |
parent | 33a072db28d71ba65e59f9491abd42dbf9695fc4 (diff) |
Added Doxygen
Diffstat (limited to 'src/example/AITest.cpp')
-rw-r--r-- | src/example/AITest.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/example/AITest.cpp b/src/example/AITest.cpp index d12a99a..72e06cf 100644 --- a/src/example/AITest.cpp +++ b/src/example/AITest.cpp @@ -52,16 +52,14 @@ public: Texture img = Texture("asset/texture/test_ap43.png"); game_object1.add_component<Sprite>(img, Color::MAGENTA, Sprite::FlipSettings{false, false}, 1, 1, 195); - AI & ai = game_object1.add_component<AI>(300); + AI & ai = game_object1.add_component<AI>(3000); // ai.arrive_on(); // ai.flee_on(); ai.path_follow_on(); - ai.add_path_node(vec2{1200, 1200}); - ai.add_path_node(vec2{-1200, 1200}); - ai.add_path_node(vec2{1200, -1200}); - ai.add_path_node(vec2{-1200, -1200}); + ai.make_circle_path(1000, {0, -1000}, 1.5707, true); + ai.make_circle_path(1000, {0, 1000}, 4.7124, false); game_object1.add_component<Rigidbody>(Rigidbody::Data{ - .mass = 0.5f, .max_linear_velocity = {50, 50}, // sqrt(21^2 + 21^2) = 30 + .mass = 0.5f, .max_linear_velocity = {40, 40}, // sqrt(21^2 + 21^2) = 30 }); game_object1.add_component<BehaviorScript>().set_script<Script1>(); |