Exemplo n.º 1
0
 public void addEnemyPlayer(PlayableCharacter enemy)
 {
 }
Exemplo n.º 2
0
        /**
         * Initializes all entities inside of the arena
         */
        public void Init()
        {
            player1 = new PlayableCharacter(game, this, Constants.player1SpawnLocation, 1);
            player1.inputState = game.playerOneInput;
            //TODO: Load Level;
            LevelEditor le = new LevelEditor(game);
            if (game.worldFinished)
            {

                //Preloads each Level so that the cache can do it's magic

                game.preloadLevelOnly = true;
               for (int i = 1; i < 10; i++)
                    le.readFile(i);
               game.preloadLevelOnly = false;

                game.entities.Clear();
                game.toBeAdded.Clear();
                game.cachedEntityLists = new Dictionary<Type, object>();
                game.worldFinished = false;
                game.loadNewLevel = true;

            }
            if(game.gMode==0)
                le.readFile(game.currentLevel);
            else
                le.readFile(game.gameTemplateLevel);
            game.addEntity(player1);
            this.IsVisible = true;

            background = game.getSprite("black");
        }