This commit is contained in:
2024-09-27 21:55:17 +01:00
parent dd6cbc0bfb
commit 6c3d0d5def
21 changed files with 232 additions and 333 deletions
+6 -4
View File
@@ -1,4 +1,6 @@
module Dodge.Projectile.Draw where
module Dodge.Projectile.Draw
( drawProjectile
) where
import Dodge.Data.Item.Use.Consumption.Ammo
import Dodge.Data.Projectile
@@ -7,14 +9,14 @@ import Picture
import Shape
import ShapePicture
drawProjectile :: Proj -> SPic
drawProjectile :: Projectile -> SPic
drawProjectile prj = case _prjDraw prj of
DrawShell -> drawShell prj
DrawRemoteShell -> drawRemoteShell prj
DrawDrone -> drawShell prj
DrawBlankProjectile -> mempty
drawShell :: Proj -> SPic
drawShell :: Projectile -> SPic
drawShell pj =
noPic
. translateSHz 18
@@ -24,7 +26,7 @@ drawShell pj =
shellShape :: Shape
shellShape = colorSH black $ upperPrismPoly Small Typical 4 $ map toV2 [(-6, 4), (-6, -4), (6, -4), (8, 0), (6, 4)]
drawRemoteShell :: Proj -> SPic
drawRemoteShell :: Projectile -> SPic
drawRemoteShell pj
| rem (t + 200) 20 < 9 =
doposition $ noPic shellShape