Example #1
0
        public void OnOverlap(EnemyBasicController be)
        {
            HealthSystem health = be.GetComponent <HealthSystem>();

            if (health)
            {
                health.TakeDamage(damageAmount);
            }

            //Vector3 vToPlayer = (be.transform.position - this.transform.position).normalized;

            //be.LaunchPlayer(vToPlayer * 15);

            SoundEffectBoard.PlayHit();
        }
        public void OnTriggerEnter(Collider other)
        {
            HealthSystem         health = other.GetComponent <HealthSystem>();
            EnemyBasicController be     = other.GetComponent <EnemyBasicController>();
            BossController       boss   = other.GetComponent <BossController>();

            if (health && be || health && boss)
            {
                health.TakeDamage(damageAmount);
                Destroy(gameObject);
            }


            //Vector3 vToPlayer = (be.transform.position - this.transform.position).normalized;

            //be.LaunchPlayer(vToPlayer * 15);


            SoundEffectBoard.PlayHit();
        }
Example #3
0
 virtual public void OnStart(EnemyBasicController enemy)
 {
     this.enemy = enemy;
 }