Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created April 21, 2018 05:53
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/563619c3fbdcf27ba9d1f6fcd7449279 to your computer and use it in GitHub Desktop.
Save todorok1/563619c3fbdcf27ba9d1f6fcd7449279 to your computer and use it in GitHub Desktop.
Unityチュートリアル・打ち出す力のメーターを上下させるスクリプト。
void WaitAtBoundaryValue(){
// 前のフレームが呼ばれて、処理が完了するまでにかかった時間を加算
waitTime += Time.deltaTime;
// waitTimeがdelayTimeを超えたら増加フラグの反転
if (waitTime >= delayTime){
isMeterIncreasing = !isMeterIncreasing;
waitTime = 0f;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment