void Update() { if (_showImageFade) { _showImageCanvasGroup.alpha = Mathf.MoveTowards(_showImageCanvasGroup.alpha, _targetAlpha, imageFadeSpeed * Time.deltaTime); if (_showImageCanvasGroup.alpha == _targetAlpha) { _showImageFade = false; } } if (_waitInput) { ControlWindowItem controlWindow = FindObjectOfType(typeof(ControlWindowItem)) as ControlWindowItem; if (controlWindow != null) { InputField input = controlWindow.GetComponentInChildren <InputField>(); if (input != null) { string blockName = (int)LevelMgr.instance.curLevel + "-" + input.text; if (_flowchart.HasBlock(blockName)) { _flowchart.ExecuteBlock(blockName); input.text = ""; controlWindow.Hide(); _waitInput = false; } } } } }
void Say() { if (canChat) { Flowchart flowchart = GameObject.Find("Flowchart").GetComponent <Flowchart>(); if (flowchart.HasBlock(ChatName)) { flowchart.ExecuteBlock(ChatName); } } }
private void Say() { if (blockNames.Length == 0) { return; } if (flowchart.HasBlock(blockNames[currentSayIndex])) { Debug.Log(blockNames[currentSayIndex]); flowchart.ExecuteBlock(blockNames[currentSayIndex]); } currentSayIndex++; }
IEnumerator loadScene() { var asyncLoadScene = SceneManager.LoadSceneAsync(sceneName); while (!asyncLoadScene.isDone) { yield return(null); } Flowchart flowchart = GameObject.Find("Flowchart").GetComponent <Flowchart>(); Debug.Log(flowchart.HasBlock("onWin")); flowchart.ExecuteBlock((result) ? "onWin" : "onLose"); }
private void ExecuteBlock(string name) { if (flowchart.HasBlock(name)) { flowchart.ExecuteBlock(name); executingBlock.OnNext(flowchart.FindBlock(name)); } else { if (Debug.isDebugBuild) { Debug.Log($"No Block"); } } }
void Update() { if (Input.GetKeyDown(KeyCode.Q)) { Say(); } if (count == 4) { Flowchart flowchart = GameObject.Find("Flowchart").GetComponent <Flowchart>(); if (flowchart.HasBlock("over")) { flowchart.ExecuteBlock("over"); } } }
public void Say() { if (flowchart == null) { return; } if (EventCenter.Boardcast <int>(GameEventType.GetGameProgress) >= 11 && !hasComplete) { hasComplete = true; CompleteAllQuestion(); } if (hasComplete) { return; } //Debug.Log("当前游戏进度:" + EventCenter.Boardcast<int>(GameEventType.GetGameProgress)); string name = blockName + EventCenter.Boardcast <int>(GameEventType.GetCurrentQueIndex); //string name = blockName + "0"; if (flowchart.HasBlock(name)) { flowchart.ExecuteBlock(name); } }
// Use this for initialization void Start() { Flowchart flowchart = GameObject.Find("Flowchart").GetComponent <Flowchart>(); Debug.Log("tmp:" + flowchart.HasBlock("onWin")); }