Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C# Animation Error
#9
You're not dumb at all Smile 

I think the problem is: prior to release 2.8.0, function for sprite animation took 4 arguments:

Code:
bool TLN_SetSpriteAnimation (int anim_index, int nsprite, TLN_Sequence sequence, int loop);

Whereas for release 2.8.0, the first "anim_index" parameter has been removed, so the function is:

Code:
bool TLN_SetSpriteAnimation (int nsprite, TLN_Sequence sequence, int loop);

The C# binding still targets the old format, but you're using latest 2.9.0 release, so parameter order gets mismatched. It should be updated to the new API. The SetSpriteAnimation function should not belong to Animation class, but to Sprite class. That's the idea:

This method
Code:
Animation::SetSpriteAnimation(int spriteIndex, Sequence sequence, int loop)
{
    TLN_SetSpriteAnimation(index, spriteIndex, sequence.ptr, loop);
}

Should be transformed to:

Code:
Sprite::SetAnimation(Sequence sequence, int loop)
{
    TLN_SetSpriteAnimation(index, sequence.ptr, loop);
}
Reply


Messages In This Thread
C# Animation Error - by Midnight Syntax - 03-23-2021, 02:55 PM
RE: C# Animation Error - by megamarc - 03-24-2021, 12:28 AM
RE: C# Animation Error - by Midnight Syntax - 03-24-2021, 03:54 AM
RE: C# Animation Error - by Midnight Syntax - 03-24-2021, 03:55 AM
RE: C# Animation Error - by megamarc - 03-24-2021, 08:18 PM
RE: C# Animation Error - by Midnight Syntax - 03-25-2021, 03:29 AM
RE: C# Animation Error - by megamarc - 03-25-2021, 06:27 AM
RE: C# Animation Error - by Midnight Syntax - 03-25-2021, 07:06 AM
RE: C# Animation Error - by megamarc - 03-25-2021, 08:16 AM
RE: C# Animation Error - by Midnight Syntax - 03-25-2021, 09:07 AM
RE: C# Animation Error - by megamarc - 03-25-2021, 09:35 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)