Class UserXP
Inheritance
System.Object
UserXP
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class UserXP : Object, IController, IViewController, IHasUniversalID, INotifyPropertyChanged
Constructors
UserXP()
Declaration
Fields
UserSkillRateChangedEvent
Declaration
public static readonly ThreadSafeAction<User> UserSkillRateChangedEvent
Field Value
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
System.ComponentModel.INotifyPropertyChanged
Extension Methods