Last active
August 29, 2015 14:11
-
-
Save DaveVoyles/ab3eb6e4ec9d0842142a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/// <summary> | |
/// Check for pickup type and set powerup effect on the player | |
/// Play a particle effect when touching a player, and despawn afterwards | |
/// </summary> | |
/// <param name="other">What are we colliding with? Should only check for player</param> | |
private void OnTriggerEnter(Collider other) | |
{ | |
if (!other.gameObject.CompareTag("Player")) return; | |
SpawnTextWhenTouched(); | |
_player.weapons.PickupWeapon(1); // Picks Up Shotgun | |
Instantiate(_particles, transform.position, Quaternion.identity); | |
SoundManager.PlaySFX(_pickedUpClip); | |
PoolManager.Pools["BulletPool"].Despawn(transform); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment