Example #1
0
 // Use this for initialization
 void Start()
 {
     entities = new List <BaseEntity>();
     sensor.SetCollisionEnterCallback(TriggerEnter2D);
     sensor.SetCollisionExitCallback(TriggerExit2D);
     MobCounter.Instance.PlusOneToAlive();
     animator     = GetComponent <Animator>();
     this.dropper = GetComponent <PickupDropper>();
 }
    public void Kill()
    {
        gameController.Score = scoreValue;
        PickupDropper pd = gameObject.GetComponent <PickupDropper> ();

        if (pd != null)
        {
            pd.SpawnPickup();
        }
        DestroyWithExplosion();
    }