Exemple #1
0
        public override void LoadContent()
        {
            SpriteSheet = GameManager.LoadTexture2D("SpriteSheetTD");
            LoadSprites(GameManager.Content.RootDirectory + "/spritesheetTD.xml");

            TopDownMap tutorialMap = new TopDownMap("Tutorial");

            tutorialMap.LoadMapFromImage(GameManager.LoadTexture2D("PortalChamberTutorialTiles"));
            tutorialMap.LoadSpritesFromImage(GameManager.LoadTexture2D("PortalChamberTutorialSprites"));

            textboxBackground = GameManager.LoadTexture2D("TEXTBOX3");
            textboxButton     = GameManager.LoadTexture2D("BUTTON");

            player = new TopDownPlayer(new Vector2(1, 5));
            player.OnStepOnToxicGoo += Player_OnDeathThroughToxicGoo;
            player.OnTraversingEmancipationGrill += Player_OnTraversingEmancipationGrill;

            AssignTriggers();
            SetCubeRespawnability();
            SetWelcomeText();

            victoryTrigger.OnActivation += OnVictory;
            buttonID2.OnActivation      += ButtonID2_OnActivation;
            buttonID3.OnActivation      += ButtonID3_OnActivation;

            GameManager.SetPreferredBackBufferSize(tutorialMap.Width * tutorialMap.TileWidth, tutorialMap.Height * tutorialMap.TileHeight);
        }
        public override void LoadContent()
        {
            map = (TopDownMap)SceneManager.CurrentScene.FindGameObjectByTag("TDMap");
            Entity tempPlayer = (Entity)SceneManager.CurrentScene.FindGameObjectByTag("Player");

            if (tempPlayer is TopDownPlayer)
            {
                player = (TopDownPlayer)tempPlayer;
            }
        }
        public override void LoadContent()
        {
            SpriteSheet = GameManager.LoadTexture2D("SpriteSheetOne");
            LoadSprites(GameManager.Content.RootDirectory + "/spritesheetOne.xml");

            TopDownMap tutorialMap = new TopDownMap("Tutorial");

            tutorialMap.LoadMapFromImage(GameManager.LoadTexture2D("PortalChamberTutorialTiles"));
            tutorialMap.LoadSpritesFromImage(GameManager.LoadTexture2D("PortalChamberTutorialSprites"));

            TopDownPlayer player = new TopDownPlayer(new Vector2(1, 6));

            victoryTrigger            = (TopDownVictoryTrigger)addedGameObjects.Find(g => g.Name.Contains("VictoryTrigger"));
            victoryTrigger.OnVictory += OnVictory;

            GameManager.SetPreferredBackBufferSize(tutorialMap.Width * tutorialMap.TileWidth, tutorialMap.Height * tutorialMap.TileHeight);
        }
        public override void LoadContent()
        {
            SpriteSheet = GameManager.LoadTexture2D("SpriteSheetOne");
            LoadSprites(GameManager.Content.RootDirectory + "/spritesheetOne.xml");

            TopDownMap chamberOne = new TopDownMap("ChamberOne");

            chamberOne.LoadMapFromImage(GameManager.LoadTexture2D("PortalChamberOneTilesDEBUG"));
            chamberOne.LoadSpritesFromImage(GameManager.LoadTexture2D("PortalChamberOneSprites"));

            TopDownPlayer player = new TopDownPlayer(new Vector2(1, 3));

            victoryTrigger            = (TopDownVictoryTrigger)addedGameObjects.Find(g => g.Name.Contains("VictoryTrigger"));
            victoryTrigger.OnVictory += OnVictory;

            GameManager.SetPreferredBackBufferSize(chamberOne.Width * chamberOne.TileWidth, chamberOne.Height * chamberOne.TileHeight);
        }
        public override void LoadContent()
        {
            SpriteSheet = GameManager.LoadTexture2D("SpriteSheetTD");
            LoadSprites(GameManager.Content.RootDirectory + "/spritesheetTD.xml");

            TopDownMap chamberOne = new TopDownMap("ChamberOne");

            chamberOne.LoadMapFromImage(GameManager.LoadTexture2D("PortalChamberOneTiles"));
            chamberOne.LoadSpritesFromImage(GameManager.LoadTexture2D("PortalChamberOneSprites"));

            TopDownPlayer player = new TopDownPlayer(new Vector2(1, 3));

            victoryTrigger = (VictoryTrigger)FindGameObject("VictoryTrigger");
            victoryTrigger.OnActivation += OnVictory;

            AssignTriggers();

            cubeTheOneAndOnly           = ((TopDownWeightedCompanionCube)FindGameObject("Cube"));
            respawnButton.OnActivation += respawnButton_OnActivation;

            GameManager.SetPreferredBackBufferSize(chamberOne.Width * chamberOne.TileWidth, chamberOne.Height * chamberOne.TileHeight);
        }