Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 13, 2018 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todorok1/ea9402252762526fbcb2d4fa011620e0 to your computer and use it in GitHub Desktop.
Save todorok1/ea9402252762526fbcb2d4fa011620e0 to your computer and use it in GitHub Desktop.
Unityチュートリアル・ボールの飛距離とハイスコアをゲーム画面に表示するスクリプト。
void Start(){
initPosition = gameObject.transform.position;
rb = gameObject.GetComponent<Rigidbody>();
distanceText = distanceTextObject.GetComponent<Text>();
highScoreText = highScoreTextObject.GetComponent<Text>();
// DistanceTextとHighScoreTextの初期値をセット
SetDistanceText(0f);
SetHighScoreText(0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment