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

Public Member Functions

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

Static Public Attributes

const int Spring = 1
 
const int Summer = 2
 
const int Autumn = 3
 
const int Winter = 4
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

GameDate date [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 rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
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)
 

Detailed Description

Definition at line 4 of file Season.cs.

Member Function Documentation

◆ GetRandomWeather()

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

Definition at line 64 of file Season.cs.

65 {
66 if (EClass.rnd(3) == 0)
67 {
68 return Weather.Condition.Cloudy;
69 }
70 if (EClass.rnd(4) == 0)
71 {
72 return Weather.Condition.Rain;
73 }
74 if (EClass.rnd(5) == 0)
75 {
76 return Weather.Condition.RainHeavy;
77 }
78 if (EClass.rnd(6) == 0)
79 {
80 return Weather.Condition.Snow;
81 }
82 return Weather.Condition.Fine;
83 }
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
Condition
Definition: Weather.cs:16

References EClass.rnd().

Referenced by Weather.GetForecast().

◆ Next()

void Season.Next ( )
inline

Definition at line 85 of file Season.cs.

86 {
87 if (isSpring)
88 {
89 date.month = 6;
90 }
91 else if (isSummer)
92 {
93 date.month = 9;
94 }
95 else if (isAutumn)
96 {
97 date.month = 12;
98 }
99 else
100 {
101 date.month = 3;
102 }
103 }
bool isAutumn
Definition: Season.cs:41
bool isSpring
Definition: Season.cs:17
bool isSummer
Definition: Season.cs:29

References isAutumn, isSpring, and isSummer.

Member Data Documentation

◆ Autumn

const int Season.Autumn = 3
static

Definition at line 10 of file Season.cs.

◆ Spring

const int Season.Spring = 1
static

Definition at line 6 of file Season.cs.

◆ Summer

const int Season.Summer = 2
static

Definition at line 8 of file Season.cs.

◆ Winter

const int Season.Winter = 4
static

Definition at line 12 of file Season.cs.

Property Documentation

◆ date

GameDate Season.date
get

Definition at line 14 of file Season.cs.

◆ isAutumn

bool Season.isAutumn
get

Definition at line 40 of file Season.cs.

41 {
42 get
43 {
44 if (date.month >= 9)
45 {
46 return date.month <= 11;
47 }
48 return false;
49 }
50 }
int month
Definition: Date.cs:50
GameDate date
Definition: Season.cs:14

Referenced by Next().

◆ isSpring

bool Season.isSpring
get

Definition at line 16 of file Season.cs.

17 {
18 get
19 {
20 if (date.month >= 3)
21 {
22 return date.month <= 5;
23 }
24 return false;
25 }
26 }

Referenced by Next().

◆ isSummer

bool Season.isSummer
get

Definition at line 28 of file Season.cs.

29 {
30 get
31 {
32 if (date.month >= 6)
33 {
34 return date.month <= 8;
35 }
36 return false;
37 }
38 }

Referenced by Next().

◆ isWinter

bool Season.isWinter
get

Definition at line 52 of file Season.cs.

53 {
54 get
55 {
56 if (date.month < 12)
57 {
58 return date.month <= 2;
59 }
60 return true;
61 }
62 }

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


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