Festivity
A class in Root.Township, the global namespace.
A seasonal event asset with a start and end date. FestivityManager turns it on and off on the server and syncs the state to clients.
- Listed in Global namespace: E to H
- Inherits or implements
HashedGeneralValue<Festivity> - Derived types
Festivity,Festivity.Create - Nested types
Create - Attributes
TypeConverter - Documented in Arguments and results
Constructors
| Member | What it is |
|---|---|
Festivity() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private MonthDayHour end | Backing field for End, the month, day and hour the festivity ends. |
private bool isActive | Backing field for IsActivated. Not saved; set at run time. |
private bool isEnabled | Backing field for IsEnabled. |
private MonthDayHour start | Backing field for Start, the month, day and hour the festivity starts. |
Properties
| Member | What it is |
|---|---|
MonthDayHour End { get; } | Month, day and hour the festivity ends. |
bool IsActivated { get; set; } | Whether the festivity is running now. Set by FestivityManager, which resets it from the dates every second. |
bool IsEnabled { get; } | Inspector switch. The server only activates enabled festivities, rechecking the dates every second. |
MonthDayHour Start { get; } | Month, day and hour the festivity starts. |
Events
| Member | What it is |
|---|---|
event Action<Festivity> ActivationChanged | Raised when IsActivated changes. |
Methods
1 private and internal method
Used in
Members of other types that take, return or hold a Festivity:
Distribution<TThis, T, TItem, TFestivityGroup>.BaseFestivityGroup.festivity, Distribution<TThis, T, TItem, TFestivityGroup>.BaseFestivityGroup.Festivity, LootTable.FestivityList.festivity, LootTable.FestivityList.Festivity, PopulationDefinition.FestivePrefabGroup.festivity, Filter.targetFestivity, AutoFestiveAchievement.festivity, FestiveFeature.festivity, FestiveFeature.OnFestivityActivationChanged, FestivityCommandModule.Inspect, FestivityCommandModule.StartFestivity, FestivityCommandModule.StopFestivity, FestivityManager.SetFestivityActive, FestivityManager.sync, FestivityManager.SyncFestivity.