Unify bullet creation

This commit is contained in:
2022-02-28 21:36:42 +00:00
parent 419fcd0ff0
commit fd62b5a3b7
13 changed files with 78 additions and 274 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ turnTo turnSpeed sp tp a
vecTurnTo :: Float -> Point2 -> Point2 -> Point2 -> Point2
vecTurnTo turnSpeed sp tp vdir
| angleVV vToTarg vdir <= turnSpeed
= argV vdir *.* normalizeV vToTarg
= magV vdir *.* normalizeV vToTarg
| isLHS (sp +.+ vdir) sp tp = rotateV (negate turnSpeed) vdir
| otherwise = rotateV turnSpeed vdir
where