Pharan

Hey Nate!

It was probably a design call or something that you made a bunch of methods have more parameters. (so that people actually notice the API change?)

I finally made the leap to use the latest version of the runtime. Suffice to say, it caused a lot of wrong-number-of-arguments errors in the log. :D

After retyping the same thing a few times, I realized it made sense to make some things default and it turned out to be the old method signatures. So I took the liberty of (re)adding:

(1)
SetAnimation(Spine.Animation animation, bool loop)
sans the track number param. I made that default to 0.

and
(2)
AddAnimation(Spine.Animation animation, bool loop)
sans the track number and delay. made both of these default to 0.

... to match the old defaults which did exactly what I needed anyway. For most stuff, I only play one animation, so I just make these methods pass 0 as the track number.


Just thought I'd share. Maybe you consider these candidates for re-adding to the API. I could make a PR for them for C# if you want.
Kullanıcı avatarı
Pharan
  • Mesajlar: 5366

Nate

I felt it was a bit more explicit about how things work to not provide overloaded methods. I'm on the fence about adding them. Some runtimes can't overload (AS3, C) so even if we did add them those runtimes wouldn't get them.
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 12208

Pharan

Ah, I see. I figured it was some kind of transparency thing. Valid design, IMO.

I mean I think there are other options, but I can't think of any that aren't ridiculous at this point.

People can always change it themselves when they realize what they need in their own case. I was just putting it out there. I'll still keep sticking it in my version. :p
Kullanıcı avatarı
Pharan
  • Mesajlar: 5366

Nate

The runtime classes are pretty low level to provide the flexibility needed for any game. I expect most games will want to build a thin layer over the runtimes based on how the runtimes are used in that particular game. I still strive for a nice API of course. :)
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 12208


Dön Runtimes