public override bool DoCheck(Construction.Placement place) { if (SocketMod_TerrainCheck.IsInTerrain(Vector3.op_Addition(place.position, Quaternion.op_Multiply(place.rotation, this.worldPosition))) == this.wantsInTerrain) { return(true); } Construction.lastPlacementError = this.fullName + ": not in terrain"; return(false); }
public override bool DoCheck(Construction.Placement place) { if (SocketMod_TerrainCheck.IsInTerrain(place.position + (place.rotation * this.worldPosition)) == this.wantsInTerrain) { return(true); } Construction.lastPlacementError = string.Concat(this.fullName, ": not in terrain"); return(false); }
private void OnDrawGizmos() { Gizmos.set_matrix(((Component)this).get_transform().get_localToWorldMatrix()); bool flag = SocketMod_TerrainCheck.IsInTerrain(((Component)this).get_transform().get_position()); if (!this.wantsInTerrain) { flag = !flag; } Gizmos.set_color(flag ? Color.get_green() : Color.get_red()); Gizmos.DrawSphere(Vector3.get_zero(), 0.1f); }
private void OnDrawGizmos() { Gizmos.matrix = base.transform.localToWorldMatrix; bool flag = SocketMod_TerrainCheck.IsInTerrain(base.transform.position); if (!this.wantsInTerrain) { flag = !flag; } Gizmos.color = (flag ? Color.green : Color.red); Gizmos.DrawSphere(Vector3.zero, 0.1f); }