Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
GoalList Class Reference

Public Member Functions

void Refresh (Chara owner, GoalListType type)
 
Goal Next ()
 

Public Attributes

int index = -2
 
List< Goallist = new List<Goal>()
 

Detailed Description

Definition at line 3 of file GoalList.cs.

Member Function Documentation

◆ Next()

Goal GoalList.Next ( )
inline

Definition at line 39 of file GoalList.cs.

40 {
41 index++;
42 if (index >= list.Count)
43 {
44 index = 0;
45 }
46 return list[index].Duplicate();
47 }
List< Goal > list
Definition: GoalList.cs:7
int index
Definition: GoalList.cs:5

References index, and list.

Referenced by Chara.ChooseNewGoal().

◆ Refresh()

void GoalList.Refresh ( Chara  owner,
GoalListType  type 
)
inline

Definition at line 9 of file GoalList.cs.

10 {
11 list.Clear();
12 index = -1;
13 if (type == GoalListType.None)
14 {
15 if (owner.IsHomeMember())
16 {
17 type = GoalListType.Home;
18 }
19 else if (owner.IsGuest())
20 {
21 type = GoalListType.Guest;
22 }
23 }
24 switch (type)
25 {
26 case GoalListType.Home:
27 case GoalListType.Guest:
28 list.Add(new GoalIdle());
29 break;
30 case GoalListType.Enemy:
31 list.Add(new GoalVisitorEnemy());
32 break;
33 default:
34 list.Add(new GoalIdle());
35 break;
36 }
37 }
GoalListType
Definition: GoalListType.cs:2
bool IsHomeMember()
Definition: Chara.cs:5942
bool IsGuest()
Definition: Chara.cs:5967

References index, Chara.IsGuest(), Chara.IsHomeMember(), and list.

Referenced by Chara.ChooseNewGoal().

Member Data Documentation

◆ index

int GoalList.index = -2

Definition at line 5 of file GoalList.cs.

Referenced by Chara.ChooseNewGoal(), Next(), and Refresh().

◆ list

List<Goal> GoalList.list = new List<Goal>()

Definition at line 7 of file GoalList.cs.

Referenced by Next(), and Refresh().


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