Start work on clouds, damage, sensors
This commit is contained in:
+17
-13
@@ -1,26 +1,30 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
|
||||
--{-# LANGUAGE StrictData #-}
|
||||
module Data.Tile where
|
||||
import Geometry.Data
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
import Geometry.Data
|
||||
|
||||
data Floor
|
||||
data Floor
|
||||
= InheritFloor
|
||||
-- | TileWith Float
|
||||
| Tiled { _tiles :: [Tile]}
|
||||
| -- | TileWith Float
|
||||
Tiled {_tiles :: [Tile]}
|
||||
|
||||
data Tile = Tile
|
||||
{ _tilePoly :: [Point2]
|
||||
, _tileZero :: Point2 -- ^ point in the world where tile texture is 0,0
|
||||
, _tileTangentPos :: Point2
|
||||
-- ^ world position one along in the X direction, note this also set the scale of the
|
||||
-- texture
|
||||
-- this has to be a position because it is shifted
|
||||
, _tileArrayZ :: Float
|
||||
, -- | point in the world where tile texture is 0,0
|
||||
_tileZero :: Point2
|
||||
, -- | world position one along in the X direction, note this also set the scale of the
|
||||
-- texture
|
||||
-- this has to be a position because it is shifted
|
||||
_tileTangentPos :: Point2
|
||||
, _tileArrayZ :: Float
|
||||
}
|
||||
deriving (Eq, Ord, Show)
|
||||
deriving (Eq, Ord, Show)
|
||||
|
||||
makeLenses ''Floor
|
||||
makeLenses ''Tile
|
||||
deriveJSON defaultOptions ''Tile
|
||||
|
||||
Reference in New Issue
Block a user