-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
171 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
file: "genshin_pursuit_author.png" | ||
name: "genshin_pursuit_author" | ||
blocks: | ||
- uv: [0, 128, 0, 128] | ||
at: [0, 0] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
file: "genshin_pursuit_entry.png" | ||
name: "genshin_pursuit_entry" | ||
blocks: | ||
- uv: [0, 128, 0, 256] | ||
- uv: [0, 128, 0, 160] | ||
at: [0, 0] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
file: "genshin_pursuit_main.png" | ||
name: "genshin_pursuit_main" | ||
blocks: | ||
- uv: [0, 512, 0, 384] | ||
at: [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
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
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
41 changes: 41 additions & 0 deletions
41
src/main/activities/avg_scripts/genshin_pursuit_author.cpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#include "../avg_scripts.hpp" | ||
#include "./utils.hpp" | ||
#include "static_sprites.hpp" | ||
#include "static_maps.hpp" | ||
|
||
using namespace acts::avg_scripts; | ||
using namespace naive_engine; | ||
using namespace silly_framework; | ||
|
||
void acts::avg_scripts::genshin_pursuit_author(avg_scene& self, const std::optional<eng::basics::vec2>& spawn, const std::string& arg) { | ||
coutils::sync::unleash_lambda([&]() -> coutils::async_fn<void> { | ||
// 出生点 | ||
basics::vec2 spawn_pos = spawn.value_or(points.genshin_pursuit_author_default); | ||
simulator::entity_node_t person(basics::aabb(-16, 16, -12, 12), spawn_pos); | ||
self.simu.emplace(512, 512); | ||
utils::add_main_char(self, person); | ||
|
||
self.bound_map.emplace(&maps::genshin_pursuit_author(), 4.0); | ||
self.bound_sprites[person.ptr()] = {&sprites::container_small(), 4.0, {0, -36}}; | ||
|
||
// 地图边界固定阻挡物 | ||
simulator::entity_node_t obstacles[] = { | ||
{basics::aabb{0, 512, 0, 192}}, | ||
{basics::aabb{0, 512, 320, 512}}, | ||
{basics::aabb{0, 288, 192, 320}}, | ||
}; | ||
utils::add_map_obstacles(self, obstacles); | ||
|
||
simulator::entity_node_t | ||
leave = {basics::aabb{496, 512, 192, 320}}; | ||
utils::add_trigger_boxes(self, leave); | ||
utils::coll_event_table colls { | ||
{ {person.ptr(), leave.ptr()}, [&](){ self.next<acts::avg_scene>("genshin_pursuit_entry", points.genshin_pursuit_entry_bottom); } }, | ||
}; | ||
|
||
while (true) { | ||
auto [_, evt_data] = co_await self.cohost.wait_event({simu_coro_host::EVT_COLLISION}); | ||
utils::check_coll_events(self, colls, evt_data); | ||
} | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include "../avg_scripts.hpp" | ||
#include "./utils.hpp" | ||
#include "static_sprites.hpp" | ||
#include "static_maps.hpp" | ||
|
||
using namespace acts::avg_scripts; | ||
using namespace naive_engine; | ||
using namespace silly_framework; | ||
|
||
void acts::avg_scripts::genshin_pursuit_entry(avg_scene& self, const std::optional<eng::basics::vec2>& spawn, const std::string& arg) { | ||
coutils::sync::unleash_lambda([&]() -> coutils::async_fn<void> { | ||
// 出生点 | ||
basics::vec2 spawn_pos = spawn.value_or(points.genshin_pursuit_entry_default); | ||
simulator::entity_node_t person(basics::aabb(-16, 16, -12, 12), spawn_pos); | ||
self.simu.emplace(512, 640); | ||
utils::add_main_char(self, person); | ||
|
||
self.bound_map.emplace(&maps::genshin_pursuit_entry(), 4.0); | ||
self.bound_sprites[person.ptr()] = {&sprites::container_small(), 4.0, {0, -36}}; | ||
|
||
// 地图边界固定阻挡物 | ||
simulator::entity_node_t obstacles[] = { | ||
{basics::aabb{0, 192, 0, 576}}, | ||
{basics::aabb{320, 512, 0, 640}}, | ||
}; | ||
utils::add_map_obstacles(self, obstacles); | ||
|
||
simulator::entity_node_t | ||
hidden = {basics::aabb{0, 16, 576, 640}}, | ||
launch = {basics::aabb{192, 320, 0, 208}}, | ||
leave = {basics::aabb{192, 320, 624, 640}}; | ||
utils::add_trigger_boxes(self, hidden, launch, leave); | ||
utils::coll_event_table colls { | ||
{ {person.ptr(), hidden.ptr()}, [&](){ self.next<acts::avg_scene>("genshin_pursuit_author", points.genshin_pursuit_author_right); } }, | ||
{ {person.ptr(), launch.ptr()}, [&](){ self.next<acts::avg_scene>("genshin_pursuit_main", points.genshin_pursuit_main_bottom); } }, | ||
{ {person.ptr(), leave.ptr()}, [&](){ self.next<acts::avg_scene>("dorm_room", std::nullopt, "605"); } }, | ||
}; | ||
|
||
while (true) { | ||
auto [_, evt_data] = co_await self.cohost.wait_event({simu_coro_host::EVT_COLLISION}); | ||
utils::check_coll_events(self, colls, evt_data); | ||
} | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "../avg_scripts.hpp" | ||
#include "./utils.hpp" | ||
#include "static_sprites.hpp" | ||
#include "static_maps.hpp" | ||
|
||
using namespace acts::avg_scripts; | ||
using namespace naive_engine; | ||
using namespace silly_framework; | ||
|
||
void acts::avg_scripts::genshin_pursuit_main(avg_scene& self, const std::optional<eng::basics::vec2>& spawn, const std::string& arg) { | ||
coutils::sync::unleash_lambda([&]() -> coutils::async_fn<void> { | ||
// 出生点 | ||
basics::vec2 spawn_pos = spawn.value_or(points.genshin_pursuit_entry_default); | ||
simulator::entity_node_t person(basics::aabb(-16, 16, -12, 12), spawn_pos); | ||
self.simu.emplace(2048, 1536); | ||
utils::add_main_char(self, person); | ||
|
||
self.bound_map.emplace(&maps::genshin_pursuit_main(), 4.0); | ||
self.bound_sprites[person.ptr()] = {&sprites::container_small(), 4.0, {0, -36}}; | ||
|
||
// 地图边界固定阻挡物 | ||
//simulator::entity_node_t obstacles[] = {}; | ||
//utils::add_map_obstacles(self, obstacles); | ||
|
||
simulator::entity_node_t | ||
leave = {basics::aabb{896, 1152, 1408, 1536}}; | ||
utils::add_trigger_boxes(self, leave); | ||
utils::coll_event_table colls { | ||
{ {person.ptr(), leave.ptr()}, [&](){ self.next<acts::avg_scene>("genshin_pursuit_entry", points.genshin_pursuit_entry_top); } }, | ||
}; | ||
|
||
while (true) { | ||
auto [_, evt_data] = co_await self.cohost.wait_event({simu_coro_host::EVT_COLLISION}); | ||
utils::check_coll_events(self, colls, evt_data); | ||
} | ||
}); | ||
} |
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
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