Reorganise weapons

This commit is contained in:
2021-12-06 17:41:53 +00:00
parent b058fba814
commit 19540bd19e
12 changed files with 570 additions and 458 deletions
+12
View File
@@ -0,0 +1,12 @@
module Dodge.Item.Weapon.BulletGun.Clip where
import Dodge.Data
import Shape
import Geometry
import Data.Maybe
import Control.Lens
makeClipAt :: Float -> Point3 -> Item -> Shape
makeClipAt r p it = translateSH p . overPosSH (rotate3z r) $ upperPrismPoly 1 $ rectNSEW 0 (-y) (-2) 2
where
y = fromIntegral y' * 0.3
y' = fromMaybe 0 $ it ^? itConsumption . ammoLoaded