From 2e84bcc4be74da0fd1fcd439dee05c1341cd1c54 Mon Sep 17 00:00:00 2001 From: Boutade Date: Fri, 18 Oct 2019 18:31:47 -0500 Subject: a version of coffee sequence --- assets.lisp | 1 - the-price-of-a-cup-of-coffee.lisp | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/assets.lisp b/assets.lisp index 413d5a4..b375c5b 100644 --- a/assets.lisp +++ b/assets.lisp @@ -145,7 +145,6 @@ (setf *speech-bubble-texture* (make-texture-from-file renderer +speechbubble-image+)) - (unless *harmony-initialized-p* (harmony-simple:initialize) (setf *looking-up-track* (harmony-simple:play +things-look-up-track-path+ :music :loop t)) diff --git a/the-price-of-a-cup-of-coffee.lisp b/the-price-of-a-cup-of-coffee.lisp index 90f112d..a22f7e5 100644 --- a/the-price-of-a-cup-of-coffee.lisp +++ b/the-price-of-a-cup-of-coffee.lisp @@ -238,7 +238,6 @@ - (defun make-sick () (unless (sick-p *nance*) (setf (sick-p *nance*) t) @@ -425,6 +424,23 @@ (<= 1.0 (percent *money-meter*))) (defun get-coffee! () + (decf (percent *money-meter*) 0.45) + (play-track *looking-up-track*) + (emote *nance* "coffee") + (setf *collision-on-p* nil) + (setf *on-coffee-break* t) + (let ((now (sdl2:get-ticks)) + (dur 10000)) + (push (animate *cold-meter* 'percent 0.0 :ease #'cubic-in :duration dur :start now :rounding nil) *tweens*) + (push (animate *stress-meter* 'percent 0.1 :ease #'cubic-in :duration dur :start now :rounding nil) *tweens*) + (pause-then + dur + (lambda () + (play-track *cold-day-track*) + (emote *nance* nil) + (setf *collision-on-p* t) + (setf *on-coffee-break* nil))))) + (print "Getting Coffee!!!")) (defun get-food! () @@ -716,7 +732,7 @@ (defun start () - ;; (play-track *cold-day-track*) + (play-track *cold-day-track*) (unwind-protect (sdl2:with-init (:everything) (sdl2:with-window (win :w 1024 :h 600 :title "The Price Of A Cup Of Coffee" :flags '(:shown)) -- cgit v1.2.3