Last active
April 21, 2018 05:52
-
-
Save todorok1/650f6ba6e531a625fd80db6ddb24bdbb 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 Vector3 GetBoostForce(){ | |
// 力の大きさと方向をかけたベクトルを返す | |
CalcForceDirection(); | |
// 外部のスクリプトから呼ばれた時に、スライダーの参照がなければセットする | |
if (powerMeterSlider == null){ | |
powerMeterSlider = powerMeterObject.GetComponent<Slider>(); | |
} | |
return powerMeterSlider.maxValue * forceDirection; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment