40 lines
2.7 KiB
Clojure
40 lines
2.7 KiB
Clojure
(ns advent.screens.rooms.inside-jail
|
|
(:require [advent.screens.rooms :as rooms]
|
|
[advent.actions :as actions]
|
|
[advent.screens.items :as items]
|
|
[advent.utils :as utils]
|
|
[clojure.zip :as zip]
|
|
[play-clj.core :refer :all]
|
|
[play-clj.ui :refer :all]
|
|
[play-clj.utils :refer :all]
|
|
[play-clj.g2d :refer :all]))
|
|
|
|
|
|
(defn make [screen]
|
|
(rooms/make :music :inside-antique
|
|
:interactions {
|
|
:lock {:box [178 102 184 124]
|
|
:script (actions/get-script entities
|
|
(actions/walk-to entities :ego [174 80] :face :right)
|
|
(actions/play-animation entities :ego :reach)
|
|
(actions/talk entities :ego "There's no helping it. It's locked."))}
|
|
:hay {:box [130 86 177 102]
|
|
:script (actions/get-script entities
|
|
(actions/walk-to entities :ego [144 86] :face :right)
|
|
(actions/talk entities :ego "Maybe there's a needle or something in here.")
|
|
(actions/play-animation entities :ego :squat)
|
|
(actions/talk entities :ego "No. Nothing at all!"))}}
|
|
:layers [(assoc (texture "inside-jail/background.png") :x 0 :y 0 :baseline 0)
|
|
(assoc (texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165)
|
|
(assoc (texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240)]
|
|
:entities {:warden (assoc (texture "inside-jail/warden.png" )
|
|
:x 40 :y 60 :baseline 166
|
|
:talk-color (color 0.9 0.3 0.9 1.0)
|
|
:script (actions/get-script entities
|
|
(actions/do-dialogue entities :ego "Hey, who are you? Why am I in this cell?"
|
|
:warden "You're under arrest for theft of public property."
|
|
:ego "Under arrest? But I'm the good guy!\nThe game is named after me!")))}
|
|
:collision "inside-jail/collision.png"
|
|
:scale-fn (utils/scaler-fn-with-baseline 0 0.50 1.5)
|
|
:start-pos [130 85]))
|