示例#1
0
        public static void Init(params AvailableTextures[] sprite_sheet_textures)
        {
            SpriteSheet = new SpriteSheet();
            var sprite_sheet_loader = new SpriteSheetLoader();

            foreach (var available_texture in sprite_sheet_textures)
            {
                SpriteSheet.Add(sprite_sheet_loader.Load(ContentHolder.Get(available_texture), "NeonPartyGamesController." + Engine.Game.Content.RootDirectory + ".textures." + available_texture + ".json"));
            }
        }
示例#2
0
        public static void Play(byte category, byte identifier, byte value)
        {
            SoundEffect sound  = null;
            float?      volume = null;

            if (category == 0 && identifier == 0)
            {
                volume = (value - 20) / 100f;
                if (volume < 0)
                {
                    volume = 0;
                }
                else if (volume > 1)
                {
                    volume = 1;
                }
            }

            if (SoundPlayer.SoundsList.Length >= category)
            {
                if (SoundPlayer.SoundsList[category].Length >= identifier)
                {
                    sound = ContentHolder.Get(SoundPlayer.SoundsList[category][identifier]);
                }
            }

            if (sound != null)
            {
                if (volume != null)
                {
                    sound.TryPlay((float)volume, 0, 0);
                }
                else
                {
                    sound.TryPlay();
                }
            }
        }
示例#3
0
 public NeonPartyGamesControllerDebugger() : base(ContentHolder.Get(AvailableFonts.blippo))
 {
 }