Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created April 24, 2018 09: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/3e10000cffce145cca24d9ce82a9fe46 to your computer and use it in GitHub Desktop.
Save todorok1/3e10000cffce145cca24d9ce82a9fe46 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>();
arrowRt = angleArrowObject.GetComponent<RectTransform>();
angleUpButton = angleArrowUpButtonObject.GetComponent<Button>();
angleDownButton = angleArrowDownButtonObject.GetComponent<Button>();
guideManager = guideManagerObject.GetComponent<GuideManager>();
// DistanceTextとHighScoreTextの初期値をセット
SetDistanceText(0f);
SetHighScoreText(0f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment