Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-rpg into demo
  • Loading branch information
7yl4r committed Jun 11, 2016
2 parents 6d39e63 + 2b4fb17 commit 89c9be6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.badlogic.gdx.Files;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver;
import com.badlogic.gdx.audio.Sound;
Expand Down Expand Up @@ -62,6 +63,11 @@ public PixelonTransmission() {
String logFile = "log4j2.xml";
System.setProperty("log4j.configurationFile", FileStructure.RESOURCE_DIR + logFile);
logger = LogManager.getLogger(getClass());
Preferences prefs = GameSettings.getPreferences();
String type = prefs.getString(GameSettings.KEY_GRAPHICS_TYPE, "windowed");
int width = prefs.getInteger(GameSettings.KEY_GRAPHICS_WIDTH, 0);
int height = prefs.getInteger(GameSettings.KEY_GRAPHICS_HEIGHT, 0);
logger.info("init app " + width + "x" + height + " " + type);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ private void updateUserProfile() {
props.put("JRE", System.getProperty("java.version"));
props.put("time zone", Calendar.getInstance().getTimeZone().getID());
// TODO: (maybe) useful mixpanel special properties:
//props.put("$email", "???");
//props.put("$ip", "???");
//props.put("$first_name", "???");
//props.put("$last_name", "???");
//props.put("$name", "???"); // alternative to $first_name $last_name
//props.put("$created", "???");
//props.put("$email", "???");
//props.put("$phone", "???");
Preferences prefs = GameSettings.getPreferences();
// TODO: this is temporary, KEY_USER_NAME will soon refer to the active avatar's name and not the user:
props.put("$name", prefs.getString(GameSettings.KEY_USER_NAME));

JSONObject update = messageBuilder.set(UserIdentifier.getId(), props);
// Send the update to mixpanel
Expand Down Expand Up @@ -86,6 +88,8 @@ public void gameOverEvent(final int score, final int wave) {

props.put("movement_method", prefs.getInteger(GameSettings.KEY_MOVEMENT_CONTROL_METHOD));
props.put("weapon_method", prefs.getInteger(GameSettings.KEY_WEAPON_CONTROL_METHOD));
props.put("width", prefs.getInteger(GameSettings.KEY_GRAPHICS_WIDTH));
props.put("height", prefs.getInteger(GameSettings.KEY_GRAPHICS_HEIGHT));

// report CA generation lengths
// try {
Expand Down

0 comments on commit 89c9be6

Please sign in to comment.