using System.Collections; using System.Collections.Generic; using UnityEngine; using Fungus; /// /// 安拉之拉 /// public class AnLaNoLa : Stage { public YiSiLan left; public YiSiLan right; public Transform target; private bool conversationEnd = false; private bool conversationEnd1 = false; protected override void Init(){ base.Init(); } protected override IEnumerator Main(){ yield return new WaitForEndOfFrame(); //停止玩家移动 player.inputDir = 0; yield return new WaitForSeconds(1f); //触发对话 Flowchart.BroadcastFungusMessage("安拉之拉"); yield return new WaitUntil( () => { return conversationEnd; } ); yield return new WaitForSeconds(1f); //让伊斯兰走到屏幕外 left.target = target; left.animator.SetBool("isMove",true); left.state = Enemy.State.seek; right.target = target; right.animator.SetBool("isMove",true); right.transform.localScale = new Vector3(1,1,1); right.state = Enemy.State.seek; yield return new WaitForSeconds(2f); Destroy(left.gameObject); Destroy(right.gameObject); //触发玩家自语 Flowchart.BroadcastFungusMessage("玩家自语"); yield return new WaitUntil( () => { return conversationEnd1; } ); yield return new WaitForSeconds(1f); StartCoroutine(base.Main()); } public void ConversationEnd(){conversationEnd = true;} public void ConversationEnd1(){conversationEnd1 = true;} }