Exemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if ((collision.gameObject != shooter))
     {
         FFS_BulletController cousin = collision.gameObject.GetComponent <FFS_BulletController>();
         if (cousin == null)
         {
             FFS_CharacterStats livingObject = collision.gameObject.GetComponent <FFS_CharacterStats>();
             if (livingObject != null)
             {
                 livingObject.TakeDamage(damage);
             }
             Destroy(this.gameObject);
         }
     }
 }
Exemplo n.º 2
0
    private void Awake()
    {
        enemyStats = GetComponent <FFS_CharacterStats>();

        transformComponent = transform;
    }