2018-02-24 11:10:56 +08:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace CustomNPCFramework.Framework.Graphics
|
|
|
|
|
{
|
|
|
|
|
public class AssetInfo
|
|
|
|
|
{
|
2018-03-04 23:53:55 +08:00
|
|
|
|
public string assetName;
|
2018-03-05 05:23:40 +08:00
|
|
|
|
public NamePairings standingAssetPaths;
|
|
|
|
|
public NamePairings swimmingAssetPaths;
|
|
|
|
|
public NamePairings movingAssetPaths;
|
|
|
|
|
public NamePairings sittingAssetPaths;
|
2018-03-04 23:53:55 +08:00
|
|
|
|
public string downAssetName;
|
2018-02-24 11:10:56 +08:00
|
|
|
|
public Vector2 assetSize;
|
|
|
|
|
public bool randomizeUponLoad;
|
2018-03-04 23:53:55 +08:00
|
|
|
|
|
|
|
|
|
public AssetInfo()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-05 05:23:40 +08:00
|
|
|
|
public AssetInfo(string assetName,NamePairings StandingAssetPaths, NamePairings MovingAssetPaths, NamePairings SwimmingAssetPaths, NamePairings SittingAssetPaths, Vector2 assetSize, bool randomizeUponLoad)
|
2018-03-04 23:53:55 +08:00
|
|
|
|
{
|
2018-03-05 05:23:40 +08:00
|
|
|
|
this.sittingAssetPaths = SittingAssetPaths;
|
|
|
|
|
this.standingAssetPaths = StandingAssetPaths;
|
|
|
|
|
this.movingAssetPaths = MovingAssetPaths;
|
|
|
|
|
this.swimmingAssetPaths = SwimmingAssetPaths;
|
2018-02-24 11:10:56 +08:00
|
|
|
|
this.assetSize = assetSize;
|
|
|
|
|
this.randomizeUponLoad = randomizeUponLoad;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Save the json to a certain location.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path"></param>
|
|
|
|
|
public void writeToJson(string path)
|
|
|
|
|
{
|
|
|
|
|
Class1.ModHelper.WriteJsonFile<AssetInfo>(path, this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Read the json from a certain location.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static AssetInfo readFromJson(string path)
|
|
|
|
|
{
|
|
|
|
|
return Class1.ModHelper.ReadJsonFile<AssetInfo>(path);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|