Settings PlayerName Property Delta Engine Documentation

Namespace: DeltaEngine.Core
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public string PlayerName { get; set; }

Property Value

Type: String
Remarks

Tests: DeltaEngine.Tests.Core.SettingsTests
Examples

2 unit tests call DeltaEngine.Core.Settings.PlayerName
[Test]
public void ChangeAndSaveSettings()
{
    Settings settings = Settings.Current;
    settings.PlayerName = ModifiedPlayerName;
    settings.TwoLetterLanguageName = ModifiedTwoLetterLanguageName;
    settings.StartInFullscreen = false;
    Assert.AreEqual(settings.TwoLetterLanguageName, ModifiedTwoLetterLanguageName);
    Assert.AreEqual(ModifiedPlayerName, settings.PlayerName);
    settings.Save();
}
[Test]
public void SetValueTwice()
{
    Settings settings = Settings.Current;
    settings.PlayerName = "Blub";
    settings.PlayerName = ModifiedPlayerName;
    Assert.AreEqual(ModifiedPlayerName, settings.PlayerName);
}
See Also