1 line
9.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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