progress on scene.

This commit is contained in:
2015-05-11 20:23:47 -07:00
parent cfa462bc1c
commit c6aad2a33b
18 changed files with 80 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

View File

@@ -6,5 +6,9 @@
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
<dict>
<key>duration</key>
<real>1</real>
</dict>
</array>
</plist>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -1 +0,0 @@
bryce@bryce-pc.hsd1.wa.comcast.net.5560

View File

@@ -14,16 +14,31 @@
[play-clj.math :refer :all]
[play-clj.g2d :refer :all]))
(defn bloodclot-talk-script [entities]
(actions/talk entities :ego "Let me down Bloodclot!" :anim :suspended-talk)
(actions/do-dialogue entities :bloodclot-head "Not a chance."
:bloodclot-head "It's dinnertime, runt."))
(defn make [screen]
(rooms/make :music :fight
:interactions {}
:layers [(assoc (texture "held/background.png") :x 0 :y 0 :baseline 0)]
:entities {}
:collision "held/collision.png"
:scale-fn (constantly 1.5)
:start-pos [113 120]
:apply-state (fn [screen e]
(-> e
(assoc-in [:cam :paused? ] true)
(update-in [:tweens] dissoc :cam-x :cam-y)
(update-in [:room :entities :ego] #(actions/start-animation screen % :suspended))))))
(let [bloodclot-talk (utils/make-anim "held/bloodclot-head.png" [114 82] 0.1 [0 1 2 1 0 3 3 0 1 2 1 0 3 4 5 6 5 3 3 1 2 1 3 3 3 3 3 0 0 0 7 8 7])
bloodclot-stand (utils/make-anim "held/bloodclot-head.png" [114 82] 0.1 (flatten [(repeat 15 0) 7 8 7]))]
(rooms/make :music :fight
:interactions {}
:layers [(assoc (texture "held/background.png") :x 0 :y 0 :baseline 0)]
:entities {:bloodclot-head (assoc (animation->texture screen bloodclot-stand)
:x 211 :y 114 :baseline 240
:origin-x 57 :origin-y 0
:script (actions/get-script entities
(bloodclot-talk-script entities))
:stand bloodclot-stand
:talk bloodclot-talk
:anim bloodclot-stand
:anim-start 0)}
:collision "held/collision.png"
:scale-fn (constantly 1.5)
:start-pos [113 120]
:apply-state (fn [screen e]
(-> e
(assoc-in [:cam :paused? ] true)
(update-in [:tweens] dissoc :cam-x :cam-y)
(update-in [:room :entities :ego] #(actions/start-animation screen % :suspended)))))))

View File

@@ -364,6 +364,7 @@ void main()
axe (utils/make-anim "ego/axe.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 7)]))
axe-wood (utils/make-anim "ego/axe-wood.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 11)]))
suspended (utils/make-anim "ego/suspended.png" [18 36] 0.10 [0])
suspended-talk (utils/make-anim "ego/suspended.png" [18 36] 0.20 [0 1])
ego {:right {:walk walk-right
:stand stand-anim
@@ -409,6 +410,7 @@ void main()
:axe axe
:axe-wood axe-wood
:suspended suspended
:suspended-talk suspended-talk
}
:left {:walk (utils/flip walk-right)
:stand (utils/flip stand-anim)
@@ -444,7 +446,9 @@ void main()
:idea (utils/flip idea)
:axe (utils/flip axe)
:axe-wood (utils/flip axe-wood)
:suspended (utils/flip suspended)}
:suspended (utils/flip suspended)
:suspended-talk (utils/flip suspended-talk)
}
:baseline (- 240 (last start-pos))
:facing :right
:night-profile :sprite
@@ -537,6 +541,8 @@ void main()
(get-in ego [:left :love]) {:origin-x 36}
(get-in ego [:left :suspended]) {:origin-x 0 :origin-y 0}
(get-in ego [:right :suspended]) {:origin-x 0 :origin-y 0}
(get-in ego [:left :suspended-talk]) {:origin-x 0 :origin-y 0}
(get-in ego [:right :suspended-talk]) {:origin-x 0 :origin-y 0}
:default {:origin-x 9}})]
(actions/start-animation screen
(merge (animation->texture screen (:stand (:right ego))) ego)