adding jail background.

This commit is contained in:
2014-12-26 21:06:05 -08:00
parent f2fcfa8963
commit a8b7cb87c5
6 changed files with 33 additions and 1 deletions

View File

@@ -205,7 +205,9 @@
:background-houses {:box [84 145 126 180]
:script (actions/get-script entities
(actions/walk-to entities :ego [79 145] :face :right)
(actions/talk entities :ego "Those are just a bunch of townsfolk houses."))}
(actions/transition-background entities :outside-jail [159 -20])
(actions/walk-straight-to entities :ego [159 20]))
:cursor :right}
:mid-house {:box [217 125 250 180]
:script (actions/get-script entities
(actions/do-dialogue entities

View File

@@ -0,0 +1,27 @@
(ns advent.screens.rooms.outside-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 :town-2
:interactions {:down-dir {:box [30 0 227 20]
:script (actions/get-script entities
(actions/walk-to entities :ego [159 5])
(actions/walk-straight-to entities :ego [159 -20])
(actions/transition-background entities :inside-castle [79 145]
)
(actions/walk-to entities :ego [159 74]))
:cursor :down}}
:layers [(assoc (texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)]
:entities {}
:collision "outside-jail/collision.png"
:scale-fn (utils/scaler-fn-with-baseline 40 0.001 1.3)
:start-pos [145 15]))