SpriteAsset
Namespace: Murder.Assets.Graphics
Assembly: Murder.dll
public class SpriteAsset : GameAsset, IPreview
Implements: GameAsset, IPreview
⭐ Constructors
public SpriteAsset()
public SpriteAsset(Guid guid, TextureAtlas atlas, string name, ImmutableArray<T> frames, ImmutableDictionary<TKey, TValue> animations, Point origin, Point size, Rectangle nineSlice)
Parameters
guid
Guid
atlas
TextureAtlas
name
string
frames
ImmutableArray<T>
animations
ImmutableDictionary<TKey, TValue>
origin
Point
size
Point
nineSlice
Rectangle
public SpriteAsset(Guid guid, AtlasId atlasId, string name, ImmutableArray<T> frames, ImmutableDictionary<TKey, TValue> animations, Point origin, Point size, Rectangle nineSlice)
Parameters
guid
Guid
atlasId
AtlasId
name
string
frames
ImmutableArray<T>
animations
ImmutableDictionary<TKey, TValue>
origin
Point
size
Point
nineSlice
Rectangle
⭐ Properties
Animations
public ImmutableDictionary<TKey, TValue> Animations { get; private set; }
Returns
ImmutableDictionary<TKey, TValue>
AsepriteFileInfo
public T? AsepriteFileInfo;
Returns
T?
Atlas
public readonly AtlasId Atlas;
Returns
AtlasId
CanBeCreated
public virtual bool CanBeCreated { get; }
Returns
bool
CanBeDeleted
public virtual bool CanBeDeleted { get; }
Returns
bool
CanBeRenamed
public virtual bool CanBeRenamed { get; }
Returns
bool
CanBeSaved
public virtual bool CanBeSaved { get; }
Returns
bool
EditorColor
public virtual Vector4 EditorColor { get; }
Returns
Vector4
EditorFolder
public virtual string EditorFolder { get; }
Returns
string
FileChanged
public bool FileChanged { get; public set; }
Returns
bool
FilePath
public string FilePath { get; public set; }
Returns
string
Frames
public readonly ImmutableArray<T> Frames;
Returns
ImmutableArray<T>
Guid
public Guid Guid { get; protected set; }
Returns
Guid
Icon
public virtual char Icon { get; }
Returns
char
IsStoredInSaveData
public virtual bool IsStoredInSaveData { get; }
Returns
bool
Name
public string Name { get; public set; }
Returns
string
NineSlice
public readonly Rectangle NineSlice;
Returns
Rectangle
Origin
public readonly Point Origin;
Returns
Point
Rename
public bool Rename { get; public set; }
Returns
bool
SaveLocation
public virtual string SaveLocation { get; }
Returns
string
Size
public readonly Point Size;
Returns
Point
StoreInDatabase
public virtual bool StoreInDatabase { get; }
Returns
bool
TaggedForDeletion
public bool TaggedForDeletion;
Returns
bool
⭐ Methods
OnModified()
protected virtual void OnModified()
GetFrame(int)
public AtlasCoordinates GetFrame(int frame)
Parameters
frame
int
Returns
AtlasCoordinates
AddMessageToAnimationFrame(string, int, string)
public bool AddMessageToAnimationFrame(string animationName, int frame, string message)
Parameters
animationName
string
frame
int
message
string
Returns
bool
RemoveMessageFromAnimationFrame(string, int)
public bool RemoveMessageFromAnimationFrame(string animationName, int frame)
Parameters
animationName
string
frame
int
Returns
bool
Duplicate(string)
public GameAsset Duplicate(string name)
Parameters
name
string
Returns
GameAsset
AssetsToBeSaved()
public List<T> AssetsToBeSaved()
Returns
List<T>
GetSimplifiedName()
public string GetSimplifiedName()
Returns
string
GetSplitNameWithEditorPath()
public String[] GetSplitNameWithEditorPath()
Returns
string[]
GetPreviewId()
public virtual ValueTuple<T1, T2> GetPreviewId()
Returns
ValueTuple<T1, T2>
AfterDeserialized()
public virtual void AfterDeserialized()
AppendEditorPath(string)
public void AppendEditorPath(string prefix)
Set a directory prefix used for the editor folder.
Parameters
prefix
string
MakeGuid()
public void MakeGuid()
TrackAssetOnSave(Guid)
public void TrackAssetOnSave(Guid g)
Parameters
g
Guid
⚡