//If they right click the cancel quad, cancel build mode
 public void RightClickStart(inputTracker input)
 {
     if(Buildings.instance.buildInGame.isOn)
     {
         Buildings.instance.StopBuildingPurchase();
     }
 }
Example #2
0
 //If they right click the cancel quad, cancel build mode
 public void RightClickStart(inputTracker input)
 {
     if (Buildings.instance.buildInGame.isOn)
     {
         Buildings.instance.StopBuildingPurchase();
     }
 }
Example #3
0
    public void ClickEnd(inputTracker input)
    {
        //PAINT MODE - Click End
        if (Painting.instance.paintBrush.isOn)
        {
            //flag off
            Painting.instance.StopPainting();
        }

        //DEV BUILDING MODE - Click End
        if (Buildings.instance.buildingPlacement.isOn)
        {
            //clear temp building display
            Buildings.instance.ClearTempBuilding();

            //and place a newly spawned building on this tile
            Buildings.instance.PlaceBuildingOnCurrent();

            //flag off
            Buildings.instance.StopPlacement();
        }

        //IN-GAME BUILDING MODE - Click End
        if (Buildings.instance.buildInGame.isOn)
        {
            //Turn off auto place on a click end
            Buildings.instance.buildInGame.autoPlaceBuilding = false;
        }
    }
Example #4
0
 public void RightClickEnd(inputTracker input)
 {
     if (hasClick)
     {
         clickTarget.RightClickEnd(input);
     }
 }
Example #5
0
 public void HoverEnd(inputTracker input)
 {
     if (hasHover)
     {
         hoverTarget.HoverEnd(input);
     }
 }
Example #6
0
 public void ClickEnd(inputTracker input)
 {
     if(hasClick)
     {
         clickTarget.ClickEnd(input);
     }
 }
Example #7
0
 public void ClickStart(inputTracker input)
 {
     if (hasClick)
     {
         clickTarget.ClickStart(input);
     }
 }
Example #8
0
 public void RightClickStart(inputTracker input)
 {
     if(hasClick)
     {
         clickTarget.RightClickStart(input);
     }
 }
Example #9
0
 public void HoverStart(inputTracker input)
 {
     if(hasHover)
     {
         hoverTarget.HoverStart(input);
     }
 }
Example #10
0
    public void HoverEnd(inputTracker input)
    {
        SetHighlight(color_highlight_off);

        //Clear this if it is the current tile for build mode
        Buildings.instance.ClearCurrentTile_buildMode(this as iBuildingReceiver);
    }
Example #11
0
 //If they mouse over an out of bounds area, the transparent building should be placed off screen
 public void HoverStart(inputTracker input)
 {
     //IN-GAME TRANSPARENT BUILDINGS - Hover
     if (Buildings.instance.buildInGame.isOn)
     {
         Buildings.instance.MoveTransparentBuildingOffScreen();
     }
 }
 //If they mouse over an out of bounds area, the transparent building should be placed off screen
 public void HoverStart(inputTracker input)
 {
     //IN-GAME TRANSPARENT BUILDINGS - Hover
     if(Buildings.instance.buildInGame.isOn)
     {
         Buildings.instance.MoveTransparentBuildingOffScreen();
     }
 }
Example #13
0
    public void HoverStart(inputTracker input)
    {
        //Set name
        InfoPopup.instance.setName(BuildingDisplayName.getName(myType));

        InfoPopup.instance.Popup_on();

        //passthru to tile
        if(tileHover != null)
        {
            tileHover.HoverStart(input);
        }
    }
Example #14
0
    public void HoverStart(inputTracker input)
    {
        //Set name
        InfoPopup.instance.setName(BuildingDisplayName.getName(myType));

        InfoPopup.instance.Popup_on();

        //passthru to tile
        if (tileHover != null)
        {
            tileHover.HoverStart(input);
        }
    }
Example #15
0
    public void HoverEnd(inputTracker input)
    {
        InfoPopup.instance.Popup_off();

        //Clear info
        InfoPopup.instance.setName("");

        //passthru to tile
        if (tileHover != null)
        {
            tileHover.HoverEnd(input);
        }
    }
