Created
April 24, 2018 09:53
-
-
Save todorok1/c15b82c1c1ba6e591770b026f87a9467 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
public void OnPressedAngleUpButton(){ | |
// 飛行中は角度変更ボタンを動作させないようにする | |
if (!isFlying){ | |
// 角度上昇ボタンが押された時の処理 | |
angleDelta = AngleIncreasing; | |
} | |
} | |
public void OnPressedAngleDownButton(){ | |
// 飛行中は角度変更ボタンを動作させないようにする | |
if (!isFlying){ | |
// 角度下降ボタンが押された時の処理 | |
angleDelta = AngleDecreasing; | |
} | |
} | |
public void OnReleasedAngleButton(){ | |
// 飛行中は角度変更ボタンを動作させないようにする | |
if (!isFlying){ | |
// 角度の増分を0にする | |
angleDelta = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment