Created
April 13, 2018 14:07
Star
You must be signed in to star a gist
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