Created
April 24, 2018 09:38
-
-
Save todorok1/3e10000cffce145cca24d9ce82a9fe46 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
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