public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { SetAnimBooleanNodeSettings settings = JsonUtility.FromJson <SetAnimBooleanNodeSettings>(currentNode.m_typeData); SceneManager.Instance.Character.Animator.SetBool(settings.m_AnimParameterName, settings.m_Value); yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { Debug.Log(currentNode.m_typeData); SetGameObjectActiveNodeSettings settings = JsonUtility.FromJson <SetGameObjectActiveNodeSettings>(currentNode.m_typeData); GameObject[] objects = SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects(); for (int i = 0; i < objects.Length; ++i) { RecursiveSetActive(objects[i], settings); } yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { string path = AssetDatabase.GUIDToAssetPath(currentNode.m_typeData); s_WaitingOnDialogue = true; DialogueManager.Instance.StartDialogue(AssetDatabase.LoadAssetAtPath <SerializableDialogData>(path), DialogueEnd); while (s_WaitingOnDialogue) { yield return(null); } yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { InventoryItem inventoryItem = SceneManager.Instance.GetInventoryItem(currentNode.m_typeData); if (inventoryItem == null) { Debug.LogErrorFormat("Could not find inventory item: {0}", currentNode.m_typeData); yield break; } inventoryItem.PickedUp(); yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { var data = JsonUtility.FromJson <SingleLineNodeData>(currentNode.m_typeData); AdventureGameOverlayManager.Instance.DisplayCharacterDialogue(data.dialogue, data.character, OnDialogueEnd); s_WaitingOnDialogue = true; while (s_WaitingOnDialogue) { yield return(null); } yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { int waitSeconds; if (!int.TryParse(currentNode.m_typeData, out waitSeconds)) { yield break; } float elapsedTime = 0.0f; while (elapsedTime < waitSeconds) { elapsedTime += Time.deltaTime; yield return(null); } yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { Transform trans = SceneManager.Instance.GetLocator(currentNode.m_typeData); if (trans == null) { Debug.LogErrorFormat("Could not find locator: {0}", currentNode.m_typeData); yield break; } SceneManager.Instance.Character.WalkToPosition(trans.position); while (!SceneManager.Instance.Character.IsAtDestination()) { yield return(null); } yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { SceneManager.Instance.Character.Animator.SetTrigger(currentNode.m_typeData); yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { InventoryItem selected = InventoryManager.Instance.Selected; yield return(currentNode.GetReturnValue(selected && selected.Id == currentNode.m_typeData ? 0 : 1)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { SceneManager.Instance.TriggerDoorway(currentNode.m_typeData); yield break; }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { //if true return first return value if false return second yield return(currentNode.GetReturnValue(PersistentDataManager.Instance.IsStoryEventFinished(currentNode.m_typeData) ? 0 : 1)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { Debug.LogFormat("Output is: {0}", currentNode.m_typeData); yield return(currentNode.GetReturnValue(0)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { bool itemInInventory = InventoryManager.Instance.GetItemWithId(currentNode.m_typeData) != null; yield return(currentNode.GetReturnValue(itemInInventory ? 0 : 1)); }
public static IEnumerator Execute(GameLogicData.GameLogicGraphNode currentNode) { PersistentDataManager.Instance.AddFinishedStoryEvent(currentNode.m_typeData); yield return(currentNode.GetReturnValue(0)); }