more animation cleanup.
This commit is contained in:
@@ -76,7 +76,9 @@
|
||||
:inventory #{}
|
||||
:x 150 :y 95
|
||||
:id "ego"}]
|
||||
(merge (texture (animation! (:right ego) :get-key-frame 0.25)) ego)))
|
||||
(actions/start-animation screen
|
||||
(merge (animation->texture screen (:stand ego)) ego)
|
||||
:stand)))
|
||||
|
||||
(defn update-from-script [screen {{:keys [current started? channel]} :actions :as entities}]
|
||||
(if current
|
||||
@@ -127,7 +129,9 @@
|
||||
|
||||
peddler-sheet (texture! (texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||
peddler-talk (animation 0.18 (for [i (flatten [2 3 2 3 2 3 6 1 0 1 0 1 0 1 0 1 2 3 2 3 2 3 6 4 5 4 5 4 5 4 5])]
|
||||
(aget peddler-sheet 0 i)))]
|
||||
(aget peddler-sheet 0 i)))
|
||||
peddler-stand (animation 0.2 (for [i (flatten [(repeat 5 0) 6])]
|
||||
(aget peddler-sheet 0 i)))]
|
||||
{:outside-house
|
||||
(make-background :interactions
|
||||
{:door {:box [258 100 281 160]
|
||||
@@ -196,7 +200,10 @@
|
||||
(actions/talk entities :peddler "...and useful books like this:")
|
||||
(actions/talk entities :peddler "'Checkers Mastery in Less Than 10 Seconds'"))}}
|
||||
:layers [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:entities {:peddler (assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil :talk peddler-talk)}
|
||||
:entities {:peddler (actions/start-animation screen
|
||||
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
||||
:talk peddler-talk :stand peddler-stand)
|
||||
:stand)}
|
||||
:collision "outside-castle/collision.png"
|
||||
:scale-fn (scaler-fn-with-baseline 110 0.10 1.00))}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user