public virtual bool CheckForValidDrop(Vector3 position) { GameObject obj = GridRaycaster.GetObject(position, Layers.TERRAIN); if (obj == null) { return(false); } return(true); }
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); } }