Loading...
Searching...
No Matches
CityBuilderCore.LayerBuildingBuilder Class Reference

Detailed Description

special building builder that also highlights points around the building
these points follow the same rules as layers(range, falloff) so they can be used as a preview for layer affectors

Inheritance diagram for CityBuilderCore.LayerBuildingBuilder:
CityBuilderCore.BuildingBuilder CityBuilderCore.PointerToolBase CityBuilderCore.BaseTool CityBuilderCore.TooltipOwnerBase CityBuilderCore.ITooltipOwner

Public Member Functions

override void DeactivateTool ()
 
- Public Member Functions inherited from CityBuilderCore.BuildingBuilder
override void ActivateTool ()
 
override int GetCost (Item item)
 
- Public Member Functions inherited from CityBuilderCore.PointerToolBase
override void DeactivateTool ()
 
- Public Member Functions inherited from CityBuilderCore.TooltipOwnerBase
void OnPointerEnter (PointerEventData eventData)
 
void OnPointerExit (PointerEventData eventData)
 

Public Attributes

int Value
 
int Range
 
int Falloff
 
Gradient Gradient
 
int Minimum
 
int Maximum
 
Tilemap Tilemap
 
Tile Tile
 
- Public Attributes inherited from CityBuilderCore.BuildingBuilder
BuildingInfo BuildingInfo
 
bool AllowRotate = true
 
UnityEvent< BuildingBuilt
 
- Public Attributes inherited from CityBuilderCore.PointerToolBase
bool AllowTouchPan
 
- Public Attributes inherited from CityBuilderCore.BaseTool
View View
 
ToolEvent Activating
 
ToolEvent Applied
 

Protected Member Functions

override void updatePreview (List< Vector2Int > buildPoints, Vector2Int size, Func< Vector2Int, bool > validityChecker)
 
- Protected Member Functions inherited from CityBuilderCore.BuildingBuilder
override void Start ()
 
override void updateTool ()
 
override void updatePointer (Vector2Int mousePoint, Vector2Int dragStart, bool isDown, bool isApply)
 
virtual void recreatePreview ()
 
virtual void createPreview ()
 
virtual void destroyPreview ()
 
virtual bool checkCost (int count)
 
virtual void build (IEnumerable< Vector2Int > points)
 
- Protected Member Functions inherited from CityBuilderCore.PointerToolBase
override void updateTool ()
 
void updatePointer (Vector2Int mousePoint, Vector2Int dragStart, bool isDown, bool isApply)
 
- Protected Member Functions inherited from CityBuilderCore.BaseTool
void onApplied ()
 
- Protected Member Functions inherited from CityBuilderCore.TooltipOwnerBase
virtual void OnDisable ()
 
void enter ()
 
void exit ()
 

Additional Inherited Members

- Protected Attributes inherited from CityBuilderCore.BuildingBuilder
BuildingRotation _rotation
 
int _index
 
GameObject _ghost
 
List< ItemQuantity_costs = new List<ItemQuantity>()
 
IGlobalStorage _globalStorage
 
IHighlightManager _highlighting
 
IMap _map
 
IMainCamera _mainCamera
 
IGridPositions _gridPositions
 
IGridHeights _gridHeights
 
- Protected Attributes inherited from CityBuilderCore.TooltipOwnerBase
bool _isPointerInside
 
- Properties inherited from CityBuilderCore.BuildingBuilder
override string TooltipName [get]
 main text in the tooltip
 
override string TooltipDescription [get]
 smaller but potentially longer text below the main text
 
- Properties inherited from CityBuilderCore.PointerToolBase
override bool IsTouchPanAllowed [get]
 
- Properties inherited from CityBuilderCore.BaseTool
virtual bool ShowGrid [get]
 whether the IGridOverlay gets shown for this tool
 
virtual bool IsTouchPanAllowed [get]
 whether the camera can be panned by touch drag
 
bool IsToolActive [get]
 
bool IsTouchActivated [get]
 
- Properties inherited from CityBuilderCore.TooltipOwnerBase
virtual string TooltipName [get]
 main text in the tooltip
 
virtual string TooltipDescription [get]
 smaller but potentially longer text below the main text
 
- Properties inherited from CityBuilderCore.ITooltipOwner

Member Function Documentation

◆ DeactivateTool()

override void CityBuilderCore.LayerBuildingBuilder.DeactivateTool ( )
inlinevirtual

Reimplemented from CityBuilderCore.BuildingBuilder.

◆ updatePreview()

override void CityBuilderCore.LayerBuildingBuilder.updatePreview ( List< Vector2Int > buildPoints,
Vector2Int size,
Func< Vector2Int, bool > validityChecker )
inlineprotectedvirtual

Reimplemented from CityBuilderCore.BuildingBuilder.