protected override void handleSamusProjectileHit(ProjectileController projectile) { projectile.handleSceneryHit(); if (projectile.Freezes) { this.m_frozenCounter = s_frozenDuration; this.m_collider.m_type = ColliderType.FrozenEnemy; this.m_invincibilityCounter = s_invincibilityDuration; } }
protected virtual void handleSamusProjectileHit(ProjectileController projectile) { projectile.handleSceneryHit(); if (projectile.Freezes && this.Health <= this.MaxHealth / 2 && !this.IsFrozen) { this.m_frozenCounter = s_frozenDuration; this.m_collider.m_type = ColliderType.FrozenEnemy; this.m_invincibilityCounter = s_invincibilityDuration; } else { this.takeDamage(projectile.Damage); if (this.Health <= 0) { Vector2 explosion = new Vector2( m_position.X, m_position.Y - (float)m_collider.Bounds.Height / 2); GameplayManager.ActiveZone.add(new BulletExplosion(explosion, 8.0f)); } } }