C# Class CivilUnit, ES2015C

Inheritance: Unit
Exibir arquivo Open project: jgirald/ES2015C

Public Properties

Property Type Description
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 Properties

Property Type Description
buildableBuildings RTSObjectType[]
constructionPoint Vector3
constructionRotation Quaternion
creationBuilding GameObject
creationBuildingConstruction GameObject
creationCollisionDetectorObject GameObject
currentProject Building,

Public Methods

Method Description
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

Protected Methods

Method Description
Animating ( ) : void
Awake ( ) : void
OnGUI ( ) : void
OnMouseDown ( ) : void
Update ( ) : void
chargeSounds ( string objectName ) : void

Private Methods

Method Description
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,

Method Details

Animating() protected method

protected Animating ( ) : void
return void

AssignBuildingProject() public method

public AssignBuildingProject ( Building, newProject ) : void
newProject Building,
return void

Awake() protected method

protected Awake ( ) : void
return void

CreateBuildingIA() public method

public CreateBuildingIA ( GameObject building, Vector3 coords ) : void
building GameObject
coords Vector3
return void

CreateFinishedBuilding() public method

public CreateFinishedBuilding ( ) : void
return void

CreateOnConstructionBuilding() public method

public CreateOnConstructionBuilding ( ) : void
return void

CreateOnConstructionBuildingAI() public method

public CreateOnConstructionBuildingAI ( GameObject building, Vector3 coords ) : void
building GameObject
coords Vector3
return void

GetActions() public method

public GetActions ( ) : Action[]
return Action[]

GetHarvestAmount() public method

Get the current amount of resource that the unit has harvested.
public GetHarvestAmount ( ) : float
return float

GetHarvestType() public method

Get the current type of resource that the unit is harvesting.
public GetHarvestType ( ) : ResourceType,
return ResourceType,

IsBuilding() public method

public IsBuilding ( ) : bool
return bool

IsHarvesting() public method

Check if the unit is currently harvesting.
public IsHarvesting ( ) : bool
return bool

OnGUI() protected method

protected OnGUI ( ) : void
return void

OnMouseDown() protected method

protected OnMouseDown ( ) : void
return void

PerformAction() public method

public PerformAction ( string actionToPerform ) : void
actionToPerform string
return void

RotateBuilding() public method

public RotateBuilding ( ) : void
return void

SetBuildingLocation() public method

Sets the location of the building on the building location selector to the current position.
public SetBuildingLocation ( ) : void
return void

StartHarvest() public method

public StartHarvest ( Resource, resource, string tag ) : void
resource Resource,
tag string
return void

StopBuildingLocationSelection() public method

public StopBuildingLocationSelection ( ) : void
return void

StopHarvest() public method

public StopHarvest ( ) : void
return void

Update() protected method

protected Update ( ) : void
return void

chargeSounds() protected method

protected chargeSounds ( string objectName ) : void
objectName string
return void

Property Details

buildableBuildings protected_oe property

Buildings that can be created by this civil unit.
protected RTSObjectType[] buildableBuildings
return RTSObjectType[]

building public_oe property

public bool building
return bool

buildingSound public_oe property

public AudioClip,UnityEngine buildingSound
return UnityEngine.AudioClip

collecting public_oe property

public bool collecting
return bool

collectionAmount public_oe property

public float collectionAmount
return float

constructionPoint protected_oe property

protected Vector3 constructionPoint
return Vector3

constructionRotation protected_oe property

protected Quaternion constructionRotation
return Quaternion

creationBuilding protected_oe property

protected GameObject creationBuilding
return GameObject

creationBuildingConstruction protected_oe property

protected GameObject creationBuildingConstruction
return GameObject

creationCollisionDetectorObject protected_oe property

Object used to show the preview to the user and detect overlaps and unbuildable places.
protected GameObject creationCollisionDetectorObject
return GameObject

currentProject protected_oe property

protected Building, currentProject
return Building,

farmingSound public_oe property

public AudioClip,UnityEngine farmingSound
return UnityEngine.AudioClip

harvesting public_oe property

public bool harvesting
return bool

harvestingSpeed public_oe property

public int harvestingSpeed
return int

miningSound public_oe property

public AudioClip,UnityEngine miningSound
return UnityEngine.AudioClip

waitingForBuildingLocationSelection public_oe property

true if we are in building location selection mode.
public bool waitingForBuildingLocationSelection
return bool

woodCuttingSound public_oe property

public AudioClip,UnityEngine woodCuttingSound
return UnityEngine.AudioClip