Ejemplo n.º 1
0
        private void OnTriggerEnter2D(Collider2D other)
        {
            HitSensor hitSensor = other.GetComponent <Entity.Senses.HitSensor>();

            if (hitSensor != null && !(hitSensor.transform.parent.GetComponentInChildren <EnnemyController>().GetStrategyType() is ZombieStrategy))
            {
                hitSensor.Hit(hitPoints, ShooterName);
            }
        }
Ejemplo n.º 2
0
        private void OnTriggerEnter2D(Collider2D other)
        {
            HitSensor hitSensor = other.GetComponent <Entity.Senses.HitSensor>();

            if (hitSensor != null)
            {
                hitSensor.Hit(hitPoints, ShooterName);
                Destroy(this.transform.parent.gameObject);
            }
        }