Beispiel #1
0
    private void Start()
    {
        _health        = objective.GetComponent <Health>();
        _health.onDie += OnDie;

        _trans = GetComponent <AutoTranslation>();
    }
Beispiel #2
0
    // Start is called before the first frame update
    private void Start()
    {
        _health        = GetComponent <Health>();
        _health.onDie += OnDie;

        if (isToggle)
        {
            _rhealth = GetComponent <ResettableHealth>();
            if (!_rhealth)
            {
                throw new MissingComponentException("Toggleable trigger requires ResettableHealth");
            }
        }

        _trans            = GetComponent <AutoTranslation>();
        _trans.OnStopped += StoppedMoving;
    }