Jump to content

loodakrawa

Members
  • Content Count

    161
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by loodakrawa

  1. Well, there's nothing built-in if that's what you're asking. Key frames are not special in regards to the actual animation, especially since you can advance the simulation with any delta time which can cause the current frame to never land exactly on a keyframe. That being said, you can probably achieve it by inspecting the keyframe times yourself via animator->Entity->CurrentAnimation->etc and keeping track when you pass a keyframe. Alternatively you can add events to the animation and subscribe via the Animator->EventTriggered event.
  2. Hi, As you already figured out you can pause and resume by setting the Speed property. For the end of the animation - Animator.cs exposes the AnimationFinished event which you can subscribe to. As for jumping to specific keys - what's the use case for that? Could you achieve the same effect by splitting the animation into several smaller ones and then just switch animations instead of jumping to different keys?
  3. Hey, How about implementing a custom Animator that has both the Texture and Normal data as the sprite parameter? Something like: class CustomAnimator : Animator<TextureNormal, SoundEffect> With TextureNormal being some kind of datastructure that has both your texture and normal data. That way you can draw both with one loop.
  4. I have no experience with Xamarin Forms - but I don't see why not. The core library just basically crunches numbers and gives you the numbers about the required transform. You "only" need to map it to something visual - which I assume you can do with Xamarin Forms.
  5. What kind of errors are you getting? Especially for the 1.6.1 version
  6. Hi, At the moment there's no API to do such a thing. I plan to add stuff like this into the new version (one fine day in the future). However, if you end up implementing something like that, please consider submitting a PR - I gladly accept contributions p.s. MonoGame is awesome
  7. Same here. I work on this library between a full-time job and the game I do in my spare time which unfortunately doesn't really leave a lot of time. I plan to rewrite the core of the library and add more advanced features in the future but that will take a while.
  8. I don't think you can do this directly without some kind of trickery. Maybe have a completely separate entity for the arm and just play it on top of the rest of the character? You're right, blend trees are not supported yet + lots of other advanced blending techniques. But feel free to implement them and open a PR and I'll gladly merge it.
  9. This line literally is registering a function to the event. Try animator.EventTriggered += e => GiveDamage(); Btw, this is basic C# - I recommend reading about Delegates, Events, Actions and Funcs.
  10. Once again - the docs and examples are your friend.
  11. For the vast majority of animation management - you usually want some kind of state machine. I highly recommend reading about it here.
  12. Hi You can't see them because they are not listed. You're supposed to control them programmatically. You can use the code from the example to see how certain things are done but that alone won't get you far. For everything else - read the docs and try the examples.
  13. Not sure without debugging but I suspect your move is not actually zero. Checking floats for a specific value should be done with an epsilon not with an actual equality check. Something like: const float EPSILON = 0.001f; // basically a small threshold if(Math.Abs(move) < EPSILON) { // trigger Idle animation } If that's not it - just debug it.
  14. Glad you fixed it - and don't worry, it happens to all of us Adding this here for future reference. If you can't see your animation, check the following: 1) all the images are imported as Sprites 2) your animation game object has a normal scale 3) your animation game object is not hidden by something in the front Also, the Controller is just a very basic example of how to control the animation, it does not get generated when importing .scml files. It's also worth noting that SpriterDotNet isn't integrated with the Unity's animation system and therefore needs to be controlled programmatically - hence the Controller in the example.
  15. No since Unity's animation system doesn't support all the features Spriter has + it also doesn't provide enough low level access to do a proper integration (at least last time I checked). However, Dengar's implementation has a better integration with Unity so check that out. Also, there's another lib by Dengar that adds a portion of the same functionality to SdN) so you might want to check that as well.
  16. It generates a distinct prefab for every Entity in your .scml file and each prefab has all the animations of the associated Entity. I still don't understand what your issue is - but hopefully this helps. If you still have issues - try first reading the SdN documentation and the Unity Specific documentation and then, if you still have an issue, explain it in detail here.
  17. What exactly do you mean by "i can't acces the file for the Animation"?
  18. You should be able to see it in the image properties. More about it here: https://docs.unity3d.com/Manual/class-TextureImporter.html Also, check if there are warnings in the console. SpriterDotNet will complain about missing sprites
  19. Are all of your images imported as Sprites and not Textures?
  20. I'm glad you managed to fix it - and this sounds like a perfectly good solution That being said - I'm doing a major overhaul of the whole project and I'll try to design it in the most flexible way to allow easier customisations such as this.
  21. Hey, I have no idea (closed source) how unity imports things but this sounds like a unity bug to me. I suggest asking on unity forums and/or reporting a bug. Good luck
  22. I'm not sure if I understand correctly but from what you said I think that you have a spriter animation for the whole menu. Technically you could make this work with sub-entities and a bunch of logic but I think a much better approach is to have individual entities for buttons and just assemble them in the program into a menu without having and actual menu entity in spriter. If you still want to have a menu spriter entity, then you can probably achieve the result you want with sub-entities. I'm not sure if there's a more up-to-date explanation but check it out here:
  23. Glad to hear you managed to get it working in the end. NuGet still seems confused with all this new .NET Standard stuff - hopefully they'll fix all these complications in the future. As for MonoGame.Portable - I'm trying to figure out how to depend on it without forcing the inclusion in the client because you end up with both the portable and real one which causes problems. If you want to load the SpriterDotNet types directly with the content pipeline, you can include it in your .mgcb content file like this. Then you choose SpriterImporter as the importer for .scml files and load them like this. The alternative is loading the .scml files manually and deserialising them into the Spriter data structure which is a bit more complicated but you avoid dealing with the content pipeline which is a major pain.
  24. Do you mean you're getting the NU1701 warning? If yes, just ignore it (or add it to the project's ignored warnings) - there's nothing really that can be done about it until (if) MonoGame Portable gets converted to a .NET Standard library. Everything should still work properly. Or are you getting another error?
  25. What exactly is happening? No errors or exceptions seems very strange. It shouldn't have anything to to with MG itself but your runtime environment. That being said, I plan to update everything to .NET Standard 2.0 (which is supposed to be awesome) any day now.
×
×
  • Create New...