Example #16
0
    public void HoverEnd(inputTracker input)
    {
        InfoPopup.instance.Popup_off();

        //Clear info
        InfoPopup.instance.setName("");

        //passthru to tile
        if(tileHover != null)
        {
            tileHover.HoverEnd(input);
        }
    }
Example #17
0
 public void RightClickStart(inputTracker input)
 {
     Debug.LogError("RightClickStart");
 }
Example #18
0
 public void RightClickEnd(inputTracker input)
 {
     Debug.LogError("RightClickEnd");
 }
Example #19
0
 public void HoverStart(inputTracker input)
 {
     Debug.LogError("HoverStart");
 }
Example #20
0
 public void HoverEnd(inputTracker input)
 {
     Debug.LogError("HoverEnd");
 }
Example #21
0
    public void ClickStart(inputTracker input)
    {
        //PAINT MODE - Click Start
        if (BrushType.Off != (BrushType)Painting.instance.paintBrush.currentBrush)
        {
            //flag on
            Painting.instance.StartPainting();

            //Process this tile as clicked for painting
            PaintClick((BrushType)Painting.instance.paintBrush.currentBrush);
        }

        //DEV BUILDING MODE - Click Start
        if (BuildingType.off != (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
        {
            //Check if we are in removal mode
            if (BuildingType.remove == (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
            {
                //flag on
                Buildings.instance.StartPlacement();

                //Set this tile as the current tile
                Buildings.instance.SetCurrentHoverTileForBuilding(this as iBuildingReceiver);
            }
            else
            {
                //Handle regular building placement types

                //Only start temp building placement if we don't have a building
                if (canReceiveBuilding())
                {
                    //flag on
                    Buildings.instance.StartPlacement();

                    Buildings.instance.PlaceTempBuilding(this as iBuildingReceiver);
                }
            }
        }

        //IN-GAME BUILDING MODE - Click Start
        if (Buildings.instance.buildInGame.isOn)
        {
            //Only if we don't have a building attempt to purchase
            if (canReceiveBuilding())
            {
                Buildings.instance.PurchaseAndPlaceBuilding(this as iBuildingReceiver);

                //If we are not set to keep building (shift held down), then drop out of in-game build mode
                if (!Buildings.instance.buildInGame.keepOn)
                {
                    Buildings.instance.StopBuildingPurchase();
                }
                else
                {
                    //If shift is held down, turn on auto place mode (which will end after a ClickEnd)
                    //In other words, shift and clickdown + drag will result in auto building
                    Buildings.instance.buildInGame.autoPlaceBuilding = true;
                }
            }
        }
    }
Example #22
0
 public void HoverEnd(inputTracker input)
 {
     Debug.LogError("HoverEnd");
 }
Example #23
0
 public void RightClickEnd(inputTracker input)
 {
     Debug.LogError("RightClickEnd");
 }
Example #24
0
    public void ClickEnd(inputTracker input)
    {
        //PAINT MODE - Click End
        if(Painting.instance.paintBrush.isOn)
        {
            //flag off
            Painting.instance.StopPainting();
        }

        //DEV BUILDING MODE - Click End
        if(Buildings.instance.buildingPlacement.isOn)
        {
            //clear temp building display
            Buildings.instance.ClearTempBuilding();

            //and place a newly spawned building on this tile
            Buildings.instance.PlaceBuildingOnCurrent();

            //flag off
            Buildings.instance.StopPlacement();
        }

        //IN-GAME BUILDING MODE - Click End
        if(Buildings.instance.buildInGame.isOn)
        {
            //Turn off auto place on a click end
            Buildings.instance.buildInGame.autoPlaceBuilding = false;
        }
    }
Example #25
0
 public void RightClickStart(inputTracker input)
 {
     Debug.LogError("+++ Right click start : " + v2_boardRowCol);
 }
Example #26
0
 public void RightClickEnd(inputTracker input)
 {
     Debug.LogError("--- Right click  end  : " + v2_boardRowCol);
 }
Example #27
0
    /// <summary>
    /// Declare a new touch-based internal inputTracker
    /// </summary>
    public internalInputTracker(int _ID, Vector3 _startPos)
    {
        touchID = _ID;
        isTouchInput = true;

        input_Tracking = new inputTracker(_startPos);

        rend_Previous_HoverHit = null;
        rend_Current_HoverHit = null;
        rend_Previous_ClickHit = null;
        rend_Current_ClickHit = null;

        touch_isDirty = true; //New touches are always dirty
        touch_isTouchModeStart = true; //New touches are always touch mode start

        //UNLESS THE LEVEL JUST LOADED
        if(Time.timeSinceLevelLoad < 0.1f)
        {
            touch_isTouchModeStart = false;
        }

        HoverStart_NeedsProcessing = false;
        HoverEnd_NeedsProcessing = false;
        ClickStart_NeedsProcessing = false;
        ClickEnd_NeedsProcessing = false;
    }
Example #28
0
    public void HoverEnd(inputTracker input)
    {
        SetHighlight(color_highlight_off);

        //Clear this if it is the current tile for build mode
        Buildings.instance.ClearCurrentTile_buildMode(this as iBuildingReceiver);
    }
Example #29
0
    public void ClickStart(inputTracker input)
    {
        //PAINT MODE - Click Start
        if(BrushType.Off != (BrushType)Painting.instance.paintBrush.currentBrush)
        {
            //flag on
            Painting.instance.StartPainting();

            //Process this tile as clicked for painting
            PaintClick((BrushType)Painting.instance.paintBrush.currentBrush);
        }

        //DEV BUILDING MODE - Click Start
        if(BuildingType.off != (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
        {
            //Check if we are in removal mode
            if(BuildingType.remove == (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
            {
                //flag on
                Buildings.instance.StartPlacement();

                //Set this tile as the current tile
                Buildings.instance.SetCurrentHoverTileForBuilding(this as iBuildingReceiver);
            }
            else
            {
                //Handle regular building placement types

                //Only start temp building placement if we don't have a building
                if(canReceiveBuilding())
                {
                    //flag on
                    Buildings.instance.StartPlacement();

                    Buildings.instance.PlaceTempBuilding(this as iBuildingReceiver);
                }
            }
        }

        //IN-GAME BUILDING MODE - Click Start
        if(Buildings.instance.buildInGame.isOn)
        {
            //Only if we don't have a building attempt to purchase
            if(canReceiveBuilding())
            {
                Buildings.instance.PurchaseAndPlaceBuilding(this as iBuildingReceiver);

                //If we are not set to keep building (shift held down), then drop out of in-game build mode
                if(!Buildings.instance.buildInGame.keepOn)
                {
                    Buildings.instance.StopBuildingPurchase();
                }
                else
                {
                    //If shift is held down, turn on auto place mode (which will end after a ClickEnd)
                    //In other words, shift and clickdown + drag will result in auto building
                    Buildings.instance.buildInGame.autoPlaceBuilding = true;
                }
            }
        }
    }
Example #30
0
 public void ClickEnd(inputTracker input)
 {
     Debug.LogError("ClickEnd");
 }
Example #31
0
 public void ClickEnd(inputTracker input)
 {
     Debug.LogError("ClickEnd");
 }
Example #32
0
    /// <summary>
    /// Declare a new mouse-based internal inputTracker
    /// </summary>
    public internalInputTracker(Vector3 _startPos)
    {
        touchID = -1;
        isTouchInput = false;

        input_Tracking = new inputTracker(_startPos);

        rend_Previous_HoverHit = null;
        rend_Current_HoverHit = null;
        rend_Previous_ClickHit = null;
        rend_Current_ClickHit = null;

        touch_isDirty = false; //This is not a touch anyway
        touch_isTouchModeStart = false;

        HoverStart_NeedsProcessing = false;
        HoverEnd_NeedsProcessing = false;
        ClickStart_NeedsProcessing = false;
        ClickEnd_NeedsProcessing = false;
    }
Example #33
0
 public void HoverStart(inputTracker input)
 {
     Debug.LogError("HoverStart");
 }
Example #34
0
 public void RightClickEnd(inputTracker input)
 {
     Debug.LogError("--- Right click  end  : " + v2_boardRowCol);
 }
Example #35
0
 public void ClickStart(inputTracker input)
 {
     Debug.LogError("ClickStart");
 }
Example #36
0
 public void RightClickStart(inputTracker input)
 {
     Debug.LogError("+++ Right click start : " + v2_boardRowCol);
 }
Example #37
0
    public void HoverStart(inputTracker input)
    {
        SetHighlight(color_highlight_on);

        //Set the currently hovered tile in Buildings, for if BuildMode is turned on
        Buildings.instance.SetCurrentTile_buildMode(this as iBuildingReceiver);

        //PAINT MODE - Hover
        if(Painting.instance.paintBrush.isOn)
        {
            if(BrushType.Off != (BrushType)Painting.instance.paintBrush.currentBrush)
            {
                //Process this tile as clicked for painting
                PaintClick((BrushType)Painting.instance.paintBrush.currentBrush);
            }
        }

        //DEV BUILDINGS - Hover
        if(Buildings.instance.buildingPlacement.isOn)
        {
            if(BuildingType.off != (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
            {
                //Check if we are in removal mode
                if(BuildingType.remove == (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
                {
                    //Removal mode will set this tile as the current
                    Buildings.instance.SetCurrentHoverTileForBuilding(this as iBuildingReceiver);
                }
                else
                {
                    //Regular temp building processing

                    //Only if we don't have a building display the hover
                    if(canReceiveBuilding())
                    {
                        Buildings.instance.PlaceTempBuilding(this as iBuildingReceiver);
                    }
                }
            }
        }

        //IN-GAME TRANSPARENT BUILDINGS - Hover
        if(Buildings.instance.buildInGame.isOn)
        {
            //Only if we don't have a building display the hover
            if(canReceiveBuilding())
            {
                Buildings.instance.PlaceTransparentBuilding(this as iBuildingReceiver);

                //If auto-build is turned on (they were holding shift and are still holding down a click)
                //Then just purchase the building immediately
                if(Buildings.instance.buildInGame.autoPlaceBuilding)
                {
                    Buildings.instance.PurchaseAndPlaceBuilding(this as iBuildingReceiver);
                }
            }
            else
            {
                Buildings.instance.MoveTransparentBuildingOffScreen();
            }
        }
    }
Example #38
0
    public void HoverStart(inputTracker input)
    {
        SetHighlight(color_highlight_on);

        //Set the currently hovered tile in Buildings, for if BuildMode is turned on
        Buildings.instance.SetCurrentTile_buildMode(this as iBuildingReceiver);

        //PAINT MODE - Hover
        if (Painting.instance.paintBrush.isOn)
        {
            if (BrushType.Off != (BrushType)Painting.instance.paintBrush.currentBrush)
            {
                //Process this tile as clicked for painting
                PaintClick((BrushType)Painting.instance.paintBrush.currentBrush);
            }
        }

        //DEV BUILDINGS - Hover
        if (Buildings.instance.buildingPlacement.isOn)
        {
            if (BuildingType.off != (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
            {
                //Check if we are in removal mode
                if (BuildingType.remove == (BuildingType)Buildings.instance.buildingPlacement.currentBuilding)
                {
                    //Removal mode will set this tile as the current
                    Buildings.instance.SetCurrentHoverTileForBuilding(this as iBuildingReceiver);
                }
                else
                {
                    //Regular temp building processing

                    //Only if we don't have a building display the hover
                    if (canReceiveBuilding())
                    {
                        Buildings.instance.PlaceTempBuilding(this as iBuildingReceiver);
                    }
                }
            }
        }

        //IN-GAME TRANSPARENT BUILDINGS - Hover
        if (Buildings.instance.buildInGame.isOn)
        {
            //Only if we don't have a building display the hover
            if (canReceiveBuilding())
            {
                Buildings.instance.PlaceTransparentBuilding(this as iBuildingReceiver);

                //If auto-build is turned on (they were holding shift and are still holding down a click)
                //Then just purchase the building immediately
                if (Buildings.instance.buildInGame.autoPlaceBuilding)
                {
                    Buildings.instance.PurchaseAndPlaceBuilding(this as iBuildingReceiver);
                }
            }
            else
            {
                Buildings.instance.MoveTransparentBuildingOffScreen();
            }
        }
    }