Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Module Mario

Character

type Character = { node :: Node, x :: Number, y :: Number, dx :: Number, dy :: Number, dir :: Direction }

Direction

data Direction
  = Left
  | Right

SpriteDescriptor

type SpriteDescriptor = String

Activity

data Activity
  = Walking
  | Standing
  | Jumping

gravity

gravity :: Number

maxMoveSpeed

maxMoveSpeed :: Number

groundAccel

groundAccel :: Number

airAccel

airAccel :: Number

groundFriction

groundFriction :: Number

airFriction

airFriction :: Number

jumpCoefficient

jumpCoefficient :: Number

minJumpSpeed

minJumpSpeed :: Number

charSpriteDescriptor

charSpriteDescriptor :: Character -> SpriteDescriptor

isAirborne

isAirborne :: Character -> Boolean

accel

accel :: Character -> Number

friction

friction :: Character -> Number

velocity

velocity :: Character -> Character

applyGravity

applyGravity :: Character -> Character

walk

walk :: Boolean -> Boolean -> Character -> Character

jump

jump :: Boolean -> Character -> Character

marioLogic

marioLogic :: { left :: Boolean, right :: Boolean, jump :: Boolean } -> Character -> Character