Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/endlesstravel/lovesharp.metasprite
Aseprite Support for LoveSharp
https://github.com/endlesstravel/lovesharp.metasprite
Last synced: 13 days ago
JSON representation
Aseprite Support for LoveSharp
- Host: GitHub
- URL: https://github.com/endlesstravel/lovesharp.metasprite
- Owner: endlesstravel
- License: mit
- Created: 2020-06-26T23:47:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T23:47:46.000Z (over 4 years ago)
- Last Synced: 2024-10-27T05:51:27.639Z (17 days ago)
- Language: C#
- Homepage:
- Size: 119 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Inspired by
https://github.com/WeAthFoLD/MetaSprite
https://github.com/Seanba/Aseprite2UnityMetaSprite is an library that lets you import Aseprite's .ase file into Unity, Love2DCS.
![](img/show-case-01.gif)
![](img/show-case-02.gif)support meta:
* `pivot` : `@pivot()` location the pivot of the sprite
* `rect` : `@rect("rect_name")` generate rectangle region on each frame
* `trans` : `@trans("weapon pos")` generate position on each frame
* `event` : `@event("event name")` generate event on each frameuse it by
```C#
using MetaSprite;
class Program : Scene
{
AsepriteAnimation ani = AsepriteAnimation.New("example.ase", "idle");
public override void Load()
{
ani.FrameBegin += (index) =>
{
Console.WriteLine($"{path} - b - [{index}] / { ani.FrameCount - 1}");foreach (var evtName in ani.GetFrameEvent(index))
{
Console.WriteLine($"event: " + evtName);
}
};
}
public override void Update(float dt)
{
// ani.SetTag("attack");
// ani.SetTag("attack", true); // use reverse mode
// ani.TagName // get tag name
// ani......... // more power
ani.Update(dt);
}
public override void Draw()
{
ani.Draw(pos.X, pos.Y);
}
}
```