Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created April 13, 2018 10:06
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/10a600705e20895af18e882c4523bbb7 to your computer and use it in GitHub Desktop.
Save todorok1/10a600705e20895af18e882c4523bbb7 to your computer and use it in GitHub Desktop.
Unityチュートリアル・ボールの飛距離をゲーム画面に表示するスクリプト。
void Start(){
initPosition = gameObject.transform.position;
rb = gameObject.GetComponent<Rigidbody>();
distanceText = distanceTextObject.GetComponent<Text>();
// DistanceTextの初期値をセット
SetDistanceText(0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment