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

@@ -0,0 +1,12 @@
(ns advent.achievements
(:import [com.badlogic.gdx Gdx Application])
(:require [advent.steam :as steam]
[advent.utils :as utils]))
(def android-ids {"DESTINY" "CgkIwc6UgfgZEAIQAQ"})
(defn set-achievement [achievement]
(utils/platformify
(.reportAchievement (advent.core.GameCenter.) achievement)
(.setAchievement (advent.core.GooglePlay.) (Gdx/app) (android-ids achievement))
(steam/set-achievement achievement)))