C# Class CBaseEntity, astrochimps

Basic class for monkeys and drones
Inheritance: MonoBehaviour
Afficher le fichier Open project: arcoelho01/astrochimps Class Usage Examples

Méthodes publiques

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

Свойство Type Description
captureRaySpot Transform
captureSpot Transform
capturedEntity CBaseEntity,
capturer Transform
meshObject Transform
selectorRadius float
sweetSpot Vector3
sweetSpotObj Transform

Méthodes publiques

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

Méthodes protégées

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

What to do when this entity is attacked
public Attacked ( ) : void
Résultat void

BuildIt() public méthode

Declaration of the build function
public BuildIt ( ) : void
Résultat void

CapturedBy() public méthode

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
Résultat void

CheckIfHaveSomethingCaptured() public méthode

Check if this unit is carrying something or someone
public CheckIfHaveSomethingCaptured ( ) : bool
Résultat bool

CreateSelector() public méthode

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

Deselect() public méthode

Deselect the current object, if possible
public Deselect ( ) : void
Résultat void

GetCaptureRaySpot() protected méthode

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
Résultat Transform

GetCaptureSpot() protected méthode

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

GetMeshObject() protected méthode

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

GetSweetSpotAndMeshObject() protected méthode

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

GetSweetSpotPosition() protected méthode

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

IWasSetToVisible() public méthode

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

ReleaseMe() public méthode

Release the captured object
public ReleaseMe ( ) : void
Résultat void

Select() public méthode

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
Résultat Transform

Start() public méthode

public Start ( ) : void
Résultat void

Work() public méthode

Do whatever this building is supposed to do
public Work ( ) : void
Résultat void

Property Details

Movable public_oe property

public bool Movable
Résultat bool

Name public_oe property

public string Name
Résultat string

Selectable public_oe property

public bool Selectable
Résultat bool

Team public_oe property

public eObjTeam Team
Résultat eObjTeam

Type public_oe property

public eObjType Type
Résultat eObjType

canBeCaptured public_oe property

public bool canBeCaptured
Résultat bool

captureRaySpot protected_oe property

protected Transform captureRaySpot
Résultat Transform

captureSpot protected_oe property

protected Transform captureSpot
Résultat Transform

capturedEntity protected_oe property

protected CBaseEntity, capturedEntity
Résultat CBaseEntity,

capturer protected_oe property

protected Transform capturer
Résultat Transform

costMetal public_oe property

public float costMetal
Résultat float

costTime public_oe property

public float costTime
Résultat float

isCaptured public_oe property

public bool isCaptured
Résultat bool

mainRendererObject public_oe property

public Transform mainRendererObject
Résultat Transform

mainScript public_oe property

public MainScript, mainScript
Résultat MainScript,

materialDisabled public_oe property

public Material materialDisabled
Résultat Material

meshObject protected_oe property

protected Transform meshObject
Résultat Transform

progressBarPrefab public_oe property

public Transform progressBarPrefab
Résultat Transform

selectorObject public_oe property

public Transform selectorObject
Résultat Transform

selectorRadius protected_oe property

protected float selectorRadius
Résultat float

sweetSpot protected_oe property

protected Vector3 sweetSpot
Résultat Vector3

sweetSpotObj protected_oe property

protected Transform sweetSpotObj
Résultat Transform