Add wire to central laser room
This commit is contained in:
@@ -15,9 +15,9 @@ import Data.Either
|
||||
damageSensor
|
||||
:: (DamageType -> Either Int Int) -- Left gets sensed, Right does damage
|
||||
-> (Machine -> World -> World)
|
||||
-> Point2 -> Float -> Placement
|
||||
damageSensor damF upf p r = pContID (PS p r) ( PutLS theLS)
|
||||
$ \lsid -> jsps p r $ PutMachine yellow (reverse $ square wdth) defaultMachine
|
||||
-> PlacementSpot -> Placement
|
||||
damageSensor damF upf ps = pContID ps ( PutLS theLS)
|
||||
$ \lsid -> Just $ spNoID ps $ PutMachine yellow (reverse $ square wdth) defaultMachine
|
||||
{ _mcDraw = sensorSPic
|
||||
, _mcUpdate = \mc w -> upf mc $ sensorUpdate damF mc w
|
||||
, _mcLSs = [lsid]
|
||||
@@ -25,7 +25,7 @@ damageSensor damF upf p r = pContID (PS p r) ( PutLS theLS)
|
||||
where
|
||||
theLS = defaultLS { _lsPos = V3 0 0 30 , _lsIntensity = 0.1 }
|
||||
|
||||
lightSensor :: (Machine -> World -> World) -> Point2 -> Float -> Placement
|
||||
lightSensor :: (Machine -> World -> World) -> PlacementSpot -> Placement
|
||||
lightSensor = damageSensor senseLasering
|
||||
|
||||
senseLasering :: DamageType -> Either Int Int
|
||||
|
||||
Reference in New Issue
Block a user