Beispiel #1
0
    public virtual void OnEnable()
    {
        if (triggerEvaluationNeedsUpdateMethod || fireContinuously)
        {
            PsaiCoreManager pcm = PsaiCoreManager.Instance;
            if (pcm != null)
            {
                pcm.RegisterContinuousTrigger(this);
                triggerGetsEvaluatedByPsaiCoreManager = true;
            }
        }

        _triggerConditionsInGameObject = this.gameObject.GetComponents <PsaiTriggerCondition>();
    }
Beispiel #2
0
    public virtual void OnDisable()
    {
        if (triggerGetsEvaluatedByPsaiCoreManager)
        {
            PsaiCoreManager pcm = PsaiCoreManager.Instance;
            if (pcm != null)
            {
                pcm.UnregisterContinuousTrigger(this);
                triggerGetsEvaluatedByPsaiCoreManager = false;
            }
        }

        if (resetHasFiredStateOnDisable)
        {
            hasFired = false;
        }
    }
Beispiel #3
0
 void Awake()
 {
     psai = Instantiate(go).GetComponent <PsaiCoreManager>();
 }