public void PlaySoldierDeathSound() { if (EngineConfig.SoundEnabled) { dieSound.Play(); //SoundManager3D.Instance.UpdateSoundObjects(); } }
public FSLSoundEntity CreateSoundEntity(String filename, SceneNode entity, bool loop, bool play) { FSLSoundEntity sound = (FSLSoundEntity)CreateSoundEntity(filename, entity, filename + "_entity" + entity.Name + "_" + entity.GetHashCode() + "_Sound", loop, false); if (play) { sound.Play(); } return(sound); }
public void OnShipBeginSinking(LevelTile shipTile) { if (EngineConfig.SoundEnabled) { dieSound.Play(); } foreach (TileView tv in TileViews) { if (tv is ShipBunkerTileView) { tv.MinimapItem.Hide(); } } if (!EngineConfig.LowDetails) { WaterSplashes(3, shipTile); Vector2 v = UnitConverter.LogicToWorldUnits(new PointD(Mathematics.IndexToPosition(shipTile.TileIndex), 1.5f)); BubblesWaterAnimation(sceneMgr, new Vector3(v.x, v.y, 0), shipTile.GetHashCode().ToString(), 8, new Vector2(6, 6), new Vector2(6, 6)); BubblesWaterAnimation(sceneMgr, new Vector3(v.x, v.y, 0), shipTile.GetHashCode() + "2", 8, new Vector2(10, 10), new Vector2(20, 20)); } }