android and ios achievements.

This commit is contained in:
Bryce Covert
2018-01-04 21:54:21 -08:00
parent c4e4a14be3
commit e95d6c4be1
24 changed files with 379 additions and 24 deletions

View File

@@ -393,6 +393,15 @@
save-object
(#(utils/add-actor-to-stage screen %)))
:google-play (doto (assoc (image-button (BaseDrawable.)) :x 1150 :y 160 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 10 :key :google-play)
(image-button! :add (doto (Group. )
(.addActor (:object (doto (image (utils/atlas->texture title-atlas "google-play.png"))
(image! :set-scale 4))))))
save-object
(#(utils/add-actor-to-stage screen %)))
:logo (assoc (utils/atlas->texture title-atlas "logo.png" ) :x 640 :y 960 :scale-x (/ 4 utils/ui-scale) :scale-y (/ 4 utils/ui-scale) :origin-x 160 :origin-y 240 :z 6)
:fade (assoc (utils/atlas->texture global-atlas "black.png")
:scale-x 80
@@ -537,6 +546,15 @@
(assoc :chapters-menu (->> (chapters-menu )
(utils/add-actor-to-stage screen))))
(= :google-play actor-key)
(utils/platformify
entities
(do
(.showAchievements (advent.core.GooglePlay.) (Gdx/app))
entities)
entities)
(= :settings actor-key)
(-> entities
(utils/remove-actor-from-stage :main-menu)