public void HandleHitSurface() { this.currentSpring.ShowSpring(); this.currentSpring = null; }
public void InsertSpringblocks(Point springTile) { for (int i = 0; i < this.tileMap.MapSize.Height; i++) { for (int j = 0; j < this.tileMap.MapSize.Width; j++) { Point point = this.tileMap.GetTile(TileLayer.Fore, j, i); if ((point.X == springTile.X) && (point.Y == springTile.Y)) { int width = TileSize.Width; SpringBlock item = new SpringBlock { Location = new PointF((float) (j * width), (float) (i * width)), ObjClass = ObjectClass.Block }; this.objects.Add(item); } } } }
public SurfaceType GetSurfaceType(int x, int y, bool checkWater) { if (((x >= 0) && (x < this.tileMap.MapSize.Width)) && ((y >= 0) && (y < this.tileMap.MapSize.Height))) { Point point = this.tileMap.GetTile(TileLayer.Fore, x, y); PointF tf = new PointF((float) (x * TileSize.Width), (float) (y * TileSize.Height)); if (checkWater) { Point point2 = this.tileMap.GetTile(TileLayer.Back1, x, y); if (((point2.Y == this.waterTileStart.Y) && (point2.X >= this.waterTileStart.X)) && (point.X <= this.waterTileEnd)) { return SurfaceType.Solid; } } if (point.Equals(this.mouseBlock)) { return SurfaceType.MouseBlock; } foreach (BaseObject obj2 in this.objects) { if ((obj2.ObjClass == ObjectClass.Block) && obj2.Location.Equals(tf)) { this.currentSpring = (SpringBlock) obj2; return SurfaceType.Spring; } } if (point.Equals(this.magicBlock)) { return SurfaceType.None; } if ((point.X == 0) && (point.Y == 0)) { return SurfaceType.None; } } return SurfaceType.Solid; }