Ejemplo n.º 1
0
 public MapConnection(PokeEngine engine, Map parent, ConnectionDirection direction, int id, int offset)
     : base(engine, id)
 {
     this.direction = direction;
     this.parent    = parent;
     this.offset    = offset;
 }
Ejemplo n.º 2
0
        public static void BeginNoAA(SpriteBatch batch, PokeEngine engine)
        {
            Matrix       m       = Matrix.CreateScale((int)PokeEngine.SCALE, (int)PokeEngine.SCALE, 0);
            SamplerState sampler = SamplerState.PointClamp;

            batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, sampler, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, m);
        }
Ejemplo n.º 3
0
        public static void Draw(PokeEngine engine, Texture2D t2d, double x, double y)
        {
            Vector2   v2   = new Vector2((float)x + xScroll, (float)y + yScroll);
            Rectangle rect = new Rectangle((int)x + xScroll, (int)y + yScroll, t2d.Width, t2d.Height);

            engine.sbatch.Draw(t2d, rect, Color.White);
        }
Ejemplo n.º 4
0
        public override void render(PokeEngine engine, int xs, int ys)
        {
            if (texArr[0] == -1 && texArr[1] == -1)
            {
                refreshTexture();
            }

            int rx = x * WIDTH + xs;
            int ry = y * WIDTH + ys;

            BatchUtil.Draw(engine, Art.tiles[0, 0], rx, ry);
            BatchUtil.Draw(engine, Art.blocks[texArr[0], texArr[1]], rx, ry);
        }
Ejemplo n.º 5
0
        public Map(PokeEngine engine, int id)
        {
            this.engine = engine;
            this.mapid  = id;
            entities    = new List <Entity>();
            initialize(id);

            if (!(this is MapConnection))
            {
                if (MapProvider.getInstance().getConnections(id) != null)
                {
                    foreach (ConnectionInfo info in MapProvider.getInstance().getConnections(id))
                    {
                        if (info.dir == ConnectionDirection.LEFT)
                        {
                            connectionLeft = info.createConnectionFromInfo(this);
                        }
                        else if (info.dir == ConnectionDirection.UP)
                        {
                            connectionUp = info.createConnectionFromInfo(this);
                        }
                        else if (info.dir == ConnectionDirection.RIGHT)
                        {
                            connectionRight = info.createConnectionFromInfo(this);
                        }
                        else if (info.dir == ConnectionDirection.DOWN)
                        {
                            connectionDown = info.createConnectionFromInfo(this);
                        }
                    }
                }

                /*connectionLeft = new MapConnection(engine, this, ConnectionDirection.LEFT, 2, 0);
                *  connectionUp = new MapConnection(engine, this, ConnectionDirection.UP, 2, 0);
                *  connectionRight = new MapConnection(engine, this, ConnectionDirection.RIGHT, 2, 1);
                *  connectionDown = new MapConnection(engine, this, ConnectionDirection.DOWN, 2, 0);*/
            }
        }
Ejemplo n.º 6
0
		public MapConnection(PokeEngine engine, Map parent, ConnectionDirection direction, int id, int offset)
			: base(engine, id) {
			this.direction = direction;
			this.parent = parent;
			this.offset = offset;
		}
Ejemplo n.º 7
0
		public MapConnection(PokeEngine engine, Map Parent, ConnectionDirection direction, int id)
			: base(engine, id) {

		}
Ejemplo n.º 8
0
		public override void render(PokeEngine engine, int xs, int ys) {
			BatchUtil.Draw(engine, Art.tiles[tex, 0], (x << 4) + xs, (y << 4) + ys);
		}
Ejemplo n.º 9
0
		public static void Draw(PokeEngine engine, Texture2D t2d, double x, double y) {
			Vector2 v2 = new Vector2((float)x + xScroll, (float)y + yScroll);
			Rectangle rect = new Rectangle((int)x + xScroll, (int)y + yScroll, t2d.Width, t2d.Height);
			engine.sbatch.Draw(t2d, rect, Color.White);

		}
Ejemplo n.º 10
0
		public static void BeginNoAA(SpriteBatch batch, PokeEngine engine) {
			Matrix m = Matrix.CreateScale((int) PokeEngine.SCALE, (int) PokeEngine.SCALE, 0);
			SamplerState sampler = SamplerState.PointClamp;
			batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, sampler, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, m);
		}
Ejemplo n.º 11
0
 public MapConnection(PokeEngine engine, Map Parent, ConnectionDirection direction, int id)
     : base(engine, id)
 {
 }
Ejemplo n.º 12
0
		public virtual void render(PokeEngine engine, int xs, int ys) {
			Console.WriteLine("Attempting to RENDER a default Tile object... Please, fix this");
		}
Ejemplo n.º 13
0
		public override void render(PokeEngine engine, int xs, int ys) {
			if (texArr[0] == -1 && texArr[1] == -1) refreshTexture();

			int rx = x * WIDTH + xs;
			int ry = y * WIDTH + ys;

			BatchUtil.Draw(engine, Art.tiles[0, 0], rx, ry);
			BatchUtil.Draw(engine, Art.blocks[texArr[0], texArr[1]], rx, ry);
		}
Ejemplo n.º 14
0
 public virtual void render(PokeEngine engine, int xs, int ys)
 {
     Console.WriteLine("Attempting to RENDER a default Tile object... Please, fix this");
 }
Ejemplo n.º 15
0
 public override void render(PokeEngine engine, int xs, int ys)
 {
     BatchUtil.Draw(engine, Art.tiles[tex, 0], (x << 4) + xs, (y << 4) + ys);
 }