tracer/src/Object.hs
2018-07-30 15:34:45 +02:00

29 lines
614 B
Haskell

{-# LANGUAGE MultiParamTypeClasses #-}
module Object where
import Affection
import Data.Ecstasy
import Types
instance ObjectAction UserData ObjType where
objectAction ObjCopier ent = do
ud <- getAffection
(nws, _) <- liftIO $ yieldSystemT (worldState ud) $ do
emap (anEnt ent) $ do
with anim
liftIO $ logIO Debug "copying!"
let nstat = AnimState
(AnimId "copier" "copy" N)
0
0
return unchanged
{ anim = Set nstat
}
putAffection ud
{ worldState = nws
}
objectAction _ _ = return ()