2018-08-10 08:58:26 +02:00
|
|
|
module Types.Entity where
|
|
|
|
|
|
|
|
import Data.Ecstasy
|
|
|
|
|
|
|
|
import Linear (V2)
|
|
|
|
|
|
|
|
import Types.Direction
|
|
|
|
import Types.Map
|
|
|
|
import Types.NPCState
|
|
|
|
import Types.Animation
|
|
|
|
import Types.ObjType
|
2018-09-08 14:05:07 +02:00
|
|
|
import Types.ReachPoint
|
2018-08-10 08:58:26 +02:00
|
|
|
|
|
|
|
data Entity f = Entity
|
2018-08-10 11:35:08 +02:00
|
|
|
{ pos :: Component f 'Field (V2 Double)
|
|
|
|
, mmpos :: Component f 'Field (V2 Double)
|
|
|
|
, gridPos :: Component f 'Field (V2 Int)
|
|
|
|
, vel :: Component f 'Field (V2 Double)
|
2018-10-13 00:07:19 +02:00
|
|
|
, xyvel :: Component f 'Field (V2 Double)
|
2018-08-10 11:35:08 +02:00
|
|
|
, mmvel :: Component f 'Field (V2 Double)
|
|
|
|
, velFact :: Component f 'Field Double
|
|
|
|
, rot :: Component f 'Field Direction
|
|
|
|
, obstacle :: Component f 'Field (Boundaries Double)
|
2019-02-15 20:02:34 +01:00
|
|
|
, ignoreObstacle :: Component f 'Field ()
|
2018-08-10 11:35:08 +02:00
|
|
|
, player :: Component f 'Unique ()
|
|
|
|
, npcMoveState :: Component f 'Field NPCMoveState
|
2018-09-08 14:05:07 +02:00
|
|
|
, npcWorkplace :: Component f 'Field ReachPoint
|
2018-09-07 23:39:53 +02:00
|
|
|
, npcActionState :: Component f 'Field NPCActionState
|
|
|
|
, npcStats :: Component f 'Field NPCStats
|
2019-02-14 22:31:00 +01:00
|
|
|
, clearanceLvl :: Component f 'Field Word
|
2018-08-10 11:35:08 +02:00
|
|
|
, anim :: Component f 'Field AnimState
|
2019-02-16 20:38:00 +01:00
|
|
|
, objAccess :: Component f 'Field [((V2 Int), Direction)]
|
2018-08-10 11:35:08 +02:00
|
|
|
, objType :: Component f 'Field ObjType
|
|
|
|
, objState :: Component f 'Field ObjState
|
|
|
|
, objStateTime :: Component f 'Field Double
|
2018-09-13 00:51:22 +02:00
|
|
|
, objUsedBy :: Component f 'Field Ent
|
2018-08-10 11:35:08 +02:00
|
|
|
, objPlayerActivated :: Component f 'Field Bool
|
2018-08-11 11:51:20 +02:00
|
|
|
, objSolved :: Component f 'Field Bool
|
2018-08-10 08:58:26 +02:00
|
|
|
}
|
|
|
|
deriving (Generic)
|