Created
April 13, 2018 14:07
-
-
Save todorok1/bd7be6b4d05a9686a48ebcc1c7b2e866 to your computer and use it in GitHub Desktop.
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
// DistanceTextオブジェクトへの参照 | |
[SerializeField] | |
GameObject distanceTextObject; | |
// HighScoreTextオブジェクトへの参照 | |
[SerializeField] | |
GameObject highScoreTextObject; | |
// 以下、string distanceSuffix = " m"; まで省略 | |
// HighScoreTextオブジェクトのTextコンポーネントへの参照をキャッシュ | |
Text highScoreText; | |
// ハイスコア表示のプレフィックス | |
string highScorePrefix = "High Score : "; | |
// ハイスコア表示のサフィックス | |
string highScoreSuffix = " m"; | |
// ハイスコアの距離 | |
float highScoreDistance = 0f; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment