New constructors for ExtendedNPC that don't take a CharacterRenderer, just a basic Sprite.

This commit is contained in:
2018-03-04 15:21:39 -08:00
parent e17dd9ea7c
commit 68c831029b
2 changed files with 33 additions and 0 deletions

View File

@ -22,6 +22,18 @@ namespace CustomNPCFramework
/// List all asset managers in use.
/// Have all asset managers list what assets they are using.
///
/// Have asset info have a var called age.
/// ...where
/// 0=adult
/// 1=child
///
/// /// Have asset info have a var called bodyType.
/// ...where
/// 0=thin
/// 1=normal
/// 2=muscular
/// 3=big
///
/// Load in the assets and go go go.
/// -Collect a bunch of assets together to test this thing.
/// </summary>

View File

@ -42,6 +42,27 @@ namespace CustomNPCFramework.Framework.NPCS
public ExtendedNPC() :base()
{
}
public ExtendedNPC(Sprite sprite, Vector2 position, int facingDirection, string name) : base(sprite.sprite, position, facingDirection, name, null)
{
this.characterRenderer = null;
this.Portrait = (Texture2D)null;
this.portraitInformation = null;
this.spriteInformation = sprite;
this.spriteInformation.setCharacterSpriteFromThis(this);
this.swimming = false;
}
public ExtendedNPC(Sprite sprite, Portrait portrait, Vector2 position, int facingDirection, string name) : base(sprite.sprite, position, facingDirection, name, null)
{
this.characterRenderer = null;
this.portraitInformation = portrait;
this.portraitInformation.setCharacterPortraitFromThis(this);
this.spriteInformation = sprite;
this.spriteInformation.setCharacterSpriteFromThis(this);
this.swimming = false;
}
public ExtendedNPC(Sprite sprite,BasicRenderer renderer,Vector2 position,int facingDirection,string name): base(sprite.sprite, position, facingDirection, name, null)
{
this.characterRenderer = renderer;