代码拉取完成,页面将自动刷新
Inspired by https://github.com/WeAthFoLD/MetaSprite https://github.com/Seanba/Aseprite2Unity
MetaSprite is an library that lets you import Aseprite's .ase file into Unity, Love2DCS.
support meta:
pivot
: @pivot()
location the pivot of the spriterect
: @rect("rect_name")
generate rectangle region on each frametrans
: @trans("weapon pos")
generate position on each frameevent
: @event("event name")
generate event on each frameuse it by
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);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。