JoelLapointe86 77de950b72 Pick ups 50% fonctionnel
on peut prendre une  bombe et la lancer mais elle ne tue pas l'ennemi
la caisse de vie peut être prise mais ne soigne pas
2015-11-25 00:55:53 -05:00

28 lines
397 B
C#

using UnityEngine;
using System.Collections;
public class BombPickup : MonoBehaviour
{
void Awake()
{
}
void OnTriggerEnter2D (Collider2D other)
{
// If the player enters the trigger zone...
if(other.tag == "Player")
{
// Increase the number of bombs the player has.
other.GetComponent<LayBombs>().bombCount++;
// Destroy the crate.
Destroy(gameObject);
}
}
}