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

Public Types

enum  Span { Free , Eat , Work , Sleep }
 

Public Member Functions

Span GetSpan (int hour)
 

Static Public Member Functions

static void Init ()
 
static TimeTable Add (string raw, string id)
 
static TimeTable GetTimeTable (string id)
 
static Span GetSpan (string id, int hour)
 
- 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)
 

Public Attributes

Span[] spans = new Span[24]
 

Static Public Attributes

static Dictionary< string, TimeTabledict = new Dictionary<string, TimeTable>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Static Private Member Functions

static Span GetSpan (char s)
 

Static Private Attributes

static bool unityInit
 

Additional Inherited Members

- 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]
 

Detailed Description

Definition at line 3 of file TimeTable.cs.

Member Enumeration Documentation

◆ Span

Enumerator
Free 
Eat 
Work 
Sleep 

Definition at line 5 of file TimeTable.cs.

Member Function Documentation

◆ Add()

static TimeTable TimeTable.Add ( string  raw,
string  id 
)
inlinestatic

Definition at line 29 of file TimeTable.cs.

30 {
31 TimeTable timeTable = new TimeTable();
32 for (int i = 0; i < 24; i++)
33 {
34 timeTable.spans[i] = GetSpan(raw[i]);
35 }
36 dict.Add(id, timeTable);
37 return timeTable;
38 }
Span[] spans
Definition: TimeTable.cs:17
static Span GetSpan(string id, int hour)
Definition: TimeTable.cs:45
static Dictionary< string, TimeTable > dict
Definition: TimeTable.cs:13

References dict, GetSpan(), and spans.

Referenced by Init().

◆ GetSpan() [1/3]

static Span TimeTable.GetSpan ( char  s)
inlinestaticprivate

Definition at line 50 of file TimeTable.cs.

51 {
52 return s switch
53 {
54 'z' => Span.Sleep,
55 'e' => Span.Eat,
56 'w' => Span.Work,
57 _ => Span.Free,
58 };
59 }

◆ GetSpan() [2/3]

Span TimeTable.GetSpan ( int  hour)
inline

Definition at line 61 of file TimeTable.cs.

62 {
63 return Span.Free;
64 }

◆ GetSpan() [3/3]

static Span TimeTable.GetSpan ( string  id,
int  hour 
)
inlinestatic

Definition at line 45 of file TimeTable.cs.

46 {
47 return dict[id].spans[hour];
48 }

References dict.

Referenced by Add(), Chara.GetGoalFromTimeTable(), and Chara.TickWork().

◆ GetTimeTable()

static TimeTable TimeTable.GetTimeTable ( string  id)
inlinestatic

Definition at line 40 of file TimeTable.cs.

41 {
42 return dict[id];
43 }

References dict.

◆ Init()

static void TimeTable.Init ( )
inlinestatic

Definition at line 19 of file TimeTable.cs.

20 {
21 if (!unityInit)
22 {
23 Add("zzzzzz ewwwwwwwwwwe z", "default");
24 Add("zzzzzz ewwwwwwwwwwe z", "owl");
25 unityInit = true;
26 }
27 }
static bool unityInit
Definition: TimeTable.cs:15
static TimeTable Add(string raw, string id)
Definition: TimeTable.cs:29

References Add(), and unityInit.

Referenced by SourceManager.Init().

Member Data Documentation

◆ dict

Dictionary<string, TimeTable> TimeTable.dict = new Dictionary<string, TimeTable>()
static

Definition at line 13 of file TimeTable.cs.

Referenced by Add(), GetSpan(), and GetTimeTable().

◆ spans

Span [] TimeTable.spans = new Span[24]

Definition at line 17 of file TimeTable.cs.

Referenced by Add().

◆ unityInit

bool TimeTable.unityInit
staticprivate

Definition at line 15 of file TimeTable.cs.

Referenced by Init().


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