1 line
9.4 KiB
JSON
Raw Normal View History

{"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 sloths ","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\/comf