Esempio n. 1
0
        static bool Prefix(GadgetWithAnimation __instance)
        {
            var comp = __instance.GetComponentInChildren <Animation>();

            if (comp)
            {
                if (!ChangeBlendModeToBlend(comp.transform, __instance.animationName_))
                {
                    return(true);
                }

                var state = comp[__instance.animationName_];
                if (state)
                {
                    state.layer     = 3;
                    state.blendMode = AnimationBlendMode.Blend;
                    state.wrapMode  = WrapMode.ClampForever;
                    state.enabled   = true;
                    state.weight    = 1f;
                    state.speed     = 0f;
                }
            }

            return(false);
        }
Esempio n. 2
0
        internal static bool Prefix(GadgetWithAnimation __instance)
        {
            Animation animation = __instance.GetComponentInChildren <Animation>(true);

            if (animation)
            {
                return(PatchAnimations(animation, __instance.animationName_));
            }

            return(false);
        }