Fix ellipse shader coordinates
This commit is contained in:
@@ -16,6 +16,7 @@ import Dodge.WorldEvent.Sound
|
||||
import Dodge.Creature.Update hiding (CRUpdate)
|
||||
import Picture
|
||||
import qualified IntMapHelp as IM
|
||||
import Geometry
|
||||
|
||||
import Control.Lens
|
||||
|
||||
@@ -26,10 +27,21 @@ lamp :: Creature
|
||||
lamp = defaultInanimate
|
||||
{ _crUpdate = initialiseLamp
|
||||
, _crHP = 100
|
||||
, _crPict = picAtCrPos $ onLayer CrLayer $ color white $ circleSolid 3
|
||||
, _crPict = picAtCrPos lampPic
|
||||
, _crRad = 3
|
||||
, _crMass = 3
|
||||
}
|
||||
lampPic :: Picture
|
||||
lampPic = pictures
|
||||
[ setDepth 0 $ color white $ p
|
||||
, setDepth (negate 0.1) $ color yellow $ p
|
||||
, setDepth (negate 0.5) $ color green $ p
|
||||
, setDepth (negate 0.7) $ color red $ p
|
||||
, setDepth (negate 0.9) $ color blue $ p
|
||||
, setDepth (negate 1) $ color white $ p
|
||||
]
|
||||
where
|
||||
p = pictures [circleSolid 3, polygon $ rectNSEW 5 0 5 0]
|
||||
|
||||
initialiseLamp :: CRUpdate
|
||||
initialiseLamp w (f,g) cr = ( (addLS . f , g), Just $ cr & crUpdate .~ updateLamp i)
|
||||
|
||||
Reference in New Issue
Block a user