示例#1
0
 void Awake() {
     BoxRef = this.gameObject.GetComponent<BoxCollider>();
     ScriptRef = ParentRef.gameObject.GetComponent<CartoonExplosionFX>();
     RigidRef = this.gameObject.GetComponent<Rigidbody>();
     ShatterRef = this.gameObject.GetComponent<ShatterOnCollision>();
   
 }
 void Awake()
 {
     BoxRef    = this.gameObject.AddComponent <BoxCollider>();
     ScriptRef = this.gameObject.GetComponent <CartoonExplosionFX>();
     ParentRef = this.gameObject.GetComponent <GameObject>();
 }