예제 #1
0
 public UpdateAnimation(Bomberman toUpdate)
 {
     this.bomberman = toUpdate;
 }
예제 #2
0
 public InvulnerabilityManager(Bomberman toBoostUp)
 {
     timer  = new Timer(10f);
     player = toBoostUp;
 }
예제 #3
0
            private void LoadGameObjects()
            {
                //OSD
                if (gui == null)
                {
                    gui = new OnScreenDisplay();
                    GameObject.Spawn(gui);
                }
                else
                {
                    gui.Active = true;
                    foreach (Component item in gui.Components)
                    {
                        item.Enabled = false;
                    }
                }

                //Player
                if (bomberMan == null)
                {
                    bomberMan = new Bomberman();
                    GameObject.Spawn(bomberMan, Map.GetPlayerSpawnPoint());
                }
                else
                {
                    bomberMan.Active = true;
                    foreach (Component item in bomberMan.Components)
                    {
                        item.Enabled = true;
                    }
                }

                //TargetPoints
                if (targetSpawner == null)
                {
                    targetSpawner = new TargetSpawner(5, 3.5f);
                    GameObject.Spawn(targetSpawner);
                }
                else
                {
                    targetSpawner.Active = true;
                    foreach (Component item in targetSpawner.Components)
                    {
                        item.Enabled = false;
                    }
                }

                //AI
                if (enemySpawner == null)
                {
                    enemySpawner = new EnemySpawner(bomberMan);
                    GameObject.Spawn(enemySpawner);
                }
                else
                {
                    enemySpawner.Active = true;
                    foreach (Component item in enemySpawner.Components)
                    {
                        item.Enabled = false;
                    }
                }
            }