public virtual void Shoot() { if (BulletShot < Capacity) { BulletShot++; BaseBullet bullet = this.GetFirstBullet(); if (bullet != null) { ICollidable shooter = r_Shooter as ICollidable; if (bullet.GroupRepresentative != shooter.GroupRepresentative) { bullet.GroupRepresentative = shooter.GroupRepresentative; } this.RemoveBullet(); bullet.Enabled = true; bullet.Visible = true; } if (SoundActionOccurred != null) { SoundActionOccurred.Invoke(ShootSoundName); } } }
private void playLostLifeSound(int i_OldLives, int i_NewLives) { if (i_OldLives > i_NewLives && LifeLostSoundName != string.Empty && SoundActionOccurred != null) { SoundActionOccurred.Invoke(LifeLostSoundName); } }
public override void Collided(ICollidable i_Collidable) { if (SoundActionOccurred != null) { SoundActionOccurred.Invoke(k_CollideSound); } }
public void Focus() { IsFocused = true; if (IsInitialized) { SoundActionOccurred.Invoke(k_MenuItemFocusSound); this.StrokeSpriteFont.TintColor = Color.DeepSkyBlue; this.StrokeSpriteFont.Animations.Restart(); } }
private void checkIfAlive(int i_Lives) { if (m_Lives == 0) { if (SoundActionOccurred != null) { SoundActionOccurred.Invoke(KilledSoundName); } IsAlive = false; } else if (m_Lives > 0) { IsAlive = true; } }