Continue to refactor item datatypes, add a shape to rockets

This commit is contained in:
2021-11-27 22:05:12 +00:00
parent 652af6b0a9
commit fe02739621
15 changed files with 135 additions and 78 deletions
+7 -2
View File
@@ -188,11 +188,16 @@ reduceSpinBy :: Float -> Prop -> World -> World
reduceSpinBy x pj = props . ix (_pjID pj) . pjSpin *~ x
shellPic :: Prop -> SPic
shellPic pj = (,) mempty $ setDepth 20 . uncurryV translate pos $ rotate (argV accel) basePic
shellPic pj = noPic $ translateSHz 18 . uncurryV translateSHf pos $ rotateSH (argV accel) basePic
where
basePic = color black $ polygon $ map toV2 [(-6,4),(-6,-4),(6,-4),(8,0),(6,4)]
basePic = colorSH black $ upperPrismPoly 4 $ map toV2 [(-6,4),(-6,-4),(6,-4),(8,0),(6,4)]
accel = _pjAcc pj
pos = _pjPos pj
--shellPic pj = (,) mempty $ setDepth 20 . uncurryV translate pos $ rotate (argV accel) basePic
-- where
-- basePic = color blackSH $ polygon $ map toV2 [(-6,4),(-6,-4),(6,-4),(8,0),(6,4)]
-- accel = _pjAcc pj
-- pos = _pjPos pj
pjEffTimeRange
:: (Int,Int)