C# Class CivilUnit, ES2015C

Inheritance: Unit
Afficher le fichier Open project: jgirald/ES2015C

Méthodes publiques

Свойство 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

Свойство Type Description
buildableBuildings RTSObjectType[]
constructionPoint Vector3
constructionRotation Quaternion
creationBuilding GameObject
creationBuildingConstruction GameObject
creationCollisionDetectorObject GameObject
currentProject Building,

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
Animating ( ) : void
Awake ( ) : void
OnGUI ( ) : void
OnMouseDown ( ) : void
Update ( ) : void
chargeSounds ( string objectName ) : void

Private Methods

Méthode 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 méthode

protected Animating ( ) : void
Résultat void

AssignBuildingProject() public méthode

public AssignBuildingProject ( Building, newProject ) : void
newProject Building,
Résultat void

Awake() protected méthode

protected Awake ( ) : void
Résultat void

CreateBuildingIA() public méthode

public CreateBuildingIA ( GameObject building, Vector3 coords ) : void
building GameObject
coords Vector3
Résultat void

CreateFinishedBuilding() public méthode

public CreateFinishedBuilding ( ) : void
Résultat void

CreateOnConstructionBuilding() public méthode

public CreateOnConstructionBuilding ( ) : void
Résultat void

CreateOnConstructionBuildingAI() public méthode

public CreateOnConstructionBuildingAI ( GameObject building, Vector3 coords ) : void
building GameObject
coords Vector3
Résultat void

GetActions() public méthode

public GetActions ( ) : Action[]
Résultat Action[]

GetHarvestAmount() public méthode

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

GetHarvestType() public méthode

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

IsBuilding() public méthode

public IsBuilding ( ) : bool
Résultat bool

IsHarvesting() public méthode

Check if the unit is currently harvesting.
public IsHarvesting ( ) : bool
Résultat bool

OnGUI() protected méthode

protected OnGUI ( ) : void
Résultat void

OnMouseDown() protected méthode

protected OnMouseDown ( ) : void
Résultat void

PerformAction() public méthode

public PerformAction ( string actionToPerform ) : void
actionToPerform string
Résultat void

RotateBuilding() public méthode

public RotateBuilding ( ) : void
Résultat void

SetBuildingLocation() public méthode

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

StartHarvest() public méthode

public StartHarvest ( Resource, resource, string tag ) : void
resource Resource,
tag string
Résultat void

StopBuildingLocationSelection() public méthode

public StopBuildingLocationSelection ( ) : void
Résultat void

StopHarvest() public méthode

public StopHarvest ( ) : void
Résultat void

Update() protected méthode

protected Update ( ) : void
Résultat void

chargeSounds() protected méthode

protected chargeSounds ( string objectName ) : void
objectName string
Résultat void

Property Details

buildableBuildings protected_oe property

Buildings that can be created by this civil unit.
protected RTSObjectType[] buildableBuildings
Résultat RTSObjectType[]

building public_oe property

public bool building
Résultat bool

buildingSound public_oe property

public AudioClip,UnityEngine buildingSound
Résultat UnityEngine.AudioClip

collecting public_oe property

public bool collecting
Résultat bool

collectionAmount public_oe property

public float collectionAmount
Résultat float

constructionPoint protected_oe property

protected Vector3 constructionPoint
Résultat Vector3

constructionRotation protected_oe property

protected Quaternion constructionRotation
Résultat Quaternion

creationBuilding protected_oe property

protected GameObject creationBuilding
Résultat GameObject

creationBuildingConstruction protected_oe property

protected GameObject creationBuildingConstruction
Résultat GameObject

creationCollisionDetectorObject protected_oe property

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

currentProject protected_oe property

protected Building, currentProject
Résultat Building,

farmingSound public_oe property

public AudioClip,UnityEngine farmingSound
Résultat UnityEngine.AudioClip

harvesting public_oe property

public bool harvesting
Résultat bool

harvestingSpeed public_oe property

public int harvestingSpeed
Résultat int

miningSound public_oe property

public AudioClip,UnityEngine miningSound
Résultat UnityEngine.AudioClip

waitingForBuildingLocationSelection public_oe property

true if we are in building location selection mode.
public bool waitingForBuildingLocationSelection
Résultat bool

woodCuttingSound public_oe property

public AudioClip,UnityEngine woodCuttingSound
Résultat UnityEngine.AudioClip