示例#1
0
    private void CheckCollision(Collider_ trigger, Collider_ receiver)
    {
        var mask    = trigger.targetMask;
        var touched = trigger.Touched(receiver);
        var test    = (!trigger.ignoreSameGroup || trigger.transform.parent != receiver.transform.parent) && mask.BitMask(receiver.layer);

        if (test)
        {
            test = trigger.isActiveAndEnabled && receiver.isActiveAndEnabled && trigger.CollisionTest(receiver);
        }

        if (touched != test)
        {
            FightRecordManager.RecordLog <LogCheckCollider>(l =>
            {
                l.tag             = (byte)TagType.LogCheckCollider;
                l.test            = test;
                l.ignoreSameGroup = trigger.ignoreSameGroup;
                l.mask            = mask;
                l.layer           = receiver.layer;
            });
        }
        UpdateTouched(trigger, receiver, touched, test);
    }
示例#2
0
 public override bool CollisionTest(Collider_ other)
 {
     return(other.CollisionTest(ref m_sphere));
 }