void Start() { ////目的地のオブジェクトを取得 //Enemy_Nav.SetDestination(Destination.transform.position); //プレイヤーのNavMeshAgentを取得 Enemy_Nav = GetComponent <NavMeshAgent>(); //Destination = GameObject.Find("Goal"); Anim = GetComponent <Animator>(); //Script格納 StaEne = gameObject.GetComponent <Staging_Enemy>(); isEvent = false; Enemy_Nav.SetDestination(gameObject.transform.position); }
void Start() { //最初のポジション取得 IntPo = transform.position; //最初の方向取得 IntRo = gameObject.transform.localEulerAngles; //カメラのZoomスクリプトを取得 zoom = CameraOb.GetComponent <Zoom>(); //プレイヤーのNavMeshAgentを取得 Enemy_Nav = GetComponent <NavMeshAgent>(); //目的地のオブジェクトを取得 //Destination = GameObject.Find("Goal"); Anim = GetComponent <Animator>(); //Script格納 StaEne = gameObject.GetComponent <Staging_Enemy>(); //目的地を設定 Enemy_Nav.SetDestination(IntPo); TimedesTime = Timedes; isEvent = false; }