progress on ending.

This commit is contained in:
Bryce Covert
2015-11-13 18:35:01 -08:00
parent 56760a2efd
commit 3260b1cca5
34 changed files with 699 additions and 512 deletions

View File

@@ -14,7 +14,8 @@
[play-clj.math :refer :all]
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
[play-clj.g2d :refer :all])
(:import [com.badlogic.gdx.graphics Color]))
(defn make [screen]
(let [
@@ -34,6 +35,12 @@
duke-reach (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [3 4 5 6])
duke-reach-talk (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [6 7])
duke-knight (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 [8 9 10 9 8])
georgia-stand (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [(repeat 20 0) 1 (repeat 10 0) 1]))
georgia-talk (utils/make-anim "georgia/stand.png" [20 43] 0.2 (flatten [0 2 0 2 0 1 0 0 2]))
georgia-kick (utils/make-anim-seq "georgia/kick" [40 43] 0.1 (flatten [(repeat 10 0) (repeat 7 1) (repeat 7 2)
3 4 5 6 7 8 9 10 11 12 13 (repeat 10 14)
15 16 17 18 19 (repeat 10 0)]))
scaler (utils/scaler-fn-with-baseline 20 0.01 1.20)]
(rooms/make :music :dream
:name "Ending"
@@ -42,6 +49,19 @@
(assoc (utils/get-texture "ending-castle/ending-castle2-assets/foreground.png") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)]
:apply-state (fn [screen e]
(update-in e [:room :entities :ego] dissoc :talk-override ))
:georgia (rooms/make-entity :georgia (assoc (animation->texture screen georgia-stand)
:x 101 :y 23 :baseline 217
:scale-x 1.2
:scale-y 1.2
:talk-color (Color/valueOf "ffabe0ff")
:opacity 0.0
:anim georgia-stand
:anim-start 0
:stand georgia-stand
:talk georgia-talk
:kick georgia-kick
:anim-merges {georgia-stand {:origin-x 10 :origin-y 0}
georgia-kick {:origin-x 20 :origin-y 0}}))
:entities {:peddler (assoc (animation->texture screen peddler-stand)
:x 245 :y 46 :baseline 200
:anim peddler-stand
@@ -52,8 +72,11 @@
:anim warden-stand
:anim-start 0
:scale-x 1.1
:scale-y 1.1
)
:scale-y 1.1)
:frankie (assoc (common/make-frankie screen)
:x 28 :y 21 :baseline 200
:scale-x 1.2
:scale-y 1.2)
:gandarf (assoc (common/make-wizard screen {:x 205 :y 400 :baseline 199})
:update-fn (fn [screen entities gandarf]
(assoc gandarf :y (or (get-in entities [:gandarf-cloud :y])
@@ -71,9 +94,9 @@
:reach duke-reach
:reach-talk duke-reach-talk
:knight duke-knight)
:magic-frog-particle (doto (assoc (particle-effect "particles/magic-frog") :x 140 :y 49
:magic-frog-particle (doto (assoc (particle-effect "particles/magic-frog") :x 91 :y 23
:baseline 241)
(particle-effect! :set-position 150 49))
(particle-effect! :set-position 91 23))
:ladder-guard-1 (assoc (animation->texture screen ladder-guard-stand-1)
:x 75 :y 69 :baseline (- 240 69)
:anim ladder-guard-stand-1