From d576e377ed0299d2df347692b191e81baa1b3cce Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Thu, 12 Feb 2015 21:04:09 -0800 Subject: [PATCH] smoke animation. --- desktop/resources/space/cloud.png | Bin 0 -> 1328 bytes .../src-common/advent/screens/rooms/space.clj | 41 ++++++++++++++---- 2 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 desktop/resources/space/cloud.png diff --git a/desktop/resources/space/cloud.png b/desktop/resources/space/cloud.png new file mode 100644 index 0000000000000000000000000000000000000000..d7f74afc89dd30df60790c94a80a0effba77ed88 GIT binary patch literal 1328 zcmV-01<(44P)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_DijopiF$2PET#mZ8eu=y$(ArYkv7@Ex`GL?QCc!_*KFrd&;n1r7 zqW-CFs9&fT)ZaU5gc&=gBz-DaCw(vdOp0__x+47~U6sC(E(JNe@4cTT*n6*E zVH4eoU1-&7pEV~_PRe`a7v+@vy!^5}8?Y3)UmlaER0002TNkl3L17?OYy-PO+?&i#Mmz*@MlQ~Wjz zH84pQ7z0FuG$Qjg9D;#j!C*0%fgmv{`DCzxaLwp8f(${{fNUs8Eyw^SkRZB^$O>U> zkc}V!GZ4gv+l(v-l0XKyKEm2y+!k9+?f|qxc!-PjtT`^I^7wG{bEM#anIcDsX}TNuZ{z mZ9ox-oKt)l+^ZmUWCH;2j$2*uuv35l0000 entities - (update-in [:room :entities :ego] - #(actions/start-animation screen % :jump)) - (assoc-in [:tweens :jump-pos] (utils/tween :jump-pos screen [:room :entities :ego :move-pct] 0.0 1.0 jump-duration :power 2)))) + (begin [this screen entities] + (-> entities + (assoc-in [:room :entities :cloud] (assoc (texture "space/cloud.png") + :x (- (get-in entities [:room :entities :ego :x]) 10) + :y (get-in entities [:room :entities :ego :y]) + :origin-x 7 + :origin-y 7 + :scale-x 0.5 + :scale-y 0.5 + :opacity 0.5 + :baseline 240)) + (assoc-in [:tweens :cloud-up] (utils/tween :cloud-up screen [:room :entities :cloud :y] + (get-in entities [:room :entities :ego :y]) + (+ (get-in entities [:room :entities :ego :y]) 20) + 1.0)) + (assoc-in [:tweens :cloud-fade] (utils/tween :cloud-fade screen [:room :entities :cloud :opacity] + 0.5 + 0.0 + 1.0)) + (assoc-in [:tweens :cloud-grow] (utils/tween :cloud-grow screen [:room :entities :cloud :scale-y] + 0.5 + 2.5 + 1.0)) + (assoc-in [:tweens :cloud-grow-2] (utils/tween :cloud-grow-2 screen [:room :entities :cloud :scale-x] + 0.5 + 2.5 + 1.0)) + (update-in [:room :entities :ego] + #(actions/start-animation screen % :jump)) + (assoc-in [:tweens :jump-pos] (utils/tween :jump-pos screen [:room :entities :ego :move-pct] 0.0 1.0 jump-duration :power 2)))) (continue [this screen entities] (let [v (vector-2 0 0) @@ -136,7 +161,7 @@ (actions/do-dialogue entities :blergh "Ha ha ha! Is that the best you can do?" :blergh "Take this!") (actions/play-animation entities :blergh :swing) - (actions/walk-straight-to entities :ego [100 45] :anim :squat :override-dir :right :speed 3.0) + (actions/walk-straight-to entities :ego [35 45] :anim :squat :override-dir :right :speed 3.0) (actions/do-dialogue entities :ego "Ouch!" :blergh "My turn.")