aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Player.elm
blob: 2085aac1e0c1ac64e3e450ca7aebb5b945f5c37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Model.Player
  ( Player
  , initPlayer
  , playerSize
  , playerSpeed
  ) where

import Model.Vec2 exposing (..)
import Model.Config exposing (..)

type alias Player =
  { pos : Vec2
  , speed : Vec2
  , config : Config
  }

initPlayer : Player
initPlayer =
  { pos = originVec
  , speed = originVec
  , config = White
  }

playerSize : Float
playerSize = 15

playerSpeed : Float -> Float
playerSpeed dt = dt / 200