Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active April 21, 2018 05:38
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/8852f3adcf542431343a042707223cd2 to your computer and use it in GitHub Desktop.
Save todorok1/8852f3adcf542431343a042707223cd2 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>();
powerMeterSlider = powerMeterObject.GetComponent<Slider>();
// DistanceTextとHighScoreTextの初期値をセット
SetDistanceText(0f);
SetHighScoreText(0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment