Map AddToScore Method Delta Engine Documentation

Namespace: TinyPlatformer
Assembly: TinyPlatformer (in TinyPlatformer.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public void AddToScore(
	string type
)
Remarks

Tests: TinyPlatformer.Tests.MapTests
Examples

2 unit tests call TinyPlatformer.Map.AddToScore(System.String)
[Test, CloseAfterFirstFrame]
public void TreasureAddsOneToScore()
{
    map.AddToScore("treasure");
    Assert.AreEqual(1, map.score);
    Assert.AreEqual("Score: 1", map.scoreText.Text);
}
[Test, CloseAfterFirstFrame]
public void MonsterKillAddsThreeToScore()
{
    map.AddToScore("monster");
    Assert.AreEqual(3, map.score);
    Assert.AreEqual("Score: 3", map.scoreText.Text);
}
See Also