Updated CustomNpcs to have fixed texture references. Whether or notI use it is a different question.

This commit is contained in:
Joshua Navarro 2019-01-05 19:15:21 -08:00
parent 56d389899b
commit 870dd12a6d
2 changed files with 5 additions and 5 deletions

View File

@ -63,10 +63,10 @@ namespace CustomNPCFramework.Framework.Graphics
string upString = Class1.getShortenedDirectory(Path.Combine(path, info.upString + ".png")).Remove(0, 1);
string downString = Class1.getShortenedDirectory(Path.Combine(path, info.downString + ".png")).Remove(0, 1);
this.leftTexture = new Texture2DExtended(helper, Class1.Manifest, leftString);
this.rightTexture = new Texture2DExtended(helper, Class1.Manifest, rightString);
this.upTexture = new Texture2DExtended(helper, Class1.Manifest, upString);
this.downTexture = new Texture2DExtended(helper, Class1.Manifest, downString);
this.leftTexture = new Texture2DExtended(helper, leftString);
this.rightTexture = new Texture2DExtended(helper, rightString);
this.upTexture = new Texture2DExtended(helper, upString);
this.downTexture = new Texture2DExtended(helper, downString);
switch (direction)
{

View File

@ -19,7 +19,7 @@ namespace CustomNPCFramework.Framework.ModularNpcs
{
//Set the sprite texture
this.sprite = new AnimatedSprite();
Texture2D load = texture.Copy().texture;
Texture2D load = texture.Copy().Texture;
var thing = Class1.ModHelper.Reflection.GetField<Texture2D>(this.sprite, "Texture", true);
thing.SetValue(load);