C# Class CBaseEntity, astrochimps

Basic class for monkeys and drones
Inheritance: MonoBehaviour
Mostra file Open project: arcoelho01/astrochimps Class Usage Examples

Public Properties

Property Type Description
Movable bool
Name string
Selectable bool
Team eObjTeam
Type eObjType
canBeCaptured bool
costMetal float
costTime float
isCaptured bool
mainRendererObject Transform
mainScript MainScript,
materialDisabled Material
progressBarPrefab Transform
selectorObject Transform

Protected Properties

Property Type Description
captureRaySpot Transform
captureSpot Transform
capturedEntity CBaseEntity,
capturer Transform
meshObject Transform
selectorRadius float
sweetSpot Vector3
sweetSpotObj Transform

Public Methods

Method Description
Attacked ( ) : void

What to do when this entity is attacked

BuildIt ( ) : void

Declaration of the build function

CapturedBy ( Transform capturer, Transform captureSpot, Transform captureRaySpot ) : void

Somebody captured this entity!

CheckIfHaveSomethingCaptured ( ) : bool

Check if this unit is carrying something or someone

CreateSelector ( ) : void

Instantiate the selector object, showing the user what object he selected

Deselect ( ) : void

Deselect the current object, if possible

IWasSetToVisible ( ) : void

The VisibilityControl script set me to visible. If this object is a resource, we should inform the Quest Manager

ReleaseMe ( ) : void

Release the captured object

Select ( ) : Transform

Runs whenever this object is selected in the game. Different objects have different behaviours. Monkeys and drones, when selected, have a cursor added to themselves.

Start ( ) : void
Work ( ) : void

Do whatever this building is supposed to do

Protected Methods

Method Description
GetCaptureRaySpot ( ) : Transform

Get the Capture Ray Spot object from the hierarchy, which is the spot from where the capture ray is shoot. Useful only for the cientist monkey and the hunter drones

GetCaptureSpot ( ) : Transform

Get the Capture Spot object from the hierarchy. Useful only for the cientist monkey and the hunter drones

GetMeshObject ( ) : Transform

Get the mesh object in the hierarchy, as this: Object -> collider | - Icon | - SweetSpot | - Mesh | - Imported FBX -> animation

GetSweetSpotAndMeshObject ( ) : void

Get the mesh object, the renderer and the sweet spot for this object

GetSweetSpotPosition ( ) : Vector3

Get the sweet spot position, if this object is defined. Otherwise, will return this object position

Method Details

Attacked() public method

What to do when this entity is attacked
public Attacked ( ) : void
return void

BuildIt() public method

Declaration of the build function
public BuildIt ( ) : void
return void

CapturedBy() public method

Somebody captured this entity!
public CapturedBy ( Transform capturer, Transform captureSpot, Transform captureRaySpot ) : void
capturer Transform Transform for who is capturing this object
captureSpot Transform Transform of the capture spot (inside the hierarchy of the capturer)
captureRaySpot Transform Transform of the spot from where the capture ray is shoot
return void

CheckIfHaveSomethingCaptured() public method

Check if this unit is carrying something or someone
public CheckIfHaveSomethingCaptured ( ) : bool
return bool

CreateSelector() public method

Instantiate the selector object, showing the user what object he selected
public CreateSelector ( ) : void
return void

Deselect() public method

Deselect the current object, if possible
public Deselect ( ) : void
return void

GetCaptureRaySpot() protected method

Get the Capture Ray Spot object from the hierarchy, which is the spot from where the capture ray is shoot. Useful only for the cientist monkey and the hunter drones
protected GetCaptureRaySpot ( ) : Transform
return Transform

GetCaptureSpot() protected method

Get the Capture Spot object from the hierarchy. Useful only for the cientist monkey and the hunter drones
protected GetCaptureSpot ( ) : Transform
return Transform

GetMeshObject() protected method

Get the mesh object in the hierarchy, as this: Object -> collider | - Icon | - SweetSpot | - Mesh | - Imported FBX -> animation
protected GetMeshObject ( ) : Transform
return Transform

GetSweetSpotAndMeshObject() protected method

Get the mesh object, the renderer and the sweet spot for this object
protected GetSweetSpotAndMeshObject ( ) : void
return void

GetSweetSpotPosition() protected method

Get the sweet spot position, if this object is defined. Otherwise, will return this object position
protected GetSweetSpotPosition ( ) : Vector3
return Vector3

IWasSetToVisible() public method

The VisibilityControl script set me to visible. If this object is a resource, we should inform the Quest Manager
public IWasSetToVisible ( ) : void
return void

ReleaseMe() public method

Release the captured object
public ReleaseMe ( ) : void
return void

Select() public method

Runs whenever this object is selected in the game. Different objects have different behaviours. Monkeys and drones, when selected, have a cursor added to themselves.
public Select ( ) : Transform
return Transform

Start() public method

public Start ( ) : void
return void

Work() public method

Do whatever this building is supposed to do
public Work ( ) : void
return void

Property Details

Movable public_oe property

public bool Movable
return bool

Name public_oe property

public string Name
return string

Selectable public_oe property

public bool Selectable
return bool

Team public_oe property

public eObjTeam Team
return eObjTeam

Type public_oe property

public eObjType Type
return eObjType

canBeCaptured public_oe property

public bool canBeCaptured
return bool

captureRaySpot protected_oe property

protected Transform captureRaySpot
return Transform

captureSpot protected_oe property

protected Transform captureSpot
return Transform

capturedEntity protected_oe property

protected CBaseEntity, capturedEntity
return CBaseEntity,

capturer protected_oe property

protected Transform capturer
return Transform

costMetal public_oe property

public float costMetal
return float

costTime public_oe property

public float costTime
return float

isCaptured public_oe property

public bool isCaptured
return bool

mainRendererObject public_oe property

public Transform mainRendererObject
return Transform

mainScript public_oe property

public MainScript, mainScript
return MainScript,

materialDisabled public_oe property

public Material materialDisabled
return Material

meshObject protected_oe property

protected Transform meshObject
return Transform

progressBarPrefab public_oe property

public Transform progressBarPrefab
return Transform

selectorObject public_oe property

public Transform selectorObject
return Transform

selectorRadius protected_oe property

protected float selectorRadius
return float

sweetSpot protected_oe property

protected Vector3 sweetSpot
return Vector3

sweetSpotObj protected_oe property

protected Transform sweetSpotObj
return Transform