C# 클래스 CBuilding, astrochimps

Class with building definitions
상속: CBaseEntity
파일 보기 프로젝트 열기: arcoelho01/astrochimps 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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.

메소드 상세

Awake() 공개 메소드

When the script is initialized
public Awake ( ) : void
리턴 void

BuildIt() 공개 메소드

Create an instance of the selected building, place it and activate it
public BuildIt ( ) : void
리턴 void

Desabotage() 공개 메소드

"Desabotage" (is this a real word?) this building, removing the visual aid to the player
public Desabotage ( ) : void
리턴 void

ExtractResource() 공개 메소드

Extract resource from the resource site
public ExtractResource ( ) : void
리턴 void

FixByEngineer() 공개 메소드

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
public FixByEngineer ( ) : void
리턴 void

GetControlRoomSpot() 공개 메소드

Find the object "ControlSpot", which designates where the monkey should be when inside the building
public GetControlRoomSpot ( ) : void
리턴 void

GetExitSpot() 공개 메소드

Find the coordinates for the object 'ExitSpot', which designates where an unit should be when exiting the building
public GetExitSpot ( ) : void
리턴 void

GetExitSpotPosition() 공개 메소드

Returns the position of the exit spot of this building
public GetExitSpotPosition ( ) : Vector3
리턴 Vector3

GetTheMonkeyOut() 공개 메소드

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
public GetTheMonkeyOut ( ) : void
리턴 void

IsIdle() 공개 메소드

Change the status of this building.
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. ///
리턴 void

PutAMonkeyInside() 공개 메소드

Put a monkey inside this building. Building controller directly by monkey are more efficient somehow
public PutAMonkeyInside ( Transform monkeyIn ) : void
monkeyIn Transform Transform of the monkey that will be inside the building
리턴 void

PutAMonkeyInsideRocket() 공개 메소드

Put one of the monkey inside the rocket
public PutAMonkeyInsideRocket ( Transform tMonkey, CMonkey, eMonkeyClass ) : void
tMonkey Transform
eMonkeyClass CMonkey,
리턴 void

ReceivePrisoner() 공개 메소드

Receive a delivered prisoner
public ReceivePrisoner ( CMonkey monkeyPrisoner ) : void
monkeyPrisoner CMonkey
리턴 void

Sabotage() 공개 메소드

Sabotage this building, adding a visual aid to the player
public Sabotage ( ) : void
리턴 void

Select() 공개 메소드

public Select ( ) : Transform
리턴 Transform

TemporarySabotage() 공개 메소드

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
public TemporarySabotage ( float fTimer ) : void
fTimer float Time that the building will stay sabotaged
리턴 void

TheresAMonkeyInside() 공개 메소드

Check if there's a monkey inside this building
public TheresAMonkeyInside ( ) : Transform
리턴 Transform

Update() 공개 메소드

In this update, we do whatever the building is supposed to do
public Update ( ) : void
리턴 void

Work() 공개 메소드

Do whatever this building is suppose to do, according to his type
public Work ( ) : void
리턴 void

프로퍼티 상세

buildingType 공개적으로 프로퍼티

public eBuildingType buildingType
리턴 eBuildingType

conectado 공개적으로 프로퍼티

public bool conectado
리턴 bool

construido 공개적으로 프로퍼티

public bool construido
리턴 bool

idleStatus 공개적으로 프로퍼티

public bool idleStatus
리턴 bool

level 공개적으로 프로퍼티

public int level
리턴 int

monkeyInside 공개적으로 프로퍼티

public Transform monkeyInside
리턴 Transform

myTimer 공개적으로 프로퍼티

public float myTimer
리턴 float

resourceSite 공개적으로 프로퍼티

public CBaseEntity resourceSite
리턴 CBaseEntity

sabotado 공개적으로 프로퍼티

public bool sabotado
리턴 bool

sabotagedParticleSystem 공개적으로 프로퍼티

public Transform sabotagedParticleSystem
리턴 Transform

sfxLoadMonkey 공개적으로 프로퍼티

public AudioClip sfxLoadMonkey
리턴 AudioClip

sfxSabotados 공개적으로 프로퍼티

public AudioClip sfxSabotados
리턴 AudioClip

sfxSelected 공개적으로 프로퍼티

public AudioClip sfxSelected
리턴 AudioClip

showInfoObject 공개적으로 프로퍼티

public Transform showInfoObject
리턴 Transform

tipo 공개적으로 프로퍼티

public TipoEstrutura tipo
리턴 TipoEstrutura

vida 공개적으로 프로퍼티

public int vida
리턴 int

workTime 공개적으로 프로퍼티

public float workTime
리턴 float