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

@@ -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."))}
)