Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
SpriteReplacer.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections.Generic;
3
using
System.IO;
4
using
UnityEngine;
5
6
public
class
SpriteReplacer
7
{
8
public
static
Dictionary<string, string>
dictModItems
=
new
Dictionary<string, string>();
9
10
public
bool
hasChacked
;
11
12
public
SpriteData
data
;
13
14
public
bool
HasSprite
(
string
id
)
15
{
16
if
(!
hasChacked
)
17
{
18
try
19
{
20
string
text = CorePath.packageCore +
"Texture/Item/"
+ id;
21
if
(
dictModItems
.ContainsKey(
id
))
22
{
23
Debug
.Log(
id
+
":"
+
dictModItems
[
id
]);
24
data
=
new
SpriteData
25
{
26
path =
dictModItems
[id]
27
};
28
data
.
Init
();
29
}
30
else
if
(File.Exists(text +
".png"
))
31
{
32
data
=
new
SpriteData
33
{
34
path = text
35
};
36
data
.
Init
();
37
}
38
hasChacked
=
true
;
39
}
40
catch
(Exception ex)
41
{
42
Debug
.Log(
"Error during fetching spirte:"
+ ex);
43
}
44
}
45
return
data
!=
null
;
46
}
47
}
ReleaseMode.Debug
@ Debug
SpriteData
Definition:
SpriteData.cs:10
SpriteData.Init
void Init()
Definition:
SpriteData.cs:31
SpriteReplacer
Definition:
SpriteReplacer.cs:7
SpriteReplacer.data
SpriteData data
Definition:
SpriteReplacer.cs:12
SpriteReplacer.dictModItems
static Dictionary< string, string > dictModItems
Definition:
SpriteReplacer.cs:8
SpriteReplacer.hasChacked
bool hasChacked
Definition:
SpriteReplacer.cs:10
SpriteReplacer.HasSprite
bool HasSprite(string id)
Definition:
SpriteReplacer.cs:14
Elin
Plugins.basecore
SpriteReplacer.cs
Generated by
1.9.6