Property | Type | Description | |
---|---|---|---|
buildingType | eBuildingType | ||
conectado | bool | ||
construido | bool | ||
idleStatus | bool | ||
level | int | ||
monkeyInside | Transform | ||
myTimer | float | ||
resourceSite | CBaseEntity | ||
sabotado | bool | ||
sabotagedParticleSystem | Transform | ||
sfxLoadMonkey | AudioClip | ||
sfxSabotados | AudioClip | ||
sfxSelected | AudioClip | ||
showInfoObject | Transform | ||
tipo | TipoEstrutura | ||
vida | int | ||
workTime | float |
Method | Description | |
---|---|---|
Awake ( ) : void |
When the script is initialized
|
|
BuildIt ( ) : void |
Create an instance of the selected building, place it and activate it
|
|
Desabotage ( ) : void |
"Desabotage" (is this a real word?) this building, removing the visual aid to the player
|
|
ExtractResource ( ) : void |
Extract resource from the resource site
|
|
FixByEngineer ( ) : void |
Fixing the building by an engineer. For now, it only changes the state from "sabotaged" to "not sabotaged" TODO: add some cost in resources (metal?) when this is done. And check if we can afford it before fixing
|
|
GetControlRoomSpot ( ) : void |
Find the object "ControlSpot", which designates where the monkey should be when inside the building
|
|
GetExitSpot ( ) : void |
Find the coordinates for the object 'ExitSpot', which designates where an unit should be when exiting the building
|
|
GetExitSpotPosition ( ) : Vector3 |
Returns the position of the exit spot of this building
|
|
GetTheMonkeyOut ( ) : void |
Get the monkey out of the building, so it will be free to roam the terrain. The building is no more affected by his bonus
|
|
IsIdle ( bool bnIdleStatus ) : void |
Change the status of this building.
|
|
PutAMonkeyInside ( Transform monkeyIn ) : void |
Put a monkey inside this building. Building controller directly by monkey are more efficient somehow
|
|
PutAMonkeyInsideRocket ( Transform tMonkey, CMonkey, eMonkeyClass ) : void |
Put one of the monkey inside the rocket
|
|
ReceivePrisoner ( CMonkey monkeyPrisoner ) : void |
Receive a delivered prisoner
|
|
Sabotage ( ) : void |
Sabotage this building, adding a visual aid to the player
|
|
Select ( ) : Transform | ||
TemporarySabotage ( float fTimer ) : void |
Call a coroutine to use a timed sabotage. When the timer if over, the building will be restored to it's functional status. Useful for the player sabotaging enemy building
|
|
TheresAMonkeyInside ( ) : Transform |
Check if there's a monkey inside this building
|
|
Update ( ) : void |
In this update, we do whatever the building is supposed to do
|
|
Work ( ) : void |
Do whatever this building is suppose to do, according to his type
|
Method | Description | |
---|---|---|
ShowInfoForExtractedResource ( string stResource, float amountExtracted ) : IEnumerator |
Show a text tag with the resource extracted and it's amount. Floats up the screen and then vanishes. Useful to show the player what the extractor is doing
|
|
TimedSabotageCoroutine ( float fTimer ) : IEnumerator |
Coroutine that implements the timed sabotage. First, sabotage the building. Then, after the timer expired, restore it to the functional status.
|
public IsIdle ( bool bnIdleStatus ) : void | ||
bnIdleStatus | bool | A boolean. True indicates that the building is temporaly idle, so it not /// produces anything. False the building is functional. /// |
return | void |
public PutAMonkeyInside ( Transform monkeyIn ) : void | ||
monkeyIn | Transform | Transform of the monkey that will be inside the building |
return | void |
public PutAMonkeyInsideRocket ( Transform tMonkey, CMonkey, eMonkeyClass ) : void | ||
tMonkey | Transform | |
eMonkeyClass | CMonkey, | |
return | void |
public ReceivePrisoner ( CMonkey monkeyPrisoner ) : void | ||
monkeyPrisoner | CMonkey | |
return | void |
public TemporarySabotage ( float fTimer ) : void | ||
fTimer | float | Time that the building will stay sabotaged |
return | void |
public Transform sabotagedParticleSystem | ||
return | Transform |