Esempio n. 1
0
        private static float UpdateCutscene(AreaAttackCutscene cutscene, int armorId)
        {
            var sprite   = SpriteHelper.GetAreaAttackCutsceneSprite(armorId);
            var shader   = Shader.Find("Sprites/Default");
            var material = new Material(shader);

            var slotIndex  = cutscene.SkeletonAnimation.skeleton.FindSlotIndex(SlotName);
            var slot       = cutscene.SkeletonAnimation.skeleton.FindSlot(SlotName);
            var attachment = slot.Attachment.GetRemappedClone(sprite, material);


            var clonedSkin = cutscene.SkeletonAnimation.skeleton.Data.DefaultSkin.GetClone();

            clonedSkin.SetAttachment(slotIndex, AttachmentName, attachment);
            cutscene.SkeletonAnimation.skeleton.SetSkin(clonedSkin);

            return(cutscene.SkeletonAnimation.AnimationState.Tracks.First().AnimationEnd);
        }