// Update is called once per frame void Update() { fireTimer = Mathf.Max(0.0f, fireTimer - Time.deltaTime); // プレイヤーの情報が何も入ってない場合 if (Player == null) { GameplayChannel.GetInstance().SendRequestPlayerEvent(); return; } //更新処理 Update. _flowAI.Update(Time.deltaTime); time += Time.deltaTime; bool canSeePlayer = UpdatePlayerLastKnownPosition(); _visionCone.CreateVisionConeMesh(); // 敵を見ているかの判定 //if (_visionCone.IsTargetInVisionCone(gameObject, Player)) if (CanSeePlayer()) { _isFound = true; //Debug.Log("Can see target! 主人公を見ています!"); } else { _isFound = false; //Debug.Log("Cannot see target! 主人公を見ていません!"); } //Any process... if (_isRot) { //head.transform.Rotate(new Vector3(0,0, 60f * Time.deltaTime)); this.transform.Rotate(new Vector3(0, 60f * Time.deltaTime)); head.transform.Rotate(new Vector3(0, (((-1) * 60f) * Time.deltaTime))); } if (_isBullet) { Shoot(); } canSeePlayerPrevious = canSeePlayer; TFDebug.ClearMonitor("enemy"); TFDebug.Write("enemy", "isRot:{0}\n", _isRot.ToString()); TFDebug.Write("enemy", "isFound:{0}\n", _isFound.ToString()); }