C# 클래스 MainScript, astrochimps

상속: MonoBehaviour
파일 보기 프로젝트 열기: arcoelho01/astrochimps 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
HUD int
MonkeyAstronaut Transform
MonkeyCientist Transform
MonkeyEngineer Transform
MonkeySaboteur Transform
Script MainScript
alliedLayer int
bnIsTheGamePaused bool
bnOnCutscene bool
bottomMenu GUIBottomMenu
cbCommandCenter CBuilding
cbResearchLab CBuilding
enemyLayer int
groundLayer int
isMinimapEnabled bool
lBoardedMonkeys List
lcRocketParts List
minimapGroundLayer int
minimapLayer int
mouseInputScript MouseWorldPosition
neutralLayer int
player CPlayer
playerObject Transform
prefabCaptureRay Transform
prefabDefeatByDeath Transform
prefabExtractor Transform
prefabFazenda Transform
prefabForceField Transform
prefabLaboratorio Transform
prefabUnderConstructionBox Transform
prefabVictorySequence Transform
questManager QuestManager
tLaunchingPlatform Transform

공개 메소드들

메소드 설명
ChangeDroneTeamAndUpdateList ( Transform droneObject, int droneLayer ) : void

Updates the drone's list when one of them change teams

CheckIfAllMonkeysAreBoarded ( ) : void

Check if we have all the monkeys boarded in the rocket. If so, the game was won!

CheckIfAllMonkeysAreConvicts ( ) : void

Check if we all our monkeys are not under prison. If so, we lost the game. Usually, this function is called when a drone delivers a monkey to a prison

CheckIfAreEnoughResourcesToBuild ( Transform objectToBuild ) : bool

Just check if we have enough resources to build this unit/structure

CheckIfTargetColliderIsInRange ( Vector3 callerPosition, Transform tTarget, int targetLayer, float fRadius ) : bool

Check for enemies (collider, actually) inside a radius

CheckIfTargetIsInRange ( Transform tAttacker, Transform tTarget, float fAttackRange ) : bool

Check if a target is in the range of this unit, projecting it's position in the 2D floor plane (only uses x and z coordinates)

CheckIfWeHaveOxygen ( ) : void

Check if we have enough oxygen to keep the monkeys alive

DeployUnderConstructionBox ( Transform builtOver, Transform prefabToBuild, Vector3 position, float buildTime ) : void

Create an instance of an 'Under Construction Box'

DeployUnderConstructionBox ( Vector3 position, float buildTime ) : void

Overloaded method: only deploys the construction box, wait the time and then destroy it. Doesn't instantiate the new building

GetCurrentUnitsInScene ( ) : void

Get all units in the scene, filters them and add them to the corresponding list

GetListOfAllAlliedBuildings ( ) : List
GetListOfAllMonkeys ( ) : List

Returns the list of all monkeys currently in the game

GetListOfAllNeutralResources ( ) : List
GetListOfAllRocketParts ( ) : List

Returns the list of all rocket parts transforms found in the scene

GetListOfAllRocketPartsComponents ( ) : List

Returns the list of all rocket parts CRocketPart components for the parts found in the scene

ReceiveNewEvent ( Transform trSender, QuestManager eEvent ) : void

Receive an event

getExtractRate ( ) : float
getFabricRate ( ) : float
getTaxaConsumoOxigenio ( ) : float
setDroneVisaoAumentada ( ) : void
setDroneVisaoNormal ( ) : void
setExtractRate ( float rate ) : void
setFabricRate ( float rate ) : void
setTaxaConsumoOxigenio ( float rate ) : void

비공개 메소드들

메소드 설명
Awake ( ) : void
CheckInputKeys ( ) : void

Check for user input

DeployConstructionBox ( Vector3 position, float timeToBuild ) : IEnumerator

Create a version of Freddy's construction box

DoCheatingStuff ( ) : void

Do some cheats, for development purposes only

GameOverStartDeathByAsphyxiationSequence ( ) : void

Call the scenes when the player has no oxygen left, so the monkeys die asphyxiated

GameOverStartJailedSequence ( ) : void

What happens when the game is lost For now this happens when all player's monkeys are in jail

GameOverStartVictorySequence ( ) : void
GetCurrentDronesInScene ( ) : void

Get all drones in the scene

GetCurrentRocketPartsInScene ( ) : void

Get all the rocket parts currently in the game

GetMonkeysObjects ( ) : void

Get all monkeys in the scene, sort them by class and add their transforms to the variables declared up in this script. With this, we get shortcuts to them

Start ( ) : void
Update ( ) : void

메소드 상세

