Show / Hide Table of Contents

Class PlayerPreferences

Contains all player characters and the index of the currently selected character. Serialized both over the network and to disk.

Inheritance
System.Object
PlayerPreferences
Namespace: Content.Shared.Preferences
Assembly: Content.Shared.dll
Syntax
public sealed class PlayerPreferences : object

Constructors

| Improve this Doc View Source

PlayerPreferences(IEnumerable<KeyValuePair<Int32, ICharacterProfile>>, Int32, Color)

Declaration
public PlayerPreferences(IEnumerable<KeyValuePair<int, ICharacterProfile>> characters, int selectedCharacterIndex, Color adminOOCColor)
Parameters
Type Name Description
IEnumerable<KeyValuePair<System.Int32, ICharacterProfile>> characters
System.Int32 selectedCharacterIndex
Color adminOOCColor

Properties

| Improve this Doc View Source

AdminOOCColor

Declaration
public Color AdminOOCColor { get; set; }
Property Value
Type Description
Color
| Improve this Doc View Source

Characters

All player characters.

Declaration
public IReadOnlyDictionary<int, ICharacterProfile> Characters { get; }
Property Value
Type Description
IReadOnlyDictionary<System.Int32, ICharacterProfile>
| Improve this Doc View Source

SelectedCharacter

The currently selected character.

Declaration
public ICharacterProfile SelectedCharacter { get; }
Property Value
Type Description
ICharacterProfile
| Improve this Doc View Source

SelectedCharacterIndex

Index of the currently selected character.

Declaration
public int SelectedCharacterIndex { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

GetProfile(Int32)

Declaration
public ICharacterProfile GetProfile(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
ICharacterProfile
| Improve this Doc View Source

IndexOfCharacter(ICharacterProfile)

Declaration
public int IndexOfCharacter(ICharacterProfile profile)
Parameters
Type Name Description
ICharacterProfile profile
Returns
Type Description
System.Int32
| Improve this Doc View Source

TryIndexOfCharacter(ICharacterProfile, out Int32)

Declaration
public bool TryIndexOfCharacter(ICharacterProfile profile, out int index)
Parameters
Type Name Description
ICharacterProfile profile
System.Int32 index
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