Module

Nemo.Utils

Package
purescript-nemo
Repository
opyapeus/purescript-nemo

#mkAsset Source

mkAsset :: Array RawMap -> Array RawSound -> Effect Asset

Make asset data from raw maps and raw sounds. If there are unparsable strings, exception raised when executing javascript.

#emptyAsset Source

emptyAsset :: Asset

Empty asset for convenience.

#defaultDebugConfig Source

defaultDebugConfig :: DebugConfig

Default debug config for convenience.

#isMapCollide Source

isMapCollide :: Asset -> MapId -> Size -> Array Emoji -> Size -> X -> Y -> Boolean

Map collision detection. Given emojis are treated as walls.

#getMapEmoji Source

getMapEmoji :: Asset -> MapId -> IdX -> IdY -> Maybe Emoji

Get map emoji with given indices. Return Nothing there is not emoji.

#isMonitorCollide Source

isMonitorCollide :: Size -> X -> Y -> Boolean

Collision detection if an object protrudes out of monitor

#isOutOfMonitor Source

isOutOfMonitor :: Size -> X -> Y -> Boolean

Collision detection if an object completely protrudes out of monitor

#isCollide Source

isCollide :: Size -> X -> Y -> Size -> X -> Y -> Boolean

Collision detection between two objects