C# Class OnProximity, SlashRunner

Activates the specified components when this object is close enough to the target object.
Inheritance: MonoBehaviour
Exibir arquivo Open project: matthewAURA/SlashRunner Class Usage Examples

Public Properties

Property Type Description
activateDistance double
componentNames string
onProximitySound UnityEngine.AudioClip
target GameObject

Public Methods

Method Description
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
PopulateComponentList ( ) : void

Parses the string of components and acquires references to these components, throwing an exception if one cannot be found

SetComponents ( bool option ) : void

Enables/disables all on-proximity components

Method Details

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

activateDistance public_oe property

Distance from the target at which the components activate
public double activateDistance
return double

componentNames public_oe property

Semicolon-seperated class component names that are to be activated on a certain distance from target
public string componentNames
return string

onProximitySound public_oe property

public AudioClip,UnityEngine onProximitySound
return UnityEngine.AudioClip

target public_oe property

Components activate when target is close enough
public GameObject target
return GameObject