Ejemplo n.º 1
0
    public virtual bool CheckForValidDrop(Vector3 position)
    {
        GameObject obj = GridRaycaster.GetObject(position, Layers.TERRAIN);

        if (obj == null)
        {
            return(false);
        }
        return(true);
    }
Ejemplo n.º 2
0
    public override bool CheckForValidDrop(Vector3 position)
    {
        LayerMask  layers = Layers.BUILDING | Layers.TERRAIN;
        GameObject obj    = GridRaycaster.GetObject(position, layers);

        if (obj == null)
        {
            return(false);
        }

        if (obj.GetComponent <Building>() == null)
        {
            return(true);
        }
        else
        {
            PowerPad pad = obj.GetComponent <PowerPad>();
            return(pad != null);
        }
    }