lib-unity-tutorial-gameplay-Assets-Scripts-2D-DeathTrigger.js / js
// Whoever enters the DeathTrigger gets an OnDeath message sent to them. // They don't have to react to it. function OnTriggerEnter (other : Collider) { other.gameObject.SendMessage ("OnDeath", SendMessageOptions.DontRequireReceiver); } // Helper function: Draw an icon in the sceneview so this object gets easier to pick function OnDrawGizmos () { Gizmos.DrawIcon (transform.position, "Skull And Crossbones Icon.tif"); }
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.