Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
CodexCreature.cs
Go to the documentation of this file.
1
using
Newtonsoft.Json;
2
using
UnityEngine;
3
using
UnityEngine.UI;
4
5
public
class
CodexCreature
:
EClass
6
{
7
public
string
id
;
8
9
[JsonProperty]
10
public
int
[]
_ints
=
new
int
[5];
11
12
public
string
Name
=>
source
.GetName(
null
, full:
true
);
13
14
public
SourceChara.Row
source
=>
EClass
.
sources
.
charas
.map[
id
];
15
16
public
int
numCard
17
{
18
get
19
{
20
return
_ints
[0];
21
}
22
set
23
{
24
_ints
[0] = value;
25
}
26
}
27
28
public
int
weakspot
29
{
30
get
31
{
32
return
_ints
[2];
33
}
34
set
35
{
36
_ints
[2] = value;
37
}
38
}
39
40
public
int
kills
41
{
42
get
43
{
44
return
_ints
[3];
45
}
46
set
47
{
48
_ints
[3] = value;
49
}
50
}
51
52
public
int
spawns
53
{
54
get
55
{
56
return
_ints
[4];
57
}
58
set
59
{
60
_ints
[4] = value;
61
}
62
}
63
64
public
int
BonusDropLv
65
{
66
get
67
{
68
if
(
numCard
> 1)
69
{
70
return
(
int
)Mathf.Sqrt((
float
)
numCard
* 1.5f);
71
}
72
return
0;
73
}
74
}
75
76
public
bool
droppedCard
77
{
78
get
79
{
80
return
(
_ints
[1] & 2) != 0;
81
}
82
set
83
{
84
_ints
[1] = (value ? (
_ints
[1] | 2) : (
_ints
[1] & -3));
85
}
86
}
87
88
public
void
SetImage
(Image image,
int
idSkin = 0,
bool
nativeSize =
true
)
89
{
90
source
.SetImage(image,
null
, 0, nativeSize, 0, idSkin);
91
image.SetActive(enable:
true
);
92
}
93
94
public
string
GetTextBonus
()
95
{
96
string
result =
"noItem"
.lang();
97
if
(
BonusDropLv
> 0)
98
{
99
result =
"codexBonus1"
.lang(
BonusDropLv
.ToString() ??
""
);
100
}
101
return
result;
102
}
103
}
CodexCreature
Definition:
CodexCreature.cs:6
CodexCreature.numCard
int numCard
Definition:
CodexCreature.cs:17
CodexCreature.droppedCard
bool droppedCard
Definition:
CodexCreature.cs:77
CodexCreature.source
SourceChara.Row source
Definition:
CodexCreature.cs:14
CodexCreature.spawns
int spawns
Definition:
CodexCreature.cs:53
CodexCreature.id
string id
Definition:
CodexCreature.cs:7
CodexCreature.GetTextBonus
string GetTextBonus()
Definition:
CodexCreature.cs:94
CodexCreature.kills
int kills
Definition:
CodexCreature.cs:41
CodexCreature.Name
string Name
Definition:
CodexCreature.cs:12
CodexCreature._ints
int[] _ints
Definition:
CodexCreature.cs:10
CodexCreature.SetImage
void SetImage(Image image, int idSkin=0, bool nativeSize=true)
Definition:
CodexCreature.cs:88
CodexCreature.weakspot
int weakspot
Definition:
CodexCreature.cs:29
CodexCreature.BonusDropLv
int BonusDropLv
Definition:
CodexCreature.cs:65
EClass
Definition:
EClass.cs:5
EClass.sources
static SourceManager sources
Definition:
EClass.cs:42
SourceChara.Row
Definition:
SourceChara.cs:8
SourceManager.charas
SourceChara charas
Definition:
SourceManager.cs:18
Elin
CodexCreature.cs
Generated by
1.9.6