void OnTriggerEnter ( Collider _other ) {
// TODO: play dead particle ??? {
// // play particles
// if ( parBulletHit_inst != null ) {
// parBulletHit_inst.transform.position = transform.position;
// parBulletHit_inst.transform.rotation = transform.rotation;
// parBulletHit_inst.particleEmitter.Emit();
// }
// else {
// Debug.Log( "warning: the particle instance not instantiate!" );
// }
// } TODO end
if ( _other.gameObject.layer == Layer.building ) {
fxHitBuilding.transform.position = transform.position;
fxHitBuilding.transform.rotation = transform.rotation;
fxHitBuilding.particleEmitter.Emit();
}
// TODO: bullet type, hit what? should get through or not. {
// destroy bullet
SpawnManager.Instance().Destroy(gameObject);
// GameObject.Destroy(gameObject);
// } TODO end
}
}