1 line
9.4 KiB
JSON
1 line
9.4 KiB
JSON
{"identifier":{"url":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["visionOS"],"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Habitat"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"text":"Overview","type":"heading","anchor":"overview","level":2},{"inlineContent":[{"type":"text","text":"Sloths love hanging out in rain forests, and are especially grateful for hot and humid habitats."},{"type":"text","text":" "},{"type":"text","text":"They spend much of their time asleep, so make sure the habitats you create provide"},{"text":" ","type":"text"},{"type":"text","text":"comfortable and reliable branches in a large number of trees for them to feel safe and"},{"type":"text","text":" "},{"type":"text","text":"protected."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"The warmth and humidity of the habitat affect how much a sloth’s ","type":"text"},{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/energyLevel","isActive":true,"type":"reference"},{"text":" ","type":"text"},{"type":"text","text":"increases when they sleep:"}]},{"code":["let lovelyHabitat = Habitat(isHumid: true, isWarm: true)","let coldDryHabitat = Habitat(isHumid: false, isWarm: false)","","warmSloth.sleep(in: lovelyHabitat)","icySloth.sleep(in: coldDryHabitat, for: 22)"],"syntax":"swift","type":"codeListing"}],"kind":"content"}],"seeAlsoSections":[{"generated":true,"title":"Sloth Creation","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothGenerator","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/NameGenerator"],"anchor":"Sloth-Creation"}],"sections":[],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Habitat"}],"symbolKind":"struct","role":"symbol","roleHeading":"Structure","title":"Habitat","externalID":"s:12SlothCreator7HabitatV","navigatorTitle":[{"text":"Habitat","kind":"identifier"}],"modules":[{"name":"SlothCreator"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/slothcreator\/habitat"]}],"hierarchy":{"paths":[["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"The habitat where sloths live.","type":"text"}],"topicSections":[{"title":"Creating a Habitat","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/init(isHumid:isWarm:)"],"anchor":"Creating-a-Habitat"},{"anchor":"Configuring-the-Climate","title":"Configuring the Climate","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/isWarm","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/isHumid"]},{"anchor":"Checking-the-Climate","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/comfortLevel"],"title":"Checking the Climate"}],"references":{"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Habitat/comfortLevel":{"title":"comfortLevel","abstract":[{"text":"An indicator of how comfortable a sloth might find the habitat.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/comfortLevel","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"comfortLevel","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"}],"url":"\/documentation\/slothcreator\/habitat\/comfortlevel","kind":"symbol","role":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/energyLevel":{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/energyLevel","role":"symbol","url":"\/documentation\/slothcreator\/sloth\/energylevel","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"energyLevel","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"}],"title":"energyLevel","abstract":[{"text":"The energy level of the sloth.","type":"text"}],"kind":"symbol","type":"topic"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Habitat/init(isHumid:isWarm:)":{"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/init(isHumid:isWarm:)","url":"\/documentation\/slothcreator\/habitat\/init(ishumid:iswarm:)","role":"symbol","kind":"symbol","title":"init(isHumid:isWarm:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"isHumid"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"},{"kind":"text","text":", "},{"kind":"externalParam","text":"isWarm"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"text":")","kind":"text"}],"abstract":[{"type":"text","text":"Creates a habitat with the specified humidity and temperature."}],"type":"topic"},"slothCreator-icon.png":{"identifier":"slothCreator-icon.png","alt":"A technology icon representing the SlothCreator framework.","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/slothCreator-icon@2x.png","traits":["2x","light"]}],"type":"image"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/SlothGenerator":{"navigatorTitle":[{"text":"SlothGenerator","kind":"identifier"}],"url":"\/documentation\/slothcreator\/slothgenerator","abstract":[{"text":"A type that generates sloths.","type":"text"}],"title":"SlothGenerator","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothGenerator","kind":"symbol","role":"symbol","type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SlothGenerator"}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Habitat/isHumid":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isHumid","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"kind":"symbol","role":"symbol","url":"\/documentation\/slothcreator\/habitat\/ishumid","abstract":[{"text":"An indicator of whether the habitat is humid.","type":"text"}],"title":"isHumid","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/isHumid","type":"topic"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/NameGenerator":{"url":"\/documentation\/slothcreator\/namegenerator","kind":"symbol","abstract":[{"text":"A type that generates names for sloths.","type":"text"}],"type":"topic","navigatorTitle":[{"text":"NameGenerator","kind":"identifier"}],"title":"NameGenerator","role":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/NameGenerator","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"NameGenerator","kind":"identifier"}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator":{"url":"\/documentation\/slothcreator","type":"topic","abstract":[{"text":"Catalog sloths you find in nature and create new adorable virtual sloths.","type":"text"}],"images":[{"identifier":"slothCreator-icon.png","type":"icon"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator","title":"SlothCreator","role":"collection","kind":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Habitat":{"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Habitat","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat","url":"\/documentation\/slothcreator\/habitat","title":"Habitat","abstract":[{"text":"The habitat where sloths live.","type":"text"}],"type":"topic","navigatorTitle":[{"text":"Habitat","kind":"identifier"}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Habitat/isWarm":{"url":"\/documentation\/slothcreator\/habitat\/iswarm","type":"topic","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Habitat\/isWarm","role":"symbol","kind":"symbol","abstract":[{"text":"An indicator of whether the habitat is warm.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isWarm","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"title":"isWarm"}}} |