Add file
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
{-# LANGUAGE StrictData #-}
|
||||||
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
module Dodge.Data.Terminal.Status
|
||||||
|
where
|
||||||
|
import Control.Lens
|
||||||
|
import Data.Aeson
|
||||||
|
import Data.Aeson.TH
|
||||||
|
|
||||||
|
data TerminalStatus = TerminalOff | TerminalBusy | TerminalTextInput {_tiText :: String}
|
||||||
|
| TerminalPressTo {_tptString :: String}
|
||||||
|
-- | TerminalArgumentInput TerminalCommand
|
||||||
|
deriving Eq
|
||||||
|
|
||||||
|
makeLenses ''TerminalStatus
|
||||||
|
deriveJSON defaultOptions ''TerminalStatus
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
module Dodge.SpawnAt (respawn) where
|
||||||
|
|
||||||
|
--import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||||
|
import Dodge.Creature
|
||||||
|
import Geometry.Data
|
||||||
|
import Dodge.Data.World
|
||||||
|
import Control.Lens
|
||||||
|
--import Control.Applicative
|
||||||
|
--import Linear.V3
|
||||||
|
|
||||||
|
respawn :: World -> World
|
||||||
|
respawn w = w & uncurry spawnAt (w ^. cWorld . lWorld . respawnPos)
|
||||||
|
|
||||||
|
spawnAt :: Point2 -> Float -> World -> World
|
||||||
|
spawnAt p d w = w
|
||||||
|
& wCam . camZoom .~ 1000
|
||||||
|
-- & cWorld . lWorld . creatures . at 0 %~ (fmap f . (<|> Just startCr))
|
||||||
|
& cWorld . lWorld . creatures . at 0 ?~ f startCr
|
||||||
|
-- & cWorld . lWorld . worldEvents <>~
|
||||||
|
---- SoundStart BackgroundSound p foamSprayFadeOutS Nothing :
|
||||||
|
-- [MakeStartCloudAt (V3 x y 20 & _xy +~ p) | x <- [-5, -4 .. 5], y <- [-5, -4 .. 5]]
|
||||||
|
where
|
||||||
|
f = set crPos p . set crDir d . set crMvDir d . set crMvAim d . set crZ 0 . set crZVel 0
|
||||||
Reference in New Issue
Block a user