//カメラアングルを取得 private Vector3 getAngle(Const.EnumCameraDir dir) { switch (dir) { default: return(new Vector3(27.0f, 0f, 0f)); case Const.EnumCameraDir.Right: return(new Vector3(27.0f, 270f, 0f)); case Const.EnumCameraDir.Left: return(new Vector3(27.0f, 90f, 0f)); case Const.EnumCameraDir.Opposition: return(new Vector3(27.0f, 180f, 0f)); } }
//カメラが動く方向を取得 private Vector3 getCoordToMove(Const.EnumCameraDir dir) { switch (dir) { default: return(this.player.transform.position + new Vector3(0.0f, 5.0f, -8.0f)); case Const.EnumCameraDir.Right: return(this.player.transform.position + new Vector3(8.0f, 5.0f, 0f)); case Const.EnumCameraDir.Left: return(this.player.transform.position + new Vector3(-8.0f, 5.0f, 0f)); case Const.EnumCameraDir.Opposition: return(this.player.transform.position + new Vector3(0f, 5.0f, 8.0f)); } }
//スクリプト操作によるカメラワーク public void scriptWorking(Const.EnumCameraDir selectDir) { CameraManager.Instance.nowDir = selectDir; this.tweenActionMove(this.getCoordToMove(selectDir), Ease.InFlash); this.tweenActionRotate(this.getAngle(selectDir), Ease.InFlash); }