Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created May 1, 2018 12:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Unityチュートリアル・ゴルフゲームの進行を制御するスクリプト
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