a swift sunrise.

This commit is contained in:
2015-04-07 08:44:49 -07:00
parent 73985732ab
commit 6a7f8ed901
5 changed files with 34 additions and 16 deletions

View File

@@ -304,7 +304,8 @@
:layers {:day [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)]
:night [(assoc (texture "inside-castle/background-dark.png") :x 0 :y 0 :baseline 0)]
:sunrise [(assoc (texture "inside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
:sunrise [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
(assoc (texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)]}
:blackout (assoc (texture "black.png")
:x 0 :y 0
:width 320

View File

@@ -292,7 +292,7 @@
(actions/give entities :carrot))))}}
:layers {:day [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)]
:night [(assoc (texture "outside-castle/background-dark.png") :x 0 :y 0 :baseline 0)]
:sunrise [(assoc (texture "outside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
:sunrise [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)]}
:entities {:peddler (actions/start-animation screen
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
:anim-sound-frames {peddler-stand {23 [:scratch 1.0]}

View File

@@ -14,10 +14,21 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(defn dawn-fade [screen entities]
(as-> entities entities
(assoc-in entities
[:tweens :dawn-fade]
(tween/tween :dawn-fade screen [:dawn :opacity] 1.0 0.0 12.5))
(assoc-in entities
[:dawn :opacity]
1.0)))
(defn walk-to-castle [entities]
(actions/walk-to entities :ego [0 80])
(actions/walk-straight-to entities :ego [-20 80])
(actions/transition-background entities :outside-castle [330 80])
(actions/transition-background entities :outside-castle [330 80] :between dawn-fade)
(actions/walk-straight-to entities :ego [310 80]))
(def ego-sheep-loc
@@ -405,7 +416,8 @@
:scale-x (scaler [10 163])
:scale-y (scaler [10 163])
:script (actions/get-script entities
(actions/talk entities :ego "Aww, it's a newborn lamb!"))
(actions/talk entities :ego "Aww, it's a newborn lamb!")
)
:scripts {:carrot (actions/get-script entities (actions/talk entities :ego "I think it's still nursing."))
:grass (actions/get-script entities (actions/talk entities :ego "I think it's still nursing."))}
)

View File

@@ -570,6 +570,10 @@
:scale-y 20
:baseline 9500
:opacity 0.0)
:dawn (assoc (texture "dawn.png")
:x 0 :y 0 :baseline 240
:colorize? true
:opacity 0.0)
:actions {:object nil
:channel (chan)
:current nil