C# Class Unit, ES2015C

Inheritance: MonoBehaviour
Show file Open project: jgirald/ES2015C Class Usage Examples

Public Properties

Property Type Description
visibility float

Protected Properties

Property Type Description
doSound AudioClip
idleSound AudioClip
moving bool
running bool
runningSound AudioClip
walkingSound AudioClip

Public Methods

Method Description
FindClosest ( string tag ) : GameObject
GoTo ( Vector3 target, bool isRunning ) : void
makeDoSound ( ) : void

Protected Methods

Method Description
AimAtTarget ( ) : void
Animating ( ) : void
Awake ( ) : void
CancelPath ( ) : void

Tell the unit to cancel the movement path to the given position.

HasPath ( ) : bool

Tell the unit to cancel the movement path to the given position.

OnGUI ( ) : void
OnMouseDown ( ) : void
SetNewPath ( Vector3 target, bool isRunning ) : void

Tells the unit to move to the given position, by generating and following a route to the desired position.

Update ( ) : void
UseWeapon ( ) : void
chargeSounds ( string objectName ) : void

Private Methods

Method Description
FittedCharacterCollider ( ) : void
OnPathComplete ( Path newPath ) : void
moveToPosition ( ) : void

Method Details

AimAtTarget() protected method

protected AimAtTarget ( ) : void
return void

Animating() protected method

protected Animating ( ) : void
return void

Awake() protected method

protected Awake ( ) : void
return void

CancelPath() protected method

Tell the unit to cancel the movement path to the given position.
protected CancelPath ( ) : void
return void

FindClosest() public method

public FindClosest ( string tag ) : GameObject
tag string
return GameObject

GoTo() public method

public GoTo ( Vector3 target, bool isRunning ) : void
target Vector3
isRunning bool
return void

HasPath() protected method

Tell the unit to cancel the movement path to the given position.
protected HasPath ( ) : bool
return bool

OnGUI() protected method

protected OnGUI ( ) : void
return void

OnMouseDown() protected method

protected OnMouseDown ( ) : void
return void

SetNewPath() protected method

Tells the unit to move to the given position, by generating and following a route to the desired position.
protected SetNewPath ( Vector3 target, bool isRunning ) : void
target Vector3 The position we want the unit to move to.
isRunning bool
return void

Update() protected method

protected Update ( ) : void
return void

UseWeapon() protected method

protected UseWeapon ( ) : void
return void

chargeSounds() protected method

protected chargeSounds ( string objectName ) : void
objectName string
return void

makeDoSound() public method

public makeDoSound ( ) : void
return void

Property Details

doSound protected property

protected AudioClip doSound
return AudioClip

idleSound protected property

protected AudioClip idleSound
return AudioClip

moving protected property

protected bool moving
return bool

running protected property

protected bool running
return bool

runningSound protected property

protected AudioClip runningSound
return AudioClip

visibility public property

public float visibility
return float

walkingSound protected property

protected AudioClip walkingSound
return AudioClip