コード例 #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>();
 }
コード例 #2
0
    public void Kill()
    {
        gameController.Score = scoreValue;
        PickupDropper pd = gameObject.GetComponent <PickupDropper> ();

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