C# Класс CBaseEntity, astrochimps

Basic class for monkeys and drones
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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)

Свойство Тип Описание
captureRaySpot Transform
captureSpot Transform
capturedEntity CBaseEntity,
capturer Transform
meshObject Transform
selectorRadius float
sweetSpot Vector3
sweetSpotObj Transform

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

Attacked() публичный Метод

What to do when this entity is attacked
public Attacked ( ) : void
Результат void

BuildIt() публичный Метод

Declaration of the build function
public BuildIt ( ) : void
Результат void

CapturedBy() публичный Метод

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
Результат void

CheckIfHaveSomethingCaptured() публичный Метод

Check if this unit is carrying something or someone
public CheckIfHaveSomethingCaptured ( ) : bool
Результат bool

CreateSelector() публичный Метод

Instantiate the selector object, showing the user what object he selected
public CreateSelector ( ) : void
Результат void

Deselect() публичный Метод

Deselect the current object, if possible
public Deselect ( ) : void
Результат void

GetCaptureRaySpot() защищенный Метод

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
Результат Transform

GetCaptureSpot() защищенный Метод

Get the Capture Spot object from the hierarchy. Useful only for the cientist monkey and the hunter drones
protected GetCaptureSpot ( ) : Transform
Результат Transform

GetMeshObject() защищенный Метод

Get the mesh object in the hierarchy, as this: Object -> collider | - Icon | - SweetSpot | - Mesh | - Imported FBX -> animation
protected GetMeshObject ( ) : Transform
Результат Transform

GetSweetSpotAndMeshObject() защищенный Метод

Get the mesh object, the renderer and the sweet spot for this object
protected GetSweetSpotAndMeshObject ( ) : void
Результат void

GetSweetSpotPosition() защищенный Метод

Get the sweet spot position, if this object is defined. Otherwise, will return this object position
protected GetSweetSpotPosition ( ) : Vector3
Результат Vector3

IWasSetToVisible() публичный Метод

The VisibilityControl script set me to visible. If this object is a resource, we should inform the Quest Manager
public IWasSetToVisible ( ) : void
Результат void

ReleaseMe() публичный Метод

Release the captured object
public ReleaseMe ( ) : void
Результат void

Select() публичный Метод

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
Результат Transform

Start() публичный Метод

public Start ( ) : void
Результат void

Work() публичный Метод

Do whatever this building is supposed to do
public Work ( ) : void
Результат void

Описание свойств

Movable публичное свойство

public bool Movable
Результат bool

Name публичное свойство

public string Name
Результат string

Selectable публичное свойство

public bool Selectable
Результат bool

Team публичное свойство

public eObjTeam Team
Результат eObjTeam

Type публичное свойство

public eObjType Type
Результат eObjType

canBeCaptured публичное свойство

public bool canBeCaptured
Результат bool

captureRaySpot защищенное свойство

protected Transform captureRaySpot
Результат Transform

captureSpot защищенное свойство

protected Transform captureSpot
Результат Transform

capturedEntity защищенное свойство

protected CBaseEntity, capturedEntity
Результат CBaseEntity,

capturer защищенное свойство

protected Transform capturer
Результат Transform

costMetal публичное свойство

public float costMetal
Результат float

costTime публичное свойство

public float costTime
Результат float

isCaptured публичное свойство

public bool isCaptured
Результат bool

mainRendererObject публичное свойство

public Transform mainRendererObject
Результат Transform

mainScript публичное свойство

public MainScript, mainScript
Результат MainScript,

materialDisabled публичное свойство

public Material materialDisabled
Результат Material

meshObject защищенное свойство

protected Transform meshObject
Результат Transform

progressBarPrefab публичное свойство

public Transform progressBarPrefab
Результат Transform

selectorObject публичное свойство

public Transform selectorObject
Результат Transform

selectorRadius защищенное свойство

protected float selectorRadius
Результат float

sweetSpot защищенное свойство

protected Vector3 sweetSpot
Результат Vector3

sweetSpotObj защищенное свойство

protected Transform sweetSpotObj
Результат Transform