//If they right click the cancel quad, cancel build mode public void RightClickStart(inputTracker input) { if(Buildings.instance.buildInGame.isOn) { Buildings.instance.StopBuildingPurchase(); } }
//If they right click the cancel quad, cancel build mode public void RightClickStart(inputTracker input) { if (Buildings.instance.buildInGame.isOn) { Buildings.instance.StopBuildingPurchase(); } }
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; } }
public void RightClickEnd(inputTracker input) { if (hasClick) { clickTarget.RightClickEnd(input); } }
public void HoverEnd(inputTracker input) { if (hasHover) { hoverTarget.HoverEnd(input); } }
public void ClickEnd(inputTracker input) { if(hasClick) { clickTarget.ClickEnd(input); } }
public void ClickStart(inputTracker input) { if (hasClick) { clickTarget.ClickStart(input); } }
public void RightClickStart(inputTracker input) { if(hasClick) { clickTarget.RightClickStart(input); } }
public void HoverStart(inputTracker input) { if(hasHover) { hoverTarget.HoverStart(input); } }
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); }
//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(); } }
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); } }
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); } }
public void HoverEnd(inputTracker input) { InfoPopup.instance.Popup_off(); //Clear info InfoPopup.instance.setName(""); //passthru to tile if (tileHover != null) { tileHover.HoverEnd(input); } }
public void HoverEnd(inputTracker input) { InfoPopup.instance.Popup_off(); //Clear info InfoPopup.instance.setName(""); //passthru to tile if(tileHover != null) { tileHover.HoverEnd(input); } }
public void RightClickStart(inputTracker input) { Debug.LogError("RightClickStart"); }
public void RightClickEnd(inputTracker input) { Debug.LogError("RightClickEnd"); }
public void HoverStart(inputTracker input) { Debug.LogError("HoverStart"); }
public void HoverEnd(inputTracker input) { Debug.LogError("HoverEnd"); }
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; } } } }
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; } }
public void RightClickStart(inputTracker input) { Debug.LogError("+++ Right click start : " + v2_boardRowCol); }
public void RightClickEnd(inputTracker input) { Debug.LogError("--- Right click end : " + v2_boardRowCol); }
/// <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; }
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; } } } }
public void ClickEnd(inputTracker input) { Debug.LogError("ClickEnd"); }
/// <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; }
public void ClickStart(inputTracker input) { Debug.LogError("ClickStart"); }
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(); } } }
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(); } } }