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

Detailed Description

special building builder that registers as a preview feeder with its view connection this allows showing how connections would be changed without actually affecting them

Inheritance diagram for CityBuilderCore.ConnectionFeederBuilder:
CityBuilderCore.BuildingBuilder CityBuilderCore.IConnectionFeeder CityBuilderCore.PointerToolBase CityBuilderCore.IConnectionPasser CityBuilderCore.BaseTool CityBuilderCore.TooltipOwnerBase CityBuilderCore.ITooltipOwner

Public Member Functions

IEnumerable< Vector2Int > GetPoints ()
 the points of the passer
 
void ValueChanged (Vector2Int point, int value)
 this is where the passer gets notified about changes to the values of its points
 
override void ActivateTool ()
 
override void DeactivateTool ()
 
- Public Member Functions inherited from CityBuilderCore.BuildingBuilder
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

ViewConnection ViewConnection
 
int Value
 
int Range
 
int Falloff
 
- 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)
 
override void build (IEnumerable< Vector2Int > points)
 
- 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)
 
- 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 ()
 

Events

Action< IConnectionFeederFeederValueChanged
 
Action< PointsChanged< IConnectionPasser > > PointsChanged
 
- Events inherited from CityBuilderCore.IConnectionFeeder
Action< IConnectionFeederFeederValueChanged
 event that has to be fired when the feeder changes its output
 
- Events inherited from CityBuilderCore.IConnectionPasser
Action< PointsChanged< IConnectionPasser > > PointsChanged
 fired by the passer when points are removed or added to it
 

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
- Properties inherited from CityBuilderCore.IConnectionFeeder
- Properties inherited from CityBuilderCore.IConnectionPasser

Member Function Documentation

◆ ActivateTool()

override void CityBuilderCore.ConnectionFeederBuilder.ActivateTool ( )
inlinevirtual

Reimplemented from CityBuilderCore.BuildingBuilder.

◆ build()

override void CityBuilderCore.ConnectionFeederBuilder.build ( IEnumerable< Vector2Int > points)
inlineprotectedvirtual

Reimplemented from CityBuilderCore.BuildingBuilder.

◆ DeactivateTool()

override void CityBuilderCore.ConnectionFeederBuilder.DeactivateTool ( )
inlinevirtual

Reimplemented from CityBuilderCore.BuildingBuilder.

◆ GetPoints()

IEnumerable< Vector2Int > CityBuilderCore.ConnectionFeederBuilder.GetPoints ( )

the points of the passer

Returns

Implements CityBuilderCore.IConnectionPasser.

◆ updatePreview()

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

Reimplemented from CityBuilderCore.BuildingBuilder.

◆ ValueChanged()

void CityBuilderCore.ConnectionFeederBuilder.ValueChanged ( Vector2Int point,
int value )
inline

this is where the passer gets notified about changes to the values of its points

Parameters
pointthe point at which the value changed
valuethe new value at the point

Implements CityBuilderCore.IConnectionPasser.