static void removeDiveReelNode(DiveReel reel, DiveReelNode node) { #if GAME_SN reel.nodes.Remove(node.gameObject); #elif GAME_BZ reel.nodes.Remove(node); #endif node.DestroySelf(0.1f); recalcNodes(reel); }
// Token: 0x0600000E RID: 14 RVA: 0x000023C0 File Offset: 0x000005C0 public static bool Prefix(DiveReel __instance) { SkinnedMeshRenderer[] allComponentsInChildren = __instance.GetAllComponentsInChildren <SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer skinnedMeshRenderer in allComponentsInChildren) { bool flag = skinnedMeshRenderer.name.Contains("dive_reel_geo"); if (flag) { skinnedMeshRenderer.material.color = new Color32(Convert.ToByte(MainPatch.config.divevalue), Convert.ToByte(MainPatch.config.divegvalue), Convert.ToByte(MainPatch.config.divebvalue), 1); } } return(true); }
static bool Prefix(DiveReel __instance) { if (GameUtils.getTarget(2f)?.GetComponent <DiveReelNode>() is DiveReelNode reelNode) { if (!reelNode.firstArrow) { removeDiveReelNode(__instance, reelNode); } return(false); } return(true); }
static void recalcNodes(DiveReel reel) { reel.nodePositions.Clear(); Transform prevTransform = reel.transform; foreach (var nodeObj in reel.nodes) { DiveReelNode node = nodeObj.GetComponent <DiveReelNode>(); reel.nodePositions.Add(node.transform.position); if (!node.firstArrow) { node.previousArrowPos = prevTransform; } prevTransform = node.transform; reel.lastNodeTransform = node.transform; } }
private static void PostFix(DiveReel __instance) { __instance.maxNodes = MorePathfinderNodesCore_BZ.Config.MaxNodes; __instance.energyCostPerDisc = MorePathfinderNodesCore_BZ.Config.Energyusagepernode; }