C# Class BaseTrigger, Unity-Free-Flight

Features: Posicionamento e redimensionamento automático por lista: (Lane mais próxima, mais distante e ambas) Tipo: (Trigger, Collider ou Ambos) Evento de Ativacao e Desativacao (Quando Entra, Sai ou Nunca) Condição de Destruição (QUando Entrar, Quando Sair, ou Nunca) Delays para ativar, desativar e destruir. (Warnings adicionados para casos de valores conflitantes nos delays ) Tipo de Checagem de Objeto (Por Nome, Tag ou Ambos) Input dos ativadores em Array, armazenamento em Lista, para maior failidade de manuseio (Add, Remove, etc). Bugs Conhecidos:
Inheritance: MonoBehaviour
Exibir arquivo Open project: NickolausDS/Unity-Free-Flight Class Usage Examples

Public Properties

Property Type Description
chainToTrigger BaseTrigger,
delaySecsAfterAction float
delaySecsToAction float
delaySecsToCondition float

Public Methods

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

Reset the Trigger so it can be used again. Note, that Start() needs to be called seperate from this method, which is done automatically if this script is started with: enabled=true

Protected Methods

Method Description
action ( ) : void

Called when the condition returns true. Afterward, the Trigger is disabled, and the next Chain trigger enabled (if it exists). delaySecsAfterAction waits before terminating the trigger.

condition ( ) : bool

The condition is called every frame update until it returns true. We wait for delaySecsToAction before firing the action, after this method returns true.

initialAction ( ) : void

Any initialization you want to happen *before* we start checking the condition. Initialization waits for delaySecsToCondition before calling this method.

Method Details

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

action() protected abstract method

Called when the condition returns true. Afterward, the Trigger is disabled, and the next Chain trigger enabled (if it exists). delaySecsAfterAction waits before terminating the trigger.
protected abstract action ( ) : void
return void

condition() protected abstract method

The condition is called every frame update until it returns true. We wait for delaySecsToAction before firing the action, after this method returns true.
protected abstract condition ( ) : bool
return bool

initialAction() protected abstract method

Any initialization you want to happen *before* we start checking the condition. Initialization waits for delaySecsToCondition before calling this method.
protected abstract initialAction ( ) : void
return void

reset() public method

Reset the Trigger so it can be used again. Note, that Start() needs to be called seperate from this method, which is done automatically if this script is started with: enabled=true
public reset ( ) : void
return void

Property Details

chainToTrigger public_oe property

public BaseTrigger, chainToTrigger
return BaseTrigger,

delaySecsAfterAction public_oe property

public float delaySecsAfterAction
return float

delaySecsToAction public_oe property

public float delaySecsToAction
return float

delaySecsToCondition public_oe property

public float delaySecsToCondition
return float