Elin Decompiled Documentation EA 23.289 Nightly
Loading...
Searching...
No Matches
Season Class Reference
Inheritance diagram for Season:
EClass

Public Types

enum  ID { Spring , Summer , Autumn , Winter }
 

Public Member Functions

Weather.Condition GetRandomWeather (Date date, Weather.Condition current)
 
void Next ()
 

Properties

GameDate date [get]
 
ID Current [get]
 
bool isSpring [get]
 
bool isSummer [get]
 
bool isAutumn [get]
 
bool isWinter [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 4 of file Season.cs.

Member Enumeration Documentation

◆ ID

enum Season.ID
Enumerator
Spring 
Summer 
Autumn 
Winter 

Definition at line 6 of file Season.cs.

7 {
8 Spring,
9 Summer,
10 Autumn,
11 Winter
12 }

Member Function Documentation

◆ GetRandomWeather()

Weather.Condition Season.GetRandomWeather ( Date  date,
Weather::Condition  current 
)
inline

Definition at line 85 of file Season.cs.

86 {
87 if (EClass.rnd(3) == 0)
88 {
89 return Weather.Condition.Cloudy;
90 }
91 if (EClass.rnd(4) == 0)
92 {
93 return Weather.Condition.Rain;
94 }
95 if (EClass.rnd(5) == 0)
96 {
97 return Weather.Condition.RainHeavy;
98 }
99 if (EClass.rnd(6) == 0)
100 {
101 return Weather.Condition.Snow;
102 }
103 return Weather.Condition.Fine;
104 }
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59
Condition
Definition: Weather.cs:16

References EClass.rnd().

Referenced by Weather.GetForecast().

◆ Next()

void Season.Next ( )
inline

Definition at line 106 of file Season.cs.

107 {
108 if (isSpring)
109 {
110 date.month = 6;
111 }
112 else if (isSummer)
113 {
114 date.month = 9;
115 }
116 else if (isAutumn)
117 {
118 date.month = 12;
119 }
120 else
121 {
122 date.month = 3;
123 }
124 }
bool isAutumn
Definition: Season.cs:62
bool isSpring
Definition: Season.cs:38
bool isSummer
Definition: Season.cs:50

References isAutumn, isSpring, and isSummer.

Property Documentation

◆ Current

ID Season.Current
get

Definition at line 16 of file Season.cs.

17 {
18 get
19 {
20 int month = date.month;
21 if (month >= 3 && month <= 5)
22 {
23 return ID.Spring;
24 }
25 if (month >= 6 && month <= 8)
26 {
27 return ID.Summer;
28 }
29 if (month >= 9 && month <= 11)
30 {
31 return ID.Autumn;
32 }
33 return ID.Winter;
34 }
35 }
int month
Definition: Date.cs:50
GameDate date
Definition: Season.cs:14
ID
Definition: Season.cs:7

◆ date

GameDate Season.date
get

Definition at line 14 of file Season.cs.

◆ isAutumn

bool Season.isAutumn
get

Definition at line 61 of file Season.cs.

62 {
63 get
64 {
65 if (date.month >= 9)
66 {
67 return date.month <= 11;
68 }
69 return false;
70 }
71 }

Referenced by Next().

◆ isSpring

bool Season.isSpring
get

Definition at line 37 of file Season.cs.

38 {
39 get
40 {
41 if (date.month >= 3)
42 {
43 return date.month <= 5;
44 }
45 return false;
46 }
47 }

Referenced by Next().

◆ isSummer

bool Season.isSummer
get

Definition at line 49 of file Season.cs.

50 {
51 get
52 {
53 if (date.month >= 6)
54 {
55 return date.month <= 8;
56 }
57 return false;
58 }
59 }

Referenced by Next().

◆ isWinter

bool Season.isWinter
get

Definition at line 73 of file Season.cs.

74 {
75 get
76 {
77 if (date.month < 12)
78 {
79 return date.month <= 2;
80 }
81 return true;
82 }
83 }

Referenced by Weather.RefreshWeather(), and Weather.SetCondition().


The documentation for this class was generated from the following file: