30 lines
650 B
Haskell
30 lines
650 B
Haskell
{-# LANGUAGE MultiParamTypeClasses #-}
|
|
{-# LANGUAGE TypeSynonymInstances #-}
|
|
{-# LANGUAGE FlexibleInstances #-}
|
|
module Types.ObjClass where
|
|
|
|
import Affection
|
|
|
|
import Data.Ecstasy
|
|
|
|
import Types.Entity
|
|
import Types.UserData
|
|
|
|
class ObjectAction otype ostate where
|
|
objectAction
|
|
:: Double
|
|
-> otype
|
|
-> ostate
|
|
-> Ent
|
|
-> SystemT Entity (AffectionState (AffectionData UserData) IO) ()
|
|
|
|
objectTransition
|
|
:: otype
|
|
-> ostate
|
|
-> Bool
|
|
-> Ent
|
|
-> Maybe Ent
|
|
-> SystemT Entity (AffectionState (AffectionData UserData) IO) (Entity 'SetterOf)
|
|
|
|
class ActionTime otype ostate where
|
|
actionTime :: otype -> ostate -> Double
|