Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
CharacterSkinsCache.cs
浏览该文件的文档.
1
using
Engine.Graphics
;
2
3
namespace
Game
{
4
public
class
CharacterSkinsCache
{
5
public
Dictionary<string, Texture2D>
m_textures
= [];
6
7
public
bool
ContainsTexture
(
Texture2D
texture) =>
m_textures
.ContainsValue(texture);
8
9
public
Texture2D
GetTexture
(
string
name) {
10
if
(!
m_textures
.TryGetValue(name, out
Texture2D
value)) {
11
value =
CharacterSkinsManager
.
LoadTexture
(name);
12
m_textures
.Add(name, value);
13
}
14
return
value;
15
}
16
17
public
void
Clear
() {
18
foreach
(
Texture2D
value
in
m_textures
.Values) {
19
if
(!
ContentManager
.
IsContent
(value)) {
20
value.
Dispose
();
21
}
22
}
23
m_textures
.Clear();
24
}
25
}
26
}
Engine.Graphics.Texture2D
定义
Texture2D.cs:15
Engine.Graphics.Texture2D.Dispose
override void Dispose()
定义
Texture2D.cs:105
Game.CharacterSkinsCache
定义
CharacterSkinsCache.cs:4
Game.CharacterSkinsCache.m_textures
Dictionary< string, Texture2D > m_textures
定义
CharacterSkinsCache.cs:5
Game.CharacterSkinsCache.Clear
void Clear()
定义
CharacterSkinsCache.cs:17
Game.CharacterSkinsCache.ContainsTexture
bool ContainsTexture(Texture2D texture)
定义
CharacterSkinsCache.cs:7
Game.CharacterSkinsCache.GetTexture
Texture2D GetTexture(string name)
定义
CharacterSkinsCache.cs:9
Game.CharacterSkinsManager
定义
CharacterSkinsManager.cs:7
Game.CharacterSkinsManager.LoadTexture
static Texture2D LoadTexture(string name)
定义
CharacterSkinsManager.cs:89
Game.ContentManager
定义
ContentManager.cs:50
Game.ContentManager.IsContent
static bool IsContent(object content)
定义
ContentManager.cs:157
Engine.Graphics
定义
BaseBatch.cs:1
Game
定义
ContentFileBridge.cs:4
SurvivalcraftApi 1.8.2.3
Survivalcraft.Windows
Game
CharacterSkinsCache.cs
制作者
1.16.1