tracer/src/Types/ObjClass.hs

31 lines
656 B
Haskell
Raw Normal View History

2018-08-10 08:58:26 +02:00
{-# LANGUAGE MultiParamTypeClasses #-}
2018-08-10 14:09:07 +02:00
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
2018-08-10 08:58:26 +02:00
module Types.ObjClass where
import Affection
2022-08-04 18:13:53 +02:00
import Control.Monad.Trans.Resource (ResIO)
2018-08-10 08:58:26 +02:00
import Data.Ecstasy
import Types.Entity
class ObjectAction otype ostate where
objectAction
:: Double
2018-08-10 08:58:26 +02:00
-> otype
-> ostate
-> Ent
2022-08-04 18:13:53 +02:00
-> SystemT Entity (AffectionState AffectionData ResIO) ()
2018-08-10 08:58:26 +02:00
objectTransition
:: otype
-> ostate
-> Bool
2018-08-10 08:58:26 +02:00
-> Ent
2018-09-13 00:51:22 +02:00
-> Maybe Ent
2022-08-04 18:13:53 +02:00
-> SystemT Entity (AffectionState AffectionData ResIO) (Entity 'SetterOf)
2018-08-10 08:58:26 +02:00
class ActionTime otype ostate where
actionTime :: otype -> ostate -> Double