Unityチュートリアル・ゴルフゲームの進行を制御するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void BoostSphere(){ | |
// ボールが発射される時の位置を記録 | |
prePosition = transform.position; | |
// 向きと力の計算 | |
Vector3 force = forceMagnitude * forceDirection; | |
// 力を加えるメソッド | |
rb.AddForce(force, ForceMode.Impulse); | |
// 距離測定中フラグをTrueにセット | |
isCheckingDistance = true; | |
// 角度矢印を非表示にする | |
angleArrowObject.SetActive(false); | |
// ボタンを押せないようにする | |
SetAngleButtonState(false); | |
// ガイドを非表示にする | |
guideManager.SetGuidesState(false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment