C# Класс 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:
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
chainToTrigger BaseTrigger,
delaySecsAfterAction float
delaySecsToAction float
delaySecsToCondition float

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

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

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

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

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

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

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

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

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

action() защищенный абстрактный Метод

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

condition() защищенный абстрактный Метод

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

initialAction() защищенный абстрактный Метод

Any initialization you want to happen *before* we start checking the condition. Initialization waits for delaySecsToCondition before calling this method.
protected abstract initialAction ( ) : void
Результат void

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

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

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

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

public BaseTrigger, chainToTrigger
Результат BaseTrigger,

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

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

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

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

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

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