Exemplo n.º 1
0
            public static bool Prefix(
                // ReSharper disable InconsistentNaming
                AI_NetworkBehaviour_Animal __instance
                // ReSharper restore InconsistentNaming
                )
            {
                if (MinimumScaleFactor < 0 ||
                    MaximumScaleFactor < 0)
                {
                    return(true);
                }

                __instance.localScaleInterval = new Interval_Float(MinimumScaleFactor, MaximumScaleFactor);

                var aiNetworkBehaviourLlama = __instance as AI_NetworkBehaviour_Llama;

                if (aiNetworkBehaviourLlama == null)
                {
                    return(true);
                }

                var fixedLlamaAnimator = m_assetBundle.LoadAsset <RuntimeAnimatorController>("Llama_Animator");
                var componentInParent  = aiNetworkBehaviourLlama.GetComponentInParent <Animator>();

                componentInParent.runtimeAnimatorController = fixedLlamaAnimator;
                return(true);
            }
Exemplo n.º 2
0
 private static void Postfix(AI_NetworkBehaviour_Animal __instance)
 {
     if (Minimap.Instance.persistence.markers)
     {
         if (__instance is AI_NetworkBehavior_Shark)
         {
             Minimap.AddMarker(__instance.transform, Minimap.MarkerType.SHARK);
         }
         else
         {
             if (__instance is AI_NetworkBehaviour_Bear ||
                 __instance is AI_NetworkBehaviour_Boar ||
                 __instance is AI_NetworkBehaviour_ButlerBot ||
                 __instance is AI_NetworkBehaviour_MamaBear ||
                 __instance is AI_NetworkBehaviour_Pig ||
                 __instance is AI_NetworkBehaviour_PufferFish ||
                 __instance is AI_NetworkBehaviour_Rat ||
                 __instance is AI_NetworkBehaviour_StoneBird)
             {
                 Minimap.AddMarker(__instance.transform, Minimap.MarkerType.ENEMY);
             }
             else
             {
                 if (__instance is AI_NetworkBehaviour_BugSwarm ||
                     __instance is AI_NetworkBehaviour_Chicken ||
                     __instance is AI_NetworkBehaviour_Goat ||
                     __instance is AI_NetworkBehaviour_Llama ||
                     __instance is AI_NetworkBehaviour_Whale ||
                     __instance is AI_NetworkBehaviour_Animal)
                 {
                     Minimap.AddMarker(__instance.transform, Minimap.MarkerType.NEUTRAL);
                 }
             }
         }
     }
 }