diff options
author | Joris | 2015-11-15 20:17:25 +0100 |
---|---|---|
committer | Joris | 2015-11-15 20:17:25 +0100 |
commit | 79a9db1c532995c7c760bfb518b43d92dd703280 (patch) | |
tree | 3a9fce622db301b8ebcc9f4f2c50ad89e4e7c182 /src/Model | |
parent | 4710e5ac30c44ca8b48a0b2b60ea74b1573b084b (diff) |
Change points move type and speed at each level
Diffstat (limited to 'src/Model')
-rw-r--r-- | src/Model/Level.elm | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/Model/Level.elm b/src/Model/Level.elm index 8b28ad3..a271653 100644 --- a/src/Model/Level.elm +++ b/src/Model/Level.elm @@ -1,5 +1,6 @@ module Model.Level ( currentLevel + , currentLevelNumber , progressiveColor ) where @@ -7,14 +8,25 @@ import Time exposing (Time) import Debug import Model.Color exposing (..) +import Model.Vec2 exposing (..) +import Model.Point exposing (pointSpeed) + +import Utils.Physics exposing (getMove, getWaveMove) levelScoreDuration : Int -levelScoreDuration = 20 +levelScoreDuration = 15 type alias Level = { color : Color + , move : Vec2 -> Vec2 -> Time -> Vec2 } +currentLevelNumber : Int -> Int +currentLevelNumber currentScore = + min + (List.length levels + 1) + (currentScore // levelScoreDuration + 1) + currentLevel : Int -> Level currentLevel currentScore = levels @@ -40,28 +52,39 @@ progressiveRatio a b = (toFloat a ^ 7) / (toFloat b ^ 7) levels : List Level levels = [ { color = { red = 156, green = 168, blue = 233 } + , move initPos initDest delta = getMove (delta / 20) (initDest `sub` initPos) } , { color = { red = 190, green = 156, blue = 233 } + , move initPos initDest delta = getWaveMove (delta / 20) (initDest `sub` initPos) 10 10 } , { color = { red = 233, green = 156, blue = 232 } + , move initPos initDest delta = getMove (delta / 18) (initDest `sub` initPos) } , { color = { red = 233, green = 156, blue = 187 } + , move initPos initDest delta = getWaveMove (delta / 18) (initDest `sub` initPos) 20 20 } , { color = { red = 233, green = 171, blue = 156 } + , move initPos initDest delta = getMove (delta / 13) (initDest `sub` initPos) } , { color = { red = 233, green = 215, blue = 156 } + , move initPos initDest delta = getWaveMove (delta / 16) (initDest `sub` initPos) 10 50 } , { color = { red = 206, green = 233, blue = 156 } + , move initPos initDest delta = getMove (delta / 11) (initDest `sub` initPos) } , { color = { red = 162, green = 233, blue = 156 } + , move initPos initDest delta = getWaveMove (delta / 14) (initDest `sub` initPos) 30 15 } , { color = { red = 156, green = 233, blue = 196 } + , move initPos initDest delta = getMove (delta / 8) (initDest `sub` initPos) } , { color = { red = 156, green = 225, blue = 233 } + , move initPos initDest delta = getWaveMove (delta / 12) (initDest `sub` initPos) 30 30 } ] lastLevel : Level lastLevel = { color = { red = 156, green = 225, blue = 233 } + , move initPos initDest delta = getWaveMove (delta / 5) (initDest `sub` initPos) 30 30 } |