add policeman
This commit is contained in:
parent
d9a8045daa
commit
42a8636bc4
5 changed files with 22 additions and 3 deletions
BIN
assets/policem.kra
Normal file
BIN
assets/policem.kra
Normal file
Binary file not shown.
BIN
assets/policem.png
Normal file
BIN
assets/policem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
14
src/Load.hs
14
src/Load.hs
|
@ -335,6 +335,18 @@ loadFork ws win glc nvg future progress = do
|
||||||
)))
|
)))
|
||||||
jdoemWalking <- loadAnimationSprites "assets/jdoem.png" nvg
|
jdoemWalking <- loadAnimationSprites "assets/jdoem.png" nvg
|
||||||
(zip (walkIds AnimJDoeM) walkConfigs)
|
(zip (walkIds AnimJDoeM) walkConfigs)
|
||||||
|
modifyMVar_ progress (return . (\(p, _) ->
|
||||||
|
( p + increment
|
||||||
|
, "Loading Animation \"policem: standing\""
|
||||||
|
)))
|
||||||
|
policemStanding <- loadAnimationSprites "assets/policem.png" nvg
|
||||||
|
(zip (standIds AnimPoliceM) standConfigs)
|
||||||
|
modifyMVar_ progress (return . (\(p, _) ->
|
||||||
|
( p + increment
|
||||||
|
, "Loading Animation \"policem: walking\""
|
||||||
|
)))
|
||||||
|
policemWalking <- loadAnimationSprites "assets/policem.png" nvg
|
||||||
|
(zip (walkIds AnimPoliceM) walkConfigs)
|
||||||
modifyMVar_ progress (return . (\(p, _) ->
|
modifyMVar_ progress (return . (\(p, _) ->
|
||||||
( p + increment
|
( p + increment
|
||||||
, "Loading Animation \"copier: stand\""
|
, "Loading Animation \"copier: stand\""
|
||||||
|
@ -503,6 +515,8 @@ loadFork ws win glc nvg future progress = do
|
||||||
playerWalking ++
|
playerWalking ++
|
||||||
jdoemStanding ++
|
jdoemStanding ++
|
||||||
jdoemWalking ++
|
jdoemWalking ++
|
||||||
|
policemStanding ++
|
||||||
|
policemWalking ++
|
||||||
copierStand ++
|
copierStand ++
|
||||||
copierCopy ++
|
copierCopy ++
|
||||||
cornerComputerOff ++
|
cornerComputerOff ++
|
||||||
|
|
|
@ -109,7 +109,7 @@ loadMapFork ud ad future progress = do
|
||||||
fc = FloorConfig
|
fc = FloorConfig
|
||||||
(V2 10 10)
|
(V2 10 10)
|
||||||
[(V2 5 5), (V2 5 20)]
|
[(V2 5 5), (V2 5 20)]
|
||||||
(50, 50)
|
(40, 40)
|
||||||
modifyMVar_ progress (return . (\(p, _) ->
|
modifyMVar_ progress (return . (\(p, _) ->
|
||||||
( p + increment
|
( p + increment
|
||||||
, "Building floor"
|
, "Building floor"
|
||||||
|
@ -262,6 +262,7 @@ loadMapFork ud ad future progress = do
|
||||||
<*> (randomRIO (0, 1))
|
<*> (randomRIO (0, 1))
|
||||||
<*> (randomRIO (0, 1))
|
<*> (randomRIO (0, 1))
|
||||||
<*> (randomRIO (0, 1))
|
<*> (randomRIO (0, 1))
|
||||||
|
police <- liftIO $ randomRIO (0 :: Int, 9 :: Int)
|
||||||
let room = V.head
|
let room = V.head
|
||||||
(V.filter
|
(V.filter
|
||||||
((inBounds $ pointCoord cpr) . bounds)
|
((inBounds $ pointCoord cpr) . bounds)
|
||||||
|
@ -278,7 +279,8 @@ loadMapFork ud ad future progress = do
|
||||||
, npcActionState = Just ASWork
|
, npcActionState = Just ASWork
|
||||||
, npcStats = Just stats
|
, npcStats = Just stats
|
||||||
, clearanceLvl = Just (clearance room)
|
, clearanceLvl = Just (clearance room)
|
||||||
, anim = Just $ AnimState (AnimId AnimJDoeM "standing" SE) 0 0
|
, anim = Just $ AnimState
|
||||||
|
(AnimId (if police == 0 then AnimPoliceM else AnimJDoeM) "standing" SE) 0 0
|
||||||
}
|
}
|
||||||
) computers
|
) computers
|
||||||
liftIO $ modifyMVar_ progress (return . (\(p, _) ->
|
liftIO $ modifyMVar_ progress (return . (\(p, _) ->
|
||||||
|
@ -641,10 +643,12 @@ drawMap = do
|
||||||
"FPS: "
|
"FPS: "
|
||||||
<> T.pack (Prelude.take 5 $ show (1/dt))
|
<> T.pack (Prelude.take 5 $ show (1/dt))
|
||||||
<> " Clearance: "
|
<> " Clearance: "
|
||||||
<> if not (Prelude.null room)
|
<> (if not (Prelude.null room)
|
||||||
then T.pack (show $ clearance $ V.head room)
|
then T.pack (show $ clearance $ V.head room)
|
||||||
else "0"
|
else "0"
|
||||||
)
|
)
|
||||||
|
<> "\nFor answers call 6350"
|
||||||
|
)
|
||||||
|
|
||||||
drawTile
|
drawTile
|
||||||
:: UserData
|
:: UserData
|
||||||
|
|
|
@ -46,6 +46,7 @@ data AnimationName
|
||||||
| AnimComputer
|
| AnimComputer
|
||||||
| AnimToilet
|
| AnimToilet
|
||||||
| AnimJDoeM
|
| AnimJDoeM
|
||||||
|
| AnimPoliceM
|
||||||
| AnimDoor0
|
| AnimDoor0
|
||||||
deriving (Show, Eq, Ord, Enum)
|
deriving (Show, Eq, Ord, Enum)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue