safe improvement (with cursor)
This commit is contained in:
@@ -12,11 +12,14 @@
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn open-safe [entities]
|
||||
(actions/play-animation entities :ego :start-squat :stop? false)
|
||||
(screen! safe/safe-screen :show-screen
|
||||
:success (actions/get-script entities
|
||||
(actions/play-animation entities :ego :end-squat)
|
||||
|
||||
(if (actions/has-item? entities :recipe)
|
||||
(do
|
||||
(actions/play-animation entities :ego :squat)
|
||||
|
||||
(actions/talk entities :ego "I already took everything interesting from there."))
|
||||
(do
|
||||
(actions/talk entities :ego "Yes! That worked.")
|
||||
@@ -33,6 +36,7 @@
|
||||
(actions/give entities :mandrake)
|
||||
(actions/talk entities :ego "Weird. It's some kind of root."))))
|
||||
:failure (actions/get-script entities
|
||||
(actions/play-animation entities :ego :end-squat)
|
||||
(actions/talk entities :ego "I don't think that worked...")))
|
||||
(actions/update-state entities #(assoc % :active? false)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user