summaryrefslogtreecommitdiff
path: root/battles/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-11-12 14:28:39 +0100
committerAki <please@ignore.pl>2022-11-12 14:28:39 +0100
commitc6d17ef545978bec555c8af8ef5eaef82c44e5f1 (patch)
tree461fff66de35a9f26aebde8cffc6386efa8e104f /battles/include
parent0e57ea98049658b4d82488c43d71b4ced534c2af (diff)
downloadkurator-c6d17ef545978bec555c8af8ef5eaef82c44e5f1.zip
kurator-c6d17ef545978bec555c8af8ef5eaef82c44e5f1.tar.gz
kurator-c6d17ef545978bec555c8af8ef5eaef82c44e5f1.tar.bz2
Implemented very basic linear move-to-dest component
Diffstat (limited to 'battles/include')
-rw-r--r--battles/include/kurator/battles/Point.h7
-rw-r--r--battles/include/kurator/battles/components.h13
2 files changed, 20 insertions, 0 deletions
diff --git a/battles/include/kurator/battles/Point.h b/battles/include/kurator/battles/Point.h
index 71a6993..b6be651 100644
--- a/battles/include/kurator/battles/Point.h
+++ b/battles/include/kurator/battles/Point.h
@@ -11,6 +11,13 @@ struct Point
{
double x;
double y;
+ double magnitude() const;
+ double distance(const Point& other) const;
+ Point rotate(double angle) const;
+ Point scale(double _scale) const;
+ Point normalized() const;
+ Point operator-(const Point& other) const;
+ Point operator+(const Point& other) const;
};
diff --git a/battles/include/kurator/battles/components.h b/battles/include/kurator/battles/components.h
index 307acc3..0c1e280 100644
--- a/battles/include/kurator/battles/components.h
+++ b/battles/include/kurator/battles/components.h
@@ -25,5 +25,18 @@ struct Team
};
+struct AIState
+{
+ Point destination;
+ entt::entity target = entt::null;
+};
+
+
+struct FloatingMovement
+{
+ double speed; // linear and instant angular for now
+};
+
+
} // namespace battles
} // namespace kurator