private void InitializeTextObject( Script_InteractableObjectText iObj, List <Script_InteractableObject> interactableObjects, Script_DialogueManager dialogueManager, Script_Player player ) { interactableObjects.Add(iObj); iObj.SetupDialogueNodeText(dialogueManager, player); iObj.Id = interactableObjects.Count - 1; Script_SortingOrder so = iObj.GetRendererChild().GetComponent <Script_SortingOrder>(); iObj.Setup(so.enabled, so.sortingOrderIsAxisZ, so.offset); }
public void SetupInteractableFullArt ( Transform fullArtParent, List <Script_InteractableObject> interactableObjects, Script_DialogueManager dialogueManager, Script_Player player, bool isInitialize ) { Script_InteractableFullArt[] fullArts = fullArtParent .GetComponentsInChildren <Script_InteractableFullArt>(true); for (int i = 0; i < fullArts.Length; i++) { Script_InteractableFullArt fullArt = fullArts[i]; if (fullArt == null) { continue; } interactableObjects.Add(fullArt); print("fullArt is: " + fullArt); if (isInitialize) { fullArt.SetupDialogueNodeText(dialogueManager, player); fullArt.Id = interactableObjects.Count - 1; Script_SortingOrder so = fullArt.GetRendererChild().GetComponent <Script_SortingOrder>(); fullArt.Setup(so.enabled, so.sortingOrderIsAxisZ, so.offset); } } if (Debug.isDebugBuild && Const_Dev.IsDevMode) { Debug.Log("interactable objects count: " + interactableObjects.Count); } }
public void SetupExits( Transform exitObjectParent, List <Script_InteractableObject> interactableObjects, bool isInitialize ) { Script_InteractableObjectExit[] exits = exitObjectParent .GetComponentsInChildren <Script_InteractableObjectExit>(true); foreach (var exit in exits) { if (isInitialize) { InitializeExitObject(exit); } } if (Debug.isDebugBuild && Const_Dev.IsDevMode) { Debug.Log("interactable objects count: " + interactableObjects.Count); } void InitializeExitObject(Script_InteractableObjectExit iObj) { interactableObjects.Add(iObj); iObj.Id = interactableObjects.Count - 1; if (iObj.GetRendererChild() != null) { Script_SortingOrder so = iObj.GetRendererChild().GetComponent <Script_SortingOrder>(); iObj.Setup(so.enabled, so.sortingOrderIsAxisZ, so.offset); } else { iObj.Setup(false, false, 0); } } }