Beispiel #1
0
    public void DisconnectPhysics(Physics other)
    {
        if (!_connectedPhysics.ContainsKey(other))
        {
            return;
        }

        _connectedPhysics.Remove(other);
        other.enabled = true;
        RaycastLaunchers.RemoveAll(x => other.RaycastLaunchers.Contains(x));
    }
Beispiel #2
0
    public void CombinePhysics(Physics other)
    {
        if (_connectedPhysics.ContainsKey(other))
        {
            return;
        }

        _connectedPhysics.Add(other, other.RaycastLaunchers);
        other.enabled = false;
        RaycastLaunchers.AddRange(other.RaycastLaunchers);
    }