C# Класс CivilUnit, ES2015C

Наследование: Unit
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
building bool
buildingSound UnityEngine.AudioClip
collecting bool
collectionAmount float
farmingSound UnityEngine.AudioClip
harvesting bool
harvestingSpeed int
miningSound UnityEngine.AudioClip
waitingForBuildingLocationSelection bool
woodCuttingSound UnityEngine.AudioClip

Защищенные свойства (Protected)

Свойство Тип Описание
buildableBuildings RTSObjectType[]
constructionPoint Vector3
constructionRotation Quaternion
creationBuilding GameObject
creationBuildingConstruction GameObject
creationCollisionDetectorObject GameObject
currentProject Building,

Открытые методы

Метод Описание
AssignBuildingProject ( Building, newProject ) : void
CreateBuildingIA ( GameObject building, Vector3 coords ) : void
CreateFinishedBuilding ( ) : void
CreateOnConstructionBuilding ( ) : void
CreateOnConstructionBuildingAI ( GameObject building, Vector3 coords ) : void
GetActions ( ) : Action[]
GetHarvestAmount ( ) : float

Get the current amount of resource that the unit has harvested.

GetHarvestType ( ) : ResourceType,

Get the current type of resource that the unit is harvesting.

IsBuilding ( ) : bool
IsHarvesting ( ) : bool

Check if the unit is currently harvesting.

PerformAction ( string actionToPerform ) : void
RotateBuilding ( ) : void
SetBuildingLocation ( ) : void

Sets the location of the building on the building location selector to the current position.

StartHarvest ( Resource, resource, string tag ) : void
StopBuildingLocationSelection ( ) : void
StopHarvest ( ) : void

Защищенные методы

Метод Описание
Animating ( ) : void
Awake ( ) : void
OnGUI ( ) : void
OnMouseDown ( ) : void
Update ( ) : void
chargeSounds ( string objectName ) : void

Приватные методы

Метод Описание
Collect ( ) : void
CreateBuilding ( RTSObjectType objectType ) : void
Deposit ( ) : void
FindResource ( string tag ) : Resource,
StartBuildingLocationSelection ( GameObject creationBuildingTmp ) : void

Starts the building location selection sequence, where the user has to click on the map in order to select the place where the building should be built.

findTownCenter ( ) : TownCenterBuilding,

Описание методов

Animating() защищенный Метод

protected Animating ( ) : void
Результат void

AssignBuildingProject() публичный Метод

public AssignBuildingProject ( Building, newProject ) : void
newProject Building,
Результат void

Awake() защищенный Метод

protected Awake ( ) : void
Результат void

CreateBuildingIA() публичный Метод

public CreateBuildingIA ( GameObject building, Vector3 coords ) : void
building GameObject
coords Vector3
Результат void

CreateFinishedBuilding() публичный Метод

public CreateFinishedBuilding ( ) : void
Результат void

CreateOnConstructionBuilding() публичный Метод

public CreateOnConstructionBuilding ( ) : void
Результат void

CreateOnConstructionBuildingAI() публичный Метод

public CreateOnConstructionBuildingAI ( GameObject building, Vector3 coords ) : void
building GameObject
coords Vector3
Результат void

GetActions() публичный Метод

public GetActions ( ) : Action[]
Результат Action[]

GetHarvestAmount() публичный Метод

Get the current amount of resource that the unit has harvested.
public GetHarvestAmount ( ) : float
Результат float

GetHarvestType() публичный Метод

Get the current type of resource that the unit is harvesting.
public GetHarvestType ( ) : ResourceType,
Результат ResourceType,

IsBuilding() публичный Метод

public IsBuilding ( ) : bool
Результат bool

IsHarvesting() публичный Метод

Check if the unit is currently harvesting.
public IsHarvesting ( ) : bool
Результат bool

OnGUI() защищенный Метод

protected OnGUI ( ) : void
Результат void

OnMouseDown() защищенный Метод

protected OnMouseDown ( ) : void
Результат void

PerformAction() публичный Метод

public PerformAction ( string actionToPerform ) : void
actionToPerform string
Результат void

RotateBuilding() публичный Метод

public RotateBuilding ( ) : void
Результат void

SetBuildingLocation() публичный Метод

Sets the location of the building on the building location selector to the current position.
public SetBuildingLocation ( ) : void
Результат void

StartHarvest() публичный Метод

public StartHarvest ( Resource, resource, string tag ) : void
resource Resource,
tag string
Результат void

StopBuildingLocationSelection() публичный Метод

public StopBuildingLocationSelection ( ) : void
Результат void

StopHarvest() публичный Метод

public StopHarvest ( ) : void
Результат void

Update() защищенный Метод

protected Update ( ) : void
Результат void

chargeSounds() защищенный Метод

protected chargeSounds ( string objectName ) : void
objectName string
Результат void

Описание свойств

buildableBuildings защищенное свойство

Buildings that can be created by this civil unit.
protected RTSObjectType[] buildableBuildings
Результат RTSObjectType[]

building публичное свойство

public bool building
Результат bool

buildingSound публичное свойство

public AudioClip,UnityEngine buildingSound
Результат UnityEngine.AudioClip

collecting публичное свойство

public bool collecting
Результат bool

collectionAmount публичное свойство

public float collectionAmount
Результат float

constructionPoint защищенное свойство

protected Vector3 constructionPoint
Результат Vector3

constructionRotation защищенное свойство

protected Quaternion constructionRotation
Результат Quaternion

creationBuilding защищенное свойство

protected GameObject creationBuilding
Результат GameObject

creationBuildingConstruction защищенное свойство

protected GameObject creationBuildingConstruction
Результат GameObject

creationCollisionDetectorObject защищенное свойство

Object used to show the preview to the user and detect overlaps and unbuildable places.
protected GameObject creationCollisionDetectorObject
Результат GameObject

currentProject защищенное свойство

protected Building, currentProject
Результат Building,

farmingSound публичное свойство

public AudioClip,UnityEngine farmingSound
Результат UnityEngine.AudioClip

harvesting публичное свойство

public bool harvesting
Результат bool

harvestingSpeed публичное свойство

public int harvestingSpeed
Результат int

miningSound публичное свойство

public AudioClip,UnityEngine miningSound
Результат UnityEngine.AudioClip

waitingForBuildingLocationSelection публичное свойство

true if we are in building location selection mode.
public bool waitingForBuildingLocationSelection
Результат bool

woodCuttingSound публичное свойство

public AudioClip,UnityEngine woodCuttingSound
Результат UnityEngine.AudioClip