Ejemplo n.º 1
0
        /// <summary>
        /// Update this handler
        /// </summary>
        /// <param name="hoverPoint">the curreently hovered block</param>
        public void Handle(Microsoft.Xna.Framework.Point hoverPoint)
        {
            this.helper = new Marker(MarkerType.Info, hoverPoint);

            if (FenrirGame.Instance.Properties.Input.LeftClick && this.scene.Markers.ContainsKey(hoverPoint))
            {
                this.scene.Markers.Remove(hoverPoint);

                foreach (Cave cave in this.scene.Caves)
                    if (cave.CaveBlocksToMine.Contains(hoverPoint))
                    {
                        foreach (Point caveMarker in cave.CaveBlocksToMine)
                            this.scene.Markers.Remove(caveMarker);

                        this.scene.Caves.Remove(cave);
                        break;  // break from loop
                    }
            }

            if (FenrirGame.Instance.Properties.Input.RightClick)
                this.scene.DisposeCurrentModeHandler();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create the handler
 /// </summary>
 /// <param name="Scene"></param>
 public ClearTunnelHandler(InGame.Components.Scene Scene)
 {
     this.helper = new Marker(MarkerType.Info, new Microsoft.Xna.Framework.Point());
     this.scene = Scene;
 }