Show / Hide Table of Contents

Class UserXP

Inheritance
System.Object
UserXP
Implements
IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged
Namespace: Eco.Gameplay.Players
Assembly: Eco.Gameplay.dll
Syntax
public class UserXP : Object, IController, IViewController, IHasUniversalID, INotifyPropertyChanged

Constructors

UserXP()

Declaration
public UserXP()

Fields

UserSkillRateChangedEvent

Declaration
public static readonly ThreadSafeAction<User> UserSkillRateChangedEvent
Field Value
Type Description
ThreadSafeAction<User>

Properties

ControllerID

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

NextStarCost

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

SkillRate

Declaration
public float SkillRate { get; }
Property Value
Type Description
System.Single

StarsAvailable

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

TotalStarsEarned

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

XP

Declaration
public float XP { get; set; }
Property Value
Type Description
System.Single

Methods

AddExperience(Single)

Declaration
public void AddExperience(float amount)
Parameters
Type Name Description
System.Single amount

AddLevel(Int32)

Declaration
public void AddLevel(int stars)
Parameters
Type Name Description
System.Int32 stars

AddStars(Int32)

Declaration
public void AddStars(int stars)
Parameters
Type Name Description
System.Int32 stars

Initialize(User)

Declaration
public void Initialize(User user)
Parameters
Type Name Description
User user

RemoveLevel(Int32)

Declaration
public void RemoveLevel(int stars)
Parameters
Type Name Description
System.Int32 stars

RemoveStars(Int32)

Declaration
public void RemoveStars(int stars)
Parameters
Type Name Description
System.Int32 stars

SetInitialXP()

Setting the experience of a user on creation which retroactively adds the total experience the user would have accumulated since the server started by the rate set inside the config value (we set this default to off as 0).

Declaration
public void SetInitialXP()

UpdateSkillRate()

Declaration
public void UpdateSkillRate()

UpdateXP(Single)

Declaration
public void UpdateXP(float timePassed)
Parameters
Type Name Description
System.Single timePassed

UseXP(Single)

Declaration
public void UseXP(float amount)
Parameters
Type Name Description
System.Single amount

Events

PropertyChanged

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

IController
IViewController
IHasUniversalID
System.ComponentModel.INotifyPropertyChanged

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