Exemplo n.º 1
0
 public void PlaySoldierDeathSound()
 {
     if (EngineConfig.SoundEnabled)
     {
         dieSound.Play();
         //SoundManager3D.Instance.UpdateSoundObjects();
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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));
            }
        }