fighting bloodclot coming along
This commit is contained in:
@@ -184,6 +184,9 @@
|
||||
crowbar (utils/make-anim "ego/crowbar.png" [36 36] 0.1 [0 0 0 1 1 2 2 2 2 2 3 2 3 2 3 2 3 2 3 3 3 1 1 0 0 0])
|
||||
shoot (utils/make-anim "ego/shoot.png" [24 36] 0.075 [0 0 0 1 1 2 2 2 2 2 2 2 2 3 4 5 4])
|
||||
pant (utils/make-anim "ego/pant.png" [31 36] 0.5 [0 1])
|
||||
shock (utils/make-anim "ego/shock.png" [40 48] 0.075 (flatten (repeat 2 [(repeat 5 [0 1 2]) (repeat 5 [3 4 5]) (repeat 5 [6 7 8])])))
|
||||
burnt (utils/make-anim "ego/burnt.png" [40 46] 0.12 [1 2 3 2 1 2 3 2 1 0 2 0 4 5 6 7 8 9 10 11 10 9 10 11])
|
||||
passed-out (utils/make-anim "ego/burnt.png" [40 46] 0.12 [9 10 11 10])
|
||||
|
||||
ego {:right {:walk walk-right
|
||||
:stand stand-anim
|
||||
@@ -211,7 +214,10 @@
|
||||
[:fire 2] fire-2-anim
|
||||
[:fire 3] fire-3-anim
|
||||
:spear spear
|
||||
:pant pant}
|
||||
:pant pant
|
||||
:shock shock
|
||||
:burnt burnt
|
||||
:passed-out passed-out}
|
||||
:left {:walk (utils/flip walk-right)
|
||||
:stand (utils/flip stand-anim)
|
||||
:talk (utils/flip talk-anim)
|
||||
@@ -238,7 +244,7 @@
|
||||
:pant (utils/flip pant)}
|
||||
:baseline (- 240 (last start-pos))
|
||||
:facing :right
|
||||
:origin-x 9
|
||||
:origin-x 9
|
||||
:origin-y 0
|
||||
:scaled true
|
||||
:step-sound (sound "ego/step.ogg")
|
||||
@@ -293,7 +299,9 @@
|
||||
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 :step-sound
|
||||
6 :step-sound}
|
||||
(get-in ego [:right :walk]) {2 :step-sound
|
||||
6 :step-sound}})]
|
||||
6 :step-sound}}
|
||||
:anim-merges {(get-in ego [:right :shock]) {:origin-x 15}
|
||||
:default {:origin-x 9}})]
|
||||
(actions/start-animation screen
|
||||
(merge (animation->texture screen (:stand (:right ego))) ego)
|
||||
:stand)))
|
||||
@@ -338,7 +346,9 @@
|
||||
(merge entity (animation->texture (update-in screen [:total-time] #(- % (:anim-start entity)))
|
||||
(:anim entity))
|
||||
{:current-frame-index (texture! (:anim entity) :get-key-frame-index (get-animation-point (:anim entity) (- (:total-time screen) (:anim-start entity))))
|
||||
:previous-frame-index (texture! (:anim entity) :get-key-frame-index (get-animation-point (:anim entity) (- (:total-time screen) (:anim-start entity) (or (:delta-time screen) 0))))}))
|
||||
:previous-frame-index (texture! (:anim entity) :get-key-frame-index (get-animation-point (:anim entity) (- (:total-time screen) (:anim-start entity) (or (:delta-time screen) 0))))}
|
||||
(or (get-in entity [:anim-merges (:anim entity)])
|
||||
(get-in entity [:anim-merges :default]))))
|
||||
|
||||
|
||||
(defn get-layers [entities]
|
||||
|
||||
Reference in New Issue
Block a user