public void OnTrigger(Collider2D trigger)
        {
            if (StaticUtilities.CheckIdentity <Controllers.Bouncer>(trigger.gameObject))
            {
                Controllers.Bouncer bc = StaticUtilities.ReturnControllerFromTrigger <Controllers.Bouncer>(trigger);

                if (!gm.GetService <LightsController>().lightsOn)
                {
                    if (bc.currentState.BouncerKnockable())
                    {
                        OnKnockTarget?.Invoke(trigger.gameObject);
                    }
                }
            }
        }
Exemple #2
0
        public void OnTrigger(Collider2D trigger)
        {
            Debug.Log((CurrentlyActive + " currently active" + this.GetType()));
            Debug.Log("trigger fired: " + this.GetType());

            if (!isLocked)
            {
                if (StaticUtilities.CheckIdentity <Controllers.Bouncer>(trigger.gameObject))
                {
                    Controllers.Bouncer bc = trigger.gameObject.GetComponentInParent <Controllers.Bouncer>();

                    if (bc.currentState.BouncerKnockable())
                    {
                        OnKnockTarget?.Invoke(trigger.gameObject);
                    }
                }
            }
        }
Exemple #3
0
        public void OnTrigger(Collider2D trigger)
        {
//            Debug.Log("triggered: " + trig.gameObject.name);

            if (StaticUtilities.CheckIdentity <Controllers.Bouncer>(trigger.gameObject))
            {
                Controllers.Bouncer bc = trigger.gameObject.GetComponentInParent <Controllers.Bouncer>();

//                Debug.Log("bc = " + bc + " || lights on: " + gm.GetService<LightsController>().lightsOn);

                if (!gm.GetService <LightsController>().lightsOn)
                {
                    if (bc.currentState.BouncerKnockable())
                    {
                        OnKnockTarget?.Invoke(trigger.gameObject);
                    }
                }
            }
        }