ImmutableOctet / glare

Glare: Open Source Game Engine written in Modern C++
MIT License
0 stars 0 forks source link

Implement a cohesive interface for controlling another Entity Thread/Script #81

Open ImmutableOctet opened 1 month ago

ImmutableOctet commented 1 month ago

This would look something like:

if (auto some_thread = get_thread("some_thread_name"_hs))
{
    co_await some_thread.pause();
}

where some_thread would be an interface type tied to the underlying EntityThread and/or Script. This type would be convertible to bool, with true indicating that the thread is currently running and linked.

This would be for the current entity, but we would ideally be able to do this for other entities as well.