first stab at android.
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
(:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter]
|
||||
[com.badlogic.gdx.graphics.g2d TextureRegion]
|
||||
[com.badlogic.gdx Gdx Application]
|
||||
[java.io FileOutputStream File PrintStream])
|
||||
)
|
||||
[java.io FileOutputStream File PrintStream]))
|
||||
|
||||
(def has-purchased? (atom false))
|
||||
|
||||
(defonce am (asset-manager))
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
[play-clj.ui :refer :all]
|
||||
[play-clj.utils :refer :all]
|
||||
[play-clj.g2d :refer :all])
|
||||
(:import [com.badlogic.gdx.graphics Color]))
|
||||
(:import [com.badlogic.gdx.graphics Color]
|
||||
[com.badlogic.gdx Application Gdx]))
|
||||
|
||||
(println "loading " *ns*)
|
||||
|
||||
@@ -377,8 +378,15 @@
|
||||
:label "Pit of destiny"
|
||||
:cursor :look
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [154 41])
|
||||
(actions/talk entities :ego "Wow! That's a long way down."))
|
||||
(println "billing purchased before" @@(resolve 'advent.core/has-purchased?))
|
||||
|
||||
(when-not @@(resolve 'advent.core/has-purchased?)
|
||||
(.triggerPurchase (Gdx/app))
|
||||
(a/<!! @(resolve 'advent.android/purchase-chan)))
|
||||
(println "billing purchased now:" @@(resolve 'advent.core/has-purchased?))
|
||||
(when @@(resolve 'advent.core/has-purchased?)
|
||||
(actions/walk-to entities :ego [154 41])
|
||||
(actions/talk entities :ego "Wow! That's a long way down.")))
|
||||
:scripts {:shovel (actions/get-script entities
|
||||
(actions/walk-to entities :ego [154 41])
|
||||
(actions/talk entities :ego "I guess I'm doomed to be a gravedigger.")
|
||||
|
||||
Reference in New Issue
Block a user