public static bool AlertDirection(Animal __instance, ref Vector3 newDirection, ref bool sendToPack) { // Fleeing from given direction var cancel = false; OnAnimalFleeing?.Invoke(__instance, ref newDirection, ref sendToPack, ref cancel); return !cancel; }
private static bool AlertDirection(Animal __instance, ref Vector3 newDirection, ref bool sendToPack) { // Fleeing from given direction bool cancel = false; OnAnimalFleeing?.Invoke(__instance, ref newDirection, ref sendToPack, out cancel); return(!cancel); }