File tree Expand file tree Collapse file tree 7 files changed +14
-23
lines changed
dev/tinyswords_models/tower Expand file tree Collapse file tree 7 files changed +14
-23
lines changed Original file line number Diff line number Diff line change 55namespace brl_debug
66{
77
8+ /* *
9+ * This function draws a mesh quickly without having to clarify a material. Used for debug purposes.
10+ * @param buffer The mesh to be drawn.
11+ * @param transform The model matrix for the mesh to be drawn.
12+ */
813 void drawMesh (brl::GfxAttribBuffer* buffer, glm::mat4 transform);
14+
15+
16+ /* *
17+ * Thsi function draws a line between two points. Used for debug purposes.
18+ * @param start The start of the line.
19+ * @param end The end of thr line.
20+ */
921 void drawLine (glm::vec3 start, glm::vec3 end);
1022
1123} // namespace brl
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ enum EnemyTeam : int;
1111
1212struct PlayerEntity : ActorBehaviour
1313{
14+
1415 PlayerEntity ();
1516
1617 void handleAttack (glm::vec3 dir, float power) override ;
Original file line number Diff line number Diff line change @@ -197,25 +197,7 @@ void EnemyController::update()
197197 velocity.x = diff.x ;
198198 velocity.y = diff.z ;
199199 wanderPosition = position ();
200- } else {
201- if (glm::distance (position (),wanderPosition) < 1 .0f ) {
202- glm::vec3 pos = spawner->position ();
203- float angle = brl::random (0 ,360 );
204- angle = glm::radians (angle);
205-
206- float radius = brl::random_float (2 .5f ,5 );
207-
208- pos.x += radius * glm::cos (angle);
209- pos.z += radius * glm::sin (angle);
210-
211- wanderPosition = pos;
212- }
213- glm::vec3 diff = wanderPosition - position ();
214- diff = normalize (diff);
215-
216- velocity.x = diff.x ;
217- velocity.y = diff.z ;
218- }
200+ }
219201 }
220202
221203 float horizontal = velocity.x ;
You can’t perform that action at this time.
0 commit comments