ChangeDroneTeamAndUpdateList() 공개 메소드

Updates the drone's list when one of them change teams
public ChangeDroneTeamAndUpdateList ( Transform droneObject, int droneLayer ) : void
droneObject Transform
droneLayer int
리턴 void

CheckIfAllMonkeysAreBoarded() 공개 메소드

Check if we have all the monkeys boarded in the rocket. If so, the game was won!
public CheckIfAllMonkeysAreBoarded ( ) : void
리턴 void

CheckIfAllMonkeysAreConvicts() 공개 메소드

Check if we all our monkeys are not under prison. If so, we lost the game. Usually, this function is called when a drone delivers a monkey to a prison
public CheckIfAllMonkeysAreConvicts ( ) : void
리턴 void

CheckIfAreEnoughResourcesToBuild() 공개 메소드

Just check if we have enough resources to build this unit/structure
public CheckIfAreEnoughResourcesToBuild ( Transform objectToBuild ) : bool
objectToBuild Transform
리턴 bool

CheckIfTargetColliderIsInRange() 공개 메소드

Check for enemies (collider, actually) inside a radius
public CheckIfTargetColliderIsInRange ( Vector3 callerPosition, Transform tTarget, int targetLayer, float fRadius ) : bool
callerPosition Vector3 The position to be the sphere center. Usually is the center of the caller's /// collider
tTarget Transform Target's transform, so we can filter the colliders inside the radius and know for /// sure if we touched the target
targetLayer int Target's layer, used for filtering colliders
fRadius float Radius of the sphere where we will check for other objects presence. Usually the /// caller's attack radius
리턴 bool

CheckIfTargetIsInRange() 공개 메소드

Check if a target is in the range of this unit, projecting it's position in the 2D floor plane (only uses x and z coordinates)
public CheckIfTargetIsInRange ( Transform tAttacker, Transform tTarget, float fAttackRange ) : bool
tAttacker Transform Transform of the attacker
tTarget Transform Transform of the target
fAttackRange float A float with the range of the attack
리턴 bool

CheckIfWeHaveOxygen() 공개 메소드

Check if we have enough oxygen to keep the monkeys alive
public CheckIfWeHaveOxygen ( ) : void
리턴 void

DeployUnderConstructionBox() 공개 메소드

Create an instance of an 'Under Construction Box'
public DeployUnderConstructionBox ( Transform builtOver, Transform prefabToBuild, Vector3 position, float buildTime ) : void
builtOver Transform Transform of the object where this Box is built. With this, we can pass a /// Resource back to a built extractor, for instance. We can call it as null
prefabToBuild Transform Prefab to the building which will be built we te timer is over.
position Vector3 A Vector3 with the position to create the box and instantiate the new building, /// if any
buildTime float Time to build the building. When it's over, it will instantiate a new building, /// show the complete animation and will destroy itself
리턴 void

DeployUnderConstructionBox() 공개 메소드

Overloaded method: only deploys the construction box, wait the time and then destroy it. Doesn't instantiate the new building
public DeployUnderConstructionBox ( Vector3 position, float buildTime ) : void
position Vector3 A Vector3 with the position to create the box
buildTime float Time to build the building. When it's over, will show the complete animation /// and will destroy itself
리턴 void

GetCurrentUnitsInScene() 공개 메소드

Get all units in the scene, filters them and add them to the corresponding list
public GetCurrentUnitsInScene ( ) : void
리턴 void

GetListOfAllAlliedBuildings() 공개 메소드

public GetListOfAllAlliedBuildings ( ) : List
리턴 List

GetListOfAllMonkeys() 공개 메소드

Returns the list of all monkeys currently in the game
public GetListOfAllMonkeys ( ) : List
리턴 List

GetListOfAllNeutralResources() 공개 메소드

public GetListOfAllNeutralResources ( ) : List
리턴 List

GetListOfAllRocketParts() 공개 메소드

Returns the list of all rocket parts transforms found in the scene
public GetListOfAllRocketParts ( ) : List
리턴 List

GetListOfAllRocketPartsComponents() 공개 메소드

Returns the list of all rocket parts CRocketPart components for the parts found in the scene
public GetListOfAllRocketPartsComponents ( ) : List
리턴 List

ReceiveNewEvent() 공개 메소드

Receive an event
public ReceiveNewEvent ( Transform trSender, QuestManager eEvent ) : void
trSender Transform Transform of the sender of this event
eEvent QuestManager EQuestEvents enum with the event
리턴 void

getExtractRate() 공개 정적인 메소드

public static getExtractRate ( ) : float
리턴 float

