Enemy AI is now prototyped and can find the player and attack them.
This commit is contained in:
parent
ad71631809
commit
f3e157a0f7
6 changed files with 78 additions and 38 deletions
|
@ -198,7 +198,10 @@ namespace DinkyECS
|
|||
return !queue.empty();
|
||||
}
|
||||
|
||||
/* std::optional can't do references. Don't try it! */
|
||||
/* std::optional can't do references. Don't try it!
|
||||
* Actually, this sucks, either delete it or have it
|
||||
* return pointers (assuming optional can handle pointers)
|
||||
*/
|
||||
template <typename Comp>
|
||||
std::optional<Comp> get_if(DinkyECS::Entity entity) {
|
||||
if(has<Comp>(entity)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue