Exemplo n.º 1
0
        void UpdateLogLevel(object sender, EventArgs e)
        {
            string level = ((Button)sender).Text;

            LevelSelected?.Invoke(LogLevels[level]);
            ((NavigationPage)Application.Current.MainPage).PopAsync();
        }
Exemplo n.º 2
0
        void UpdateLogLevel(object sender, System.EventArgs e)
        {
            string level = ((TextCell)sender).Text;

            LevelSelected.Invoke(LogLevels[level]);
            ((NavigationPage)App.Current.MainPage).PopAsync();
        }
 private void EverythingButton_Click(object sender, EventArgs e)
 {
     if (LevelSelected != null)
     {
         LevelSelected.Invoke(this, XivDependencyLevel.Root);
     }
 }
 private void ModelButton_Click(object sender, EventArgs e)
 {
     if (LevelSelected != null)
     {
         LevelSelected.Invoke(this, XivDependencyLevel.Model);
     }
 }
 private void BackButton_Click(object sender, RoutedEventArgs e)
 {
     if (LevelSelected != null)
     {
         LevelSelected.Invoke(this, XivDependencyLevel.Invalid);
     }
 }
Exemplo n.º 6
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var cell = tableView.CellAt(indexPath);

            LevelSelected?.Invoke(mLogLevels[cell.TextLabel.Text]);
            tableView.DeselectRow(indexPath, true);
            NavigationController.PopViewController(true);
        }
Exemplo n.º 7
0
 internal static void SetSelectedLevel(IPreviewBeatmapLevel?level)
 {
     LevelSelected?.InvokeSafe(new LevelSelectedArgs(level), nameof(LevelSelected));
 }
Exemplo n.º 8
0
 private void Play_Click(object sender, EventArgs e)
 {
     LevelSelected?.Invoke(this, levelBox.SelectedLevel, activeMod);
 }
Exemplo n.º 9
0
        //GraphicsDeviceManager graphics;
        //SpriteBatch spriteBatch;
        public Level(GraphicsDeviceManager graphics, SpriteBatch spriteBatch, ContentManager content, LevelSelected levelSelected, List<Sprite> randomObjects)
        {
            this.Content = content;

            rand = new Random();
            this.randomObjects = new List<Sprite>();
            enemies = new List<Enemy>();
            enemySprites = new List<Sprite>();
            groups = new List<EnemyGroup>();
            healthBars = new List<HealthBar>();

            this.levelSelected = levelSelected;
            background = new Background(levelSelected, graphics.GraphicsDevice, spriteBatch, content);

            bossSound = content.Load<SoundEffect>("Sounds/Wow");

            if (levelSelected == LevelSelected.Level1)
            {
                BGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level1);
                BossBGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level1Boss);
                border = new Border(levelSelected, graphics.GraphicsDevice, spriteBatch, content);
                //clouds = null;
            }
            else if (levelSelected == LevelSelected.Level2)
            {
                BGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level2);
                BossBGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level2Boss);
                border = null;
                clouds = new List<Clouds> { new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand),
                                            new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand),
                                            new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand),
                                            new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand),
                                            new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand),
                                            new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand),
                                            new Clouds(levelSelected, graphics.GraphicsDevice, spriteBatch, content, rand) };
            }
            else if (levelSelected == LevelSelected.Level3)
            {
                BGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level3);
                BossBGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level3Boss);
                border = null;
                //clouds = null;
            }
            else if (levelSelected == LevelSelected.Level4)
            {
                BGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level4);
                BossBGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level4Boss);
                border = null;
            }
            else if (levelSelected == LevelSelected.Level5)
            {
                BGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level4);
                BossBGMusic = new BackgroundMusic(content, BackgroundMusic.playAt.Level5Boss);
                border = null;
            }

            foreach (Sprite rObj in randomObjects)
            {
                rObj.Position = new Vector2(rand.Next(50, graphics.PreferredBackBufferWidth - 50),rand.Next(-1000, -100));
            }

            this.randomObjects = randomObjects;
        }