Last active
October 11, 2018 00:43
-
-
Save aidiary/c27e78ec800746c56d5e to your computer and use it in GitHub Desktop.
ボールが地面から落下したときに削除
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
#pragma strict | |
// BallLife.js | |
// Ballが落下した場合にオブジェクトを削除 | |
var maxFallDistance : int = -10; | |
function Update () { | |
if (transform.position.y <= maxFallDistance) { | |
// 自分自身を削除 | |
Destroy(gameObject); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment