SetAttachmentTexture(skeleton.FindSlotIndex("hammer"), "hammer", "hammer/" SwungWeaponComponent. Spine.AtlasRegion region = textureAtlas.FindRegion(attachmentTexture.Replace("\\", "/")) Īttachment.SetUVs(region.u, region.v, region.u2, region.v2, region.rotate) Īttachment.SetUVs(region.u2, region.v, region.u, region.v2, region.rotate) Īttachment.RegionOffsetX = region.offsetX Īttachment.RegionOffsetY = region.offsetY Īttachment.RegionOriginalWidth = region.originalWidth Īttachment.RegionOriginalHeight = region.originalHeight Īttachment.Height = attachment.RegionOriginalHeight Īttachment.Width = attachment.RegionOriginalWidth Inspired from AtlasAttachmentLoader.cs:NewAttachment However, it can still be beneficial to use it because of the multi-resolution support. Change the texture region associated to the current attachment The TexturePacker implementation for the Felgo Spine entities is not yet ideal, so the performance might be worse than without packed images. Spine.RegionAttachment attachment = (Spine.RegionAttachment)SpineSkeleton.GetAttachment(slotIndex, attachmentName) Spine.Atlas textureAtlas = ("Spine/player").Atlas Internal void SetAttachmentTexture(int slotIndex, string attachmentName, string attachmentTexture, bool mirror = false) Here’s the function I made for swapping out the textures.png files with the ones you generated, the game should be able to load the images and work exactly as it did before. In your game replace the spine export.Now that you have a folder with these three files and all the images you will want in the spine double click on texpacker.bat and wait for it to complete.Add a new file pack.json to the folder and put:.Add a new file texpacker.bat to the folder and put:.Spine Animations (MahiGaming/Microgaming Slot Games) Jarrod McDevitt. Download libgdx texpacker.jar and put it into the folder. Spine Animations (MahiGaming/Microgaming Slot Games). ![]() Put all the raw spine images (not the spine exported images) AND the images you will swap in into a folder together.This uses an older version of the spine libraries so I’m not sure if it still works but it should be similar. png files and then you can swap them out in code. I couldn’t figure out how to use any images that aren’t in the spine export png’s and atlas so I use the libgdx texture packer to replace the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |