Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
GoalNeeds.cs
Go to the documentation of this file.
1
using
System.Collections.Generic;
2
3
public
class
GoalNeeds
:
Goal
4
{
5
public
override
IEnumerable<Status>
Run
()
6
{
7
for
(
int
i = 0; i < 5; i++)
8
{
9
switch
(
EClass
.
rnd
(5))
10
{
11
case
0:
12
if
(
owner
.
hunger
.
value
> 70)
13
{
14
yield
return
Do
(
new
AI_Eat
());
15
}
16
break
;
17
case
3:
18
if
(
owner
.
bladder
.
value
< 40)
19
{
20
yield
return
Do
(
new
AI_Bladder
());
21
}
22
break
;
23
}
24
yield
return
Status
.Running;
25
}
26
}
27
}
AIAct.Do
Status Do(AIAct _seq, Func< Status > _onChildFail=null)
Definition:
AIAct.cs:416
AIAct.owner
new Chara owner
Definition:
AIAct.cs:14
AIAct.Status
Status
Definition:
AIAct.cs:8
AI_Bladder
Definition:
AI_Bladder.cs:4
AI_Eat
Definition:
AI_Eat.cs:5
Chara.hunger
Stats hunger
Definition:
Chara.cs:951
Chara.bladder
Stats bladder
Definition:
Chara.cs:959
EClass
Definition:
EClass.cs:5
EClass.rnd
static int rnd(int a)
Definition:
EClass.cs:50
GoalNeeds
Definition:
GoalNeeds.cs:4
GoalNeeds.Run
override IEnumerable< Status > Run()
Definition:
GoalNeeds.cs:5
Goal
Definition:
Goal.cs:4
Stats.value
virtual int value
Definition:
Stats.cs:56
Elin
GoalNeeds.cs
Generated by
1.9.6