module Updating where import {-# SOURCE #-} AfterEffect ( AfterEffect ) import {-# SOURCE #-} Universe ( Arena ) import Common (Time) class InternallyUpdating a where preUpdate :: a -> Time -> a postUpdate :: a -> Time -> a {-| Objects that exist temporarily or that may die after being wounded a certain amount. Should be used for objects whose continued existence depends on some internal variable, e.g., a lifeforce or countdown that may reach zero. -} class (InternallyUpdating a) => Transient a where expired' :: a -> Maybe [AfterEffect] class (InternallyUpdating a) => SimpleTransient a where expired :: a -> Bool class Observant a where updateVision :: a -> Arena -> a