// Update is called once per frame void Update() { #if false if (Input.GetKey(KeyCode.F1)) { this.cameraLength += 0.001f; } if (Input.GetKey(KeyCode.F2)) { this.cameraLength -= 0.001f; } #endif // 状態遷移 for (int i = 0; i < 2; i++) { if (this.keeperScript[i].GetComponent <CGoalKeeper>().GetGKState() == CGoalKeeper.GK_State.CAT) { this.state = DeliveryCameraState.VIEW_GOAL; this.lookGoalNo = i; } } // 遷移後の処理 switch (this.state) { case DeliveryCameraState.START: break; case DeliveryCameraState.FOLLOW_BALL: FollowBall(); break; case DeliveryCameraState.VIEW_GOAL: ViewGole(); break; case DeliveryCameraState.REPLAY: break; } }
void ViewGoleLate() { //int i = this.lookGoalNo + 1; /* * this.transform.position = Ball.transform.position; * this.transform.rotation = Ball.rigidbody.rotation; * * this.transform.localPosition = new Vector3( this.transform.localPosition.x, * this.transform.localPosition.y, * this.transform.localPosition.z - 2.0f); */ this.transform.LookAt(this.keeperScript[this.lookGoalNo].GetComponent <CGoalKeeper>().GetHomePosition()); if (this.keeperScript[this.lookGoalNo].GetComponent <CGoalKeeper>().GetGKState() != CGoalKeeper.GK_State.CAT) { this.countFlame++; if (this.countFlame > 60) { this.countFlame = 0; this.state = DeliveryCameraState.FOLLOW_BALL; } } }