Added jail

This commit is contained in:
2014-12-24 14:21:37 -08:00
parent 4e6a0b82da
commit adfb4d0a3d
7 changed files with 35 additions and 9 deletions

View File

@@ -0,0 +1,26 @@
(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 {}
: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)]
: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.")))}
:collision "inside-jail/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 0 0.50 1.5)
:start-pos [130 85]))

View File

@@ -52,7 +52,8 @@
(actions/play-animation entities :blergh :swing)
(actions/walk-straight-to entities :ego [100 45] :anim :squat :override-dir :right :speed 3.0)
(actions/do-dialogue entities :ego "Ouch!"
:blergh "Why don't you try that again?"))}))
:blergh "My turn.")
(actions/transition-background entities :inside-jail [100 100]))}))
:entities {}
:collision "space/collision.png"
:scale-fn (constantly 1.5)