HGE2D-0.1.7.4: 2D game engine written in Haskell

Copyright(c) 2016 Martin Buck
Licensesee LICENSE
Safe HaskellNone
LanguageHaskell2010

HGE2D.Classes

Description

Containing class definitions used within HGE2D

Synopsis

Documentation

class Dynamic a where Source #

For types which are affected by time

Minimal complete definition

moveInTime

Methods

moveInTime :: Millisecond -> a -> a Source #

class GlRender a where Source #

For types than can be directly rendered to GL (only required by the engine) Use GlInstructable to define your rendereble types

Minimal complete definition

glRender

Methods

glRender :: a -> IO () Source #

class GlInstructable a where Source #

For types which can be turned into render instructions to be rendered by the engine

Minimal complete definition

toGlInstruction

class HasBoundingBox a where Source #

For types which have a bounding box

Minimal complete definition

getBB

Methods

getBB :: a -> BoundingBox Source #

class IsPhysicalObject a where Source #

For types which have / are a physical object

Minimal complete definition

getPhys, setPhys

class Positioned a where Source #

For types which are positioned in space

Minimal complete definition

getPos, getX, getY

Methods

getPos :: a -> RealPosition Source #

getX :: a -> Double Source #

getY :: a -> Double Source #

class Moveable a where Source #

For types which can be moved in space

Minimal complete definition

moveBy, moveTo

Methods

moveBy :: RealPosition -> a -> a Source #

moveTo :: RealPosition -> a -> a Source #

class Acceleratable a where Source #

For types which can be accelerated

Minimal complete definition

accBy, accTo

Methods

accBy :: Velocity -> a -> a Source #

accTo :: Velocity -> a -> a Source #