Example #1
0
        protected override void Initialize()
        {
            //initialise all texture objects.

            Pixel         = new Texture2D(this.GraphicsDevice, 1, 1);
            PlayerTexture = new Texture2D(this.GraphicsDevice, 32, 32);
            EntityTexture = new Texture2D(this.GraphicsDevice, 32, 32);
            Grass         = new Texture2D(this.GraphicsDevice, Tile.TileSideLengthInPixels, Tile.TileSideLengthInPixels);
            HighMtn       = new Texture2D(this.GraphicsDevice, Tile.TileSideLengthInPixels, Tile.TileSideLengthInPixels);
            LowMtn        = new Texture2D(this.GraphicsDevice, Tile.TileSideLengthInPixels, Tile.TileSideLengthInPixels);
            Sand          = new Texture2D(this.GraphicsDevice, Tile.TileSideLengthInPixels, Tile.TileSideLengthInPixels);
            Water         = new Texture2D(this.GraphicsDevice, Tile.TileSideLengthInPixels, Tile.TileSideLengthInPixels);
            Torch         = new Texture2D(this.GraphicsDevice, Tile.TileSideLengthInPixels, Tile.TileSideLengthInPixels);

            Pixel.SetData <Color>(new Color[] { Color.White });

            //generate all textures using pre written functions. The fucntions take in a seed to generate them.

            GenTextures.setEntityTexture(1, ref EntityTexture);
            GenTextures.setGrassTexture(18390123, ref Grass);
            GenTextures.setStoneTexture(18390123, ref HighMtn);
            GenTextures.setStoneTexture(2134, ref LowMtn);
            GenTextures.setSandTexture(18390123, ref Sand);
            GenTextures.setWaterTexture(12341174, ref Water);
            GenTextures.setTorchTexture(45642323, ref Torch);

            //Initialize input manager for input
            inputManager = new Input();

            //initialize screen manager object and add an instance of the main menu
            screenManager = new MScreenManager(inputManager);
            screenManager.addScreen(new ScreenMainMenu(screenManager, inputManager));

            base.Initialize();
        }
Example #2
0
 public ScreenGame(MScreenManager manager, Input input, UInt16 IslandX = 0, UInt16 IslandY = 0)
     : base(manager, input)
 {
     Island = new Level(input);
     state  = ScreenState.TransitionOn;
     X      = IslandX;
     Y      = IslandY;
     Island.generate(X, Y);
 }
 public ScreenPauseGame(MScreenManager manager, Input input, Screen ParentScreen)
     : base(manager, input)
 {
     parent = ParentScreen;
 }
Example #4
0
 public ScreenSeedDialogue(MScreenManager manager, Input input)
     : base(manager, input)
 {
 }
Example #5
0
 public ScreenMainMenu(MScreenManager manager, Input input)
     : base(manager, input)
 {
 }
Example #6
0
 public ScreenLeaveIslandDialogue(MScreenManager manager, Input input, Screen ParentScreen)
     : base(manager, input)
 {
     Parent = ParentScreen;
 }
Example #7
0
 public Screen(MScreenManager manager, Input input, Screen parent)
 {
     this.manager = manager;
     this.parent  = parent;
     this.input   = input;
 }
Example #8
0
        protected Input input;                   //refence to the input object to get input.

        //contructors, one allowing for an optional parent parameter.

        public Screen(MScreenManager manager, Input input)
        {
            this.manager = manager;
            this.input   = input;
        }