private void OnPartPlaced(PartBehaviour part, SocketBehaviour socket)
    {
        if (part.GetComponent <AddonRemoveGrass>() == null)
        {
            return;
        }

        if (RemoveGrass)
        {
            StartCoroutine(RemoveGrassToPosition(part.transform.position, RemoveGrassRadius));
        }
    }
Exemplo n.º 2
0
    private void OnPartPlaced(PartBehaviour part, SocketBehaviour socket)
    {
        if (BuildManager.Instance.BuildingSupport != SupportType.TerrainCollider)
        {
            return;
        }

        if (part.GetComponent <AddonRemoveGrass>() == null)
        {
            return;
        }

        if (RemoveGrass)
        {
            if (!TerrainManager.Instance.CheckDetailtAt(transform.position, RemoveGrassRadius))
            {
                return;
            }

            StartCoroutine(RemoveGrassToPosition(part.transform.position, RemoveGrassRadius));
        }
    }