getFabricRate() 공개 정적인 메소드

public static getFabricRate ( ) : float
리턴 float

getTaxaConsumoOxigenio() 공개 메소드

public getTaxaConsumoOxigenio ( ) : float
리턴 float

setDroneVisaoAumentada() 공개 메소드

public setDroneVisaoAumentada ( ) : void
리턴 void

setDroneVisaoNormal() 공개 메소드

public setDroneVisaoNormal ( ) : void
리턴 void

setExtractRate() 공개 정적인 메소드

public static setExtractRate ( float rate ) : void
rate float
리턴 void

setFabricRate() 공개 정적인 메소드

public static setFabricRate ( float rate ) : void
rate float
리턴 void

setTaxaConsumoOxigenio() 공개 메소드

public setTaxaConsumoOxigenio ( float rate ) : void
rate float
리턴 void

프로퍼티 상세

HUD 공개적으로 정적으로 프로퍼티

public static int HUD
리턴 int

MonkeyAstronaut 공개적으로 정적으로 프로퍼티

public static Transform MonkeyAstronaut
리턴 Transform

MonkeyCientist 공개적으로 정적으로 프로퍼티

public static Transform MonkeyCientist
리턴 Transform

MonkeyEngineer 공개적으로 정적으로 프로퍼티

public static Transform MonkeyEngineer
리턴 Transform

MonkeySaboteur 공개적으로 정적으로 프로퍼티

public static Transform MonkeySaboteur
리턴 Transform

Script 공개적으로 정적으로 프로퍼티

public static MainScript Script
리턴 MainScript

alliedLayer 공개적으로 정적으로 프로퍼티

public static int alliedLayer
리턴 int

bnIsTheGamePaused 공개적으로 프로퍼티

public bool bnIsTheGamePaused
리턴 bool

bnOnCutscene 공개적으로 프로퍼티

public bool bnOnCutscene
리턴 bool

bottomMenu 공개적으로 프로퍼티

public GUIBottomMenu bottomMenu
리턴 GUIBottomMenu

cbCommandCenter 공개적으로 정적으로 프로퍼티

public static CBuilding cbCommandCenter
리턴 CBuilding

cbResearchLab 공개적으로 정적으로 프로퍼티

public static CBuilding cbResearchLab
리턴 CBuilding

enemyLayer 공개적으로 정적으로 프로퍼티

public static int enemyLayer
리턴 int

groundLayer 공개적으로 정적으로 프로퍼티

public static int groundLayer
리턴 int

isMinimapEnabled 공개적으로 프로퍼티

public bool isMinimapEnabled
리턴 bool

lBoardedMonkeys 공개적으로 프로퍼티

public List lBoardedMonkeys
리턴 List

lcRocketParts 공개적으로 정적으로 프로퍼티

public static List lcRocketParts
리턴 List

minimapGroundLayer 공개적으로 정적으로 프로퍼티

public static int minimapGroundLayer
리턴 int

minimapLayer 공개적으로 정적으로 프로퍼티

public static int minimapLayer
리턴 int

mouseInputScript 공개적으로 정적으로 프로퍼티

public static MouseWorldPosition mouseInputScript
리턴 MouseWorldPosition

neutralLayer 공개적으로 정적으로 프로퍼티

public static int neutralLayer
리턴 int

player 공개적으로 프로퍼티

public CPlayer player
리턴 CPlayer

playerObject 공개적으로 프로퍼티

public Transform playerObject
리턴 Transform

prefabCaptureRay 공개적으로 프로퍼티

public Transform prefabCaptureRay
리턴 Transform

prefabDefeatByDeath 공개적으로 프로퍼티

public Transform prefabDefeatByDeath
리턴 Transform

prefabExtractor 공개적으로 프로퍼티

public Transform prefabExtractor
리턴 Transform

prefabFazenda 공개적으로 프로퍼티

public Transform prefabFazenda
리턴 Transform

prefabForceField 공개적으로 프로퍼티

public Transform prefabForceField
리턴 Transform

prefabLaboratorio 공개적으로 프로퍼티

public Transform prefabLaboratorio
리턴 Transform

prefabUnderConstructionBox 공개적으로 프로퍼티

public Transform prefabUnderConstructionBox
리턴 Transform

prefabVictorySequence 공개적으로 프로퍼티

public Transform prefabVictorySequence
리턴 Transform

questManager 공개적으로 프로퍼티

public QuestManager questManager
리턴 QuestManager

tLaunchingPlatform 공개적으로 정적으로 프로퍼티

public static Transform tLaunchingPlatform
리턴 Transform