Created
March 24, 2014 06:59
-
-
Save toshikaz55/9735426 to your computer and use it in GitHub Desktop.
Unityで弾を発射するスクリプトの弾に付けるスクリプト javascript版
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 | |
function Start () { | |
} | |
function Update () { | |
} | |
function OnCollisionEnter( collisionInfo : Collision ) { | |
if( collisionInfo.gameObject.tag == "enemy" ) { | |
collisionInfo.gameObject.SendMessage( "ApplyDamage" ); | |
} | |
Destroy( gameObject ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment