-
Notifications
You must be signed in to change notification settings - Fork 6
/
Utilities.cs
28 lines (25 loc) · 1.05 KB
/
Utilities.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.GameContent;
namespace ModdersToolkit
{
internal static class Utilities
{
internal static void LoadProjectile(int type) {
// Use this instead of Main.instance.LoadProjectile because we don't need ImmediateLoad
if (TextureAssets.Projectile[type].State == AssetState.NotLoaded)
Main.Assets.Request<Texture2D>(TextureAssets.Projectile[type].Name, AssetRequestMode.AsyncLoad);
}
internal static void LoadItem(int type) {
// Use this instead of Main.instance.LoadItem because we don't need ImmediateLoad
if (TextureAssets.Item[type].State == AssetState.NotLoaded)
Main.Assets.Request<Texture2D>(TextureAssets.Item[type].Name, AssetRequestMode.AsyncLoad);
}
internal static void LoadNPC(int type) {
// Use this instead of Main.instance.LoadNPC because we don't need ImmediateLoad
if (TextureAssets.Npc[type].State == AssetState.NotLoaded)
Main.Assets.Request<Texture2D>(TextureAssets.Npc[type].Name, AssetRequestMode.AsyncLoad);
}
}
}