Class ExhaustionMonitor
Inheritance
System.Object
ExhaustionMonitor
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public class ExhaustionMonitor : Object, IController, IViewController, IHasUniversalID, INotifyPropertyChanged
Constructors
ExhaustionMonitor()
Declaration
public ExhaustionMonitor()
Properties
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
Type |
Description |
System.Int32 |
|
ExhaustedEnabled
Declaration
public static bool ExhaustedEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
ExhaustionCountdown
Declaration
public ImmutableCountdown ExhaustionCountdown { get; }
Property Value
ExhaustionTimeSaving
Declaration
public static bool ExhaustionTimeSaving { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsExhausted
Declaration
public bool IsExhausted { get; }
Property Value
Type |
Description |
System.Boolean |
|
MaxDailySec
Declaration
public double MaxDailySec { get; }
Property Value
Type |
Description |
System.Double |
|
MaxSavedSec
Declaration
public double MaxSavedSec { get; }
Property Value
Type |
Description |
System.Double |
|
MaxTimeForPeriodPlusSavedTime
Declaration
public double MaxTimeForPeriodPlusSavedTime { get; }
Property Value
Type |
Description |
System.Double |
|
Declaration
public string MaxTotalHoursFormatted { get; }
Property Value
Type |
Description |
System.String |
|
PlaytimeInPeriod
Declaration
public double PlaytimeInPeriod { get; }
Property Value
Type |
Description |
System.Double |
|
RefreshCountdown
Declaration
public ImmutableCountdown RefreshCountdown { get; }
Property Value
Declaration
public string RefreshHoursFormatted { get; }
Property Value
Type |
Description |
System.String |
|
RemainingPlaytime
Declaration
public double RemainingPlaytime { get; }
Property Value
Type |
Description |
System.Double |
|
SavedTimeInSecs
Declaration
public double SavedTimeInSecs { get; }
Property Value
Type |
Description |
System.Double |
|
TimeUntilRefreshDesc
Declaration
public string TimeUntilRefreshDesc { get; }
Property Value
Type |
Description |
System.String |
|
Methods
CheckEnergyAndNotify(out LocString, PhysicsWorldObject)
Declaration
public bool CheckEnergyAndNotify(out LocString result, PhysicsWorldObject wo = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
DefaultReset()
Declaration
public void DefaultReset()
DescribeExhaustion()
Declaration
public string DescribeExhaustion()
Returns
Type |
Description |
System.String |
|
Energize(Single)
Give this user an extra number of hours of energy. This rolls over.
Declaration
public void Energize(float hours)
Parameters
Type |
Name |
Description |
System.Single |
hours |
|
ExhaustForDay()
Declaration
public void ExhaustForDay()
Init(User)
Declaration
public void Init(User owner)
Parameters
Type |
Name |
Description |
User |
owner |
|
SetLastRefreshDay(Int32)
Declaration
public void SetLastRefreshDay(int days)
Parameters
Type |
Name |
Description |
System.Int32 |
days |
|
SetSavedTime(Double, Boolean)
Sets current saved time and updates exhaustion time countdown
Declaration
public void SetSavedTime(double timeInSecs, bool force = false)
Parameters
Type |
Name |
Description |
System.Double |
timeInSecs |
|
System.Boolean |
force |
|
Tick()
Declaration
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type |
Description |
System.ComponentModel.PropertyChangedEventHandler |
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods