Started the great comment update.

This commit is contained in:
2018-03-18 19:06:08 -07:00
parent 9834bbcf28
commit fabef6ba82
7 changed files with 132 additions and 1 deletions

View File

@ -90,6 +90,7 @@ namespace CustomNPCFramework
private void GameEvents_UpdateTick(object sender, EventArgs e)
{
if (Game1.player.currentLocation == null) return;
if (Game1.activeClickableMenu != null) return;
foreach (var v in Game1.player.currentLocation.characters)
{
v.speed = 1;

View File

@ -6,11 +6,26 @@ using System.Threading.Tasks;
namespace CustomNPCFramework.Framework.Enums
{
/// <summary>
/// A enum of different types of animations supported by the framework.
/// </summary>
public enum AnimationType
{
/// <summary>
/// A key to be used whenever an npc uses a standing animation.
/// </summary>
standing,
/// <summary>
/// A key to be used wheneven an npc uses a walking/moving animation.
/// </summary>
walking,
/// <summary>
/// A key to be used whenever an npc uses a swimming animation.
/// </summary>
swimming,
/// <summary>
/// A key to be used whenever an npc uses a sitting animation.
/// </summary>
sitting
}
}

View File

@ -6,11 +6,31 @@ using System.Threading.Tasks;
namespace CustomNPCFramework.Framework.Enums
{
/// <summary>
/// An enum to be used to signify directions.
/// The enum order corresponds to the same order Stardew Valley uses for directions where
/// Up=0
/// Right=1
/// Down=2
/// Left=3
/// </summary>
public enum Direction
{
/// <summary>
/// Used to signify something to face/move up.
/// </summary>
up,
/// <summary>
/// Used to signify something to face/move right.
/// </summary>
right,
/// <summary>
/// Used to signify something to face/move down.
/// </summary>
down,
/// <summary>
/// Used to signify something to face/move left.
/// </summary>
left
}
}

View File

@ -7,12 +7,22 @@ using System.Threading.Tasks;
namespace CustomNPCFramework.Framework.Enums
{
/// <summary>
/// Gender enum to signify the different genders for npcs.
/// Do what you want with this. For code simplicity anything that is non-binary is specified under other.
/// </summary>
public enum Genders
{
/// <summary>
/// Used for npcs to signify that they are the male gender.
/// </summary>
male,
/// <summary>
/// Used for npcs to signify that they are the female gender.
/// </summary>
female,
/// <summary>
/// Used for npcs to signify that they are a non gender binary gender.
/// </summary>
other
}
}

View File

@ -6,15 +6,50 @@ using System.Threading.Tasks;
namespace CustomNPCFramework.Framework.Enums
{
/// <summary>
/// An enum used to signify the different asset types that can be used for npcs.
/// </summary>
public enum PartType
{
/// <summary>
/// Used to signify that the asset is of the body part category. Without this the npc is basically a ghost.
/// </summary>
body,
/// <summary>
/// Used to signify that the asset is of the eyes part category. The window to the soul.
/// </summary>
eyes,
/// <summary>
/// Used to signify that the asset is of the hair part category. Volume looks good in 2D.
/// </summary>
hair,
/// <summary>
/// Used to signify that the asset is of the shirt part category.No shirt = no service.
/// </summary>
shirt,
/// <summary>
/// Used to signify that the asset is of the pants/bottoms part category. Also known as bottoms, skirts, shorts, etc.
/// </summary>
pants,
/// <summary>
/// Used to signify that the asset is of the shoes part category. Lace up those kicks.
/// </summary>
shoes,
/// <summary>
/// Used to signify that the asset is of the accessort part category. Got to wear that bling.
/// </summary>
accessory,
other
/// <summary>
/// Used to signify that the asset is of the other part category. Who knows what this really is...
/// </summary>
other,
/// <summary>
/// Used to signify that the asset is of the swimsuit part category. Got to be decent when taking a dip.
/// </summary>
swimsuit,
/// <summary>
/// Used to signify that the asset is of the amrs part category. Arms need to be rendered above a shirt on npcs otherwise they get covered.
/// </summary>
arms
}
}

View File

@ -4,13 +4,33 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomNPCFramework.Framework.Enums
{
/// <summary>
/// An enum signifying the different seasons that are supported when chosing npc graphics.
/// </summary>
public enum Seasons
{
/// <summary>
/// The spring season. This ensures that a corresponding graphic with this enum in it's seasons list can be chosen in the spring time.
/// Also used for functionality to check seasons.
/// </summary>
spring,
/// <summary>
/// The summer season. This ensures that a corresponding graphic with this enum in it's seasons list can be chosen in the summer time.
/// Also used for functionality to check seasons.
/// </summary>
summer,
/// <summary>
/// The fall season. This ensures that a corresponding graphic with this enum in it's seasons list can be chosen in the fall time.
/// Also used for functionality to check seasons.
/// </summary>
fall,
/// <summary>
/// The winter season. This ensures that a corresponding graphic with this enum in it's seasons list can be chosen in the winter time.
/// Also used for functionality to check seasons.
/// </summary>
winter
}
}

View File

@ -8,18 +8,48 @@ using System.Threading.Tasks;
namespace CustomNPCFramework.Framework.Graphics.TextureGroups
{
/// <summary>
/// A group of a textures used to hold all of the textures associated with a single asset such as a hair style or a shirt.
/// </summary>
public class TextureGroup
{
/// <summary>
/// The directional (Left, Right, Up, Down) textures to be used when the NPC is standing.
/// </summary>
public DirectionalTexture standingTexture;
/// <summary>
/// The directional (Left, Right, Up, Down) textures to be used when the NPC is sitting.
/// </summary>
public DirectionalTexture sittingTexture;
/// <summary>
/// The directional (Left, Right, Up, Down) textures to be used when the NPC is swimming.
/// </summary>
public DirectionalTexture swimmingTexture;
/// <summary>
/// The directional (Left, Right, Up, Down) textures to be used when the NPC is moving.
/// </summary>
public DirectionalTexture movingTexture;
/// <summary>
/// The current directional texture to be used by the npc. Can be things such as the standing, swimming, moving, or sitting texture.
/// </summary>
public DirectionalTexture currentTexture;
/// <summary>
/// Asset info loaded in from the corresponding .json file.
/// </summary>
private AssetInfo info;
/// <summary>
/// The path to the .json file.
/// </summary>
private string path;
/// <summary>
/// The current direction of the texture group. See Direction.cs
/// </summary>
private Direction dir;
/// <summary>
/// The type of asset this is. Body, hair, eyes, shirt,etc...
/// </summary>
private AnimationType type;
public TextureGroup(AssetInfo info, string path,Direction direction ,AnimationType animationType=AnimationType.standing)