1 line
9.4 KiB
JSON
Raw Normal View History

{"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","preci