Skip to content

Commit

Permalink
added 'gameVersion' property to internal 'GameSession' class
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimaryFeather committed Jun 24, 2018
1 parent a2d1927 commit 86caaec
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions flox/src/com/gamua/flox/GameSession.as
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ package com.gamua.flox

/** Do not call this constructor directly, but create sessions via the static
* 'start' method instead. */
public function GameSession(lastSession:GameSession=null)
public function GameSession(lastSession:GameSession=null, gameVersion:String=null)
{
mFirstStartTime = lastSession ? lastSession.firstStartTime : new Date();
mGameVersion = gameVersion;
mStartTime = new Date();
mDuration = 0;
mLog = [];
Expand All @@ -43,7 +44,7 @@ package com.gamua.flox
public static function start(gameID:String, gameVersion:String, installationID:String,
reportAnalytics:Boolean, lastSession:GameSession=null):GameSession
{
var newSession:GameSession = new GameSession(lastSession);
var newSession:GameSession = new GameSession(lastSession, gameVersion);
var resolution:String = Capabilities.screenResolutionX + "x" +
Capabilities.screenResolutionY;

Expand Down Expand Up @@ -146,8 +147,12 @@ package com.gamua.flox
public function get log():Array { return mLog; }
public function set log(value:Array):void { mLog = value; }

/** The number of reported erros (via the 'logError' method). */
/** The number of reported errors (via the 'logError' method). */
public function get numErrors():int { return mNumErrors; }
public function set numErrors(value:int):void { mNumErrors = value; }

/** The game version of this session. */
public function get gameVersion():String { return mGameVersion; }
public function set gameVersion(value:String):void { mGameVersion = value; }
}
}

0 comments on commit 86caaec

Please sign in to comment.