Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
GoalList.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2
3public class GoalList
4{
5 public int index = -2;
6
7 public List<Goal> list = new List<Goal>();
8
9 public void Refresh(Chara owner, GoalListType type)
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 }
38
39 public Goal Next()
40 {
41 index++;
42 if (index >= list.Count)
43 {
44 index = 0;
45 }
46 return list[index].Duplicate();
47 }
48}
GoalListType
Definition: GoalListType.cs:2
Definition: Chara.cs:10
bool IsHomeMember()
Definition: Chara.cs:5942
bool IsGuest()
Definition: Chara.cs:5967
List< Goal > list
Definition: GoalList.cs:7
int index
Definition: GoalList.cs:5
void Refresh(Chara owner, GoalListType type)
Definition: GoalList.cs:9
Goal Next()
Definition: GoalList.cs:39
Definition: Goal.cs:4