A* Pathfinding Project  4.3.5
The A* Pathfinding Project for Unity 3D
RTSUI Class Reference

Classes

class  Menu
 
class  MenuItem
 

Public Types

enum  State { Normal, PlacingBuilding, Dragging }
 

Public Member Functions

Menu ShowMenu ()
 
void StartBuildingPlacement (RTSUnitBuilder.BuildingItem buildingInfo)
 

Public Attributes

GameObject buildingPreview
 
AudioClip click
 
Button clickFallback
 
LayerMask groundMask
 
GameObject menuItemPrefab
 
GameObject menuRoot
 
AudioClip notEnoughResources
 
RectTransform selectionBox
 
State state
 
RTSWorldSpaceUI worldSpaceUI
 

Static Public Attributes

static RTSUI active
 

Private Member Functions

void AbortBuildingPlacement ()
 
void Awake ()
 
void HandleBuildingPlacement ()
 
void HandleMovement ()
 
void HandleSelection ()
 
RaycastHit RaycastScreenPoint (Vector2 mousePosition, LayerMask mask)
 
void Update ()
 

Private Attributes

Menu activeMenu
 
RTSUnitBuilder.BuildingItem buildingInfo
 
Vector2 dragStart
 
bool hasSelected = false
 
int ignoreFrame = -1
 

Member Enumeration Documentation

◆ State

enum State
strong
Enumerator
Normal 
PlacingBuilding 
Dragging 

Member Function Documentation

◆ AbortBuildingPlacement()

void AbortBuildingPlacement ( )
private

◆ Awake()

void Awake ( )
private

◆ HandleBuildingPlacement()

void HandleBuildingPlacement ( )
private

◆ HandleMovement()

void HandleMovement ( )
private

◆ HandleSelection()

void HandleSelection ( )
private

◆ RaycastScreenPoint()

RaycastHit RaycastScreenPoint ( Vector2  mousePosition,
LayerMask  mask 
)
private

◆ ShowMenu()

Menu ShowMenu ( )

◆ StartBuildingPlacement()

void StartBuildingPlacement ( RTSUnitBuilder.BuildingItem  buildingInfo)

◆ Update()

void Update ( )
private

Member Data Documentation

◆ active

RTSUI active
static

◆ activeMenu

Menu activeMenu
private

◆ buildingInfo

RTSUnitBuilder.BuildingItem buildingInfo
private

◆ buildingPreview

GameObject buildingPreview

◆ click

AudioClip click

◆ clickFallback

Button clickFallback

◆ dragStart

Vector2 dragStart
private

◆ groundMask

LayerMask groundMask

◆ hasSelected

bool hasSelected = false
private

◆ ignoreFrame

int ignoreFrame = -1
private

◆ menuItemPrefab

GameObject menuItemPrefab

◆ menuRoot

GameObject menuRoot

◆ notEnoughResources

AudioClip notEnoughResources

◆ selectionBox

RectTransform selectionBox

◆ state

State state

◆ worldSpaceUI

RTSWorldSpaceUI worldSpaceUI

The documentation for this class was generated from the following file: