Ejemplo n.º 1
0
    public bool FindBoundsOfPrefab()
    {
        var pos = this.theEntity.position;
        prefab = GameManager.Instance.prefabLODManager.prefabsAroundNear.Values.FirstOrDefault(d => pos.x >= d.boundingBoxPosition.x && pos.x < d.boundingBoxPosition.x + d.boundingBoxSize.x && pos.z >= d.boundingBoxPosition.z && pos.z < d.boundingBoxPosition.z + d.boundingBoxSize.z);
        if (prefab == null)
        {
            DisplayLog(" I am not in a prefab. Returning false.");
            return false;
        }

        if (prefab.CheckForAnyPlayerHome(this.theEntity.world) != GameUtils.EPlayerHomeType.None)
        {
            DisplayLog(" This is a player's home. Not looting.");
            return false;
        }

        var prefabBounds = prefab.boundingBoxSize;

        return true;
    }
Ejemplo n.º 2
0
    public bool FindBoundsOfPrefab()
    {
        var pos = this.theEntity.position;

        FindPrefabsNear();
        prefab = FindPrefabsNear();
        if (prefab == null)
        {
            DisplayLog(" I am not in a prefab. Returning false.");
            return(false);
        }

        if (prefab.CheckForAnyPlayerHome(this.theEntity.world) != GameUtils.EPlayerHomeType.None)
        {
            DisplayLog(" This is a player's home. Not looting.");
            return(false);
        }

        var prefabBounds = prefab.boundingBoxSize;

        return(true);
    }