Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public static final class Replay.Result
- Object
- Replay.Result
The outcome of a replay.
Constructors
public Result(PlatformWorld w) | 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. |
Methods
public int getScore() | The points the run scored in the world (pickups, stomps). |
public int getCoins() | The coins the run collected. |
public int getSecrets() | The secrets the run found. |
public boolean isComplete() | Whether the run reached the goal. |
public int getTicks() | The tick the goal was reached on, or the log’s length if never. |
public int getDeaths() | Deaths during the run. |
public long getHash() | The world hash where the replay stopped. |
Inherited methods
Constructor details
Result
public Result(PlatformWorld w)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
wPlatformWorld- 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