Class Replay.Result
java.lang.Object
com.codename1.gaming.platformer.Replay.Result
- Enclosing class:
Replay
The outcome of a replay.
-
Constructor Summary
ConstructorsConstructorDescriptionSnapshots a world's outcome as it stands, so a client can score the run it just watched with the same rules the server applies to the replay. -
Method Summary
Modifier and TypeMethodDescriptionintgetCoins()The coins the run collected.intDeaths during the run.longgetHash()The world hash where the replay stopped.intgetScore()The points the run scored in the world (pickups, stomps).intThe secrets the run found.intgetTicks()The tick the goal was reached on, or the log's length if never.booleanWhether the run reached the goal.
-
Constructor Details
-
Result
Snapshots a world's outcome as it stands, so a client can score the run it just watched with the same rules the server applies to the replay.
Parameters
w: the world, usually finished
-
-
Method Details
-
getScore
public int getScore()The points the run scored in the world (pickups, stomps).
Returns
the world score
-
getCoins
public int getCoins()The coins the run collected.
Returns
the coin count
-
getSecrets
public int getSecrets()The secrets the run found.
Returns
the secret count
-
isComplete
public boolean isComplete()Whether the run reached the goal.
Returns
true if complete
-
getTicks
public int getTicks()The tick the goal was reached on, or the log's length if never.
Returns
the tick count
-
getDeaths
public int getDeaths()Deaths during the run.
Returns
the death count
-
getHash
public long getHash()The world hash where the replay stopped.
Returns
the hash
-