1 line
16 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.

{"abstract":[{"text":"A model representing a sloth.","type":"text"}],"seeAlsoSections":[{"title":"Essentials","anchor":"Essentials","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/GettingStarted","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothySample"],"generated":true}],"sections":[],"metadata":{"roleHeading":"Structure","title":"Sloth","symbolKind":"struct","externalID":"s:12SlothCreator0A0V","navigatorTitle":[{"text":"Sloth","kind":"identifier"}],"modules":[{"name":"SlothCreator"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Sloth","kind":"identifier"}],"role":"symbol"},"topicSections":[{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothGenerator"],"anchor":"Creating-a-Sloth","title":"Creating a Sloth"},{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/eat(_:quantity:)","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/sleep(in:for:)"],"anchor":"Engaging-in-Activities","title":"Engaging in Activities"},{"title":"Getting the Sloths Schedule","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/schedule"],"anchor":"Getting-the-Sloths-Schedule"},{"anchor":"Getting-the-Sloths-Identity","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/name"],"title":"Getting the Sloths Identity"},{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/color-swift.property","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/Color-swift.enum"],"anchor":"Getting-Visual-Attributes","title":"Getting Visual Attributes"},{"title":"Getting Magical Abilities","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/Power-swift.enum","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/energyLevel"],"anchor":"Getting-Magical-Abilities"}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["visionOS"],"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Sloth"}],"languages":["swift"]}]},{"content":[{"anchor":"overview","level":2,"text":"Overview","type":"heading"},{"inlineContent":[{"type":"text","text":"Sloths are mammals known for their slowness of movement. They spend most of their"},{"text":" ","type":"text"},{"text":"lives hanging upside down in trees.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"You can create a sloth using the ","type":"text"},{"type":"reference","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)","isActive":true},{"text":" initializer, or","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"create a randomly generated sloth using a "},{"type":"reference","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothGenerator","isActive":true},{"text":":","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["let slothGenerator = MySlothGenerator(seed: randomSeed())","let habitat = Habitat(isHumid: false, isWarm: true)","do {"," let sloth = try slothGenerator.generateSloth(in: habitat)","} catch {"," fatalError(String(describing: error))","}"]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/slothcreator\/sloth"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator"]]},"references":{"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/Sloth":{"title":"Sloth","navigatorTitle":[{"text":"Sloth","kind":"identifier"}],"type":"topic","url":"\/documentation\/slothcreator\/sloth","role":"symbol","kind":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Sloth"}],"abstract":[{"type":"text","text":"A model representing a sloth."}]},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/name":{"kind":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/name","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"name","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"}],"role":"symbol","abstract":[{"type":"text","text":"The name of the sloth."}],"title":"name","url":"\/documentation\/slothcreator\/sloth\/name","type":"topic"},"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/Sloth/power-swift.property":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"power","kind":"identifier"},{"kind":"text","text":": "},{"text":"Power","kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator0A0V5PowerO"}],"type":"topic","kind":"symbol","title":"power","abstract":[{"text":"The power of the sloth.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","url":"\/documentation\/slothcreator\/sloth\/power-swift.property","role":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/SlothySample":{"type":"topic","abstract":[{"type":"text","text":"Integrate SlothCreator into an iOS app for creating and caring"},{"text":" ","type":"text"},{"text":"for custom sloths.","type":"text"}],"role":"sampleCode","images":[{"type":"card","identifier":"slothy-card.png"}],"url":"\/documentation\/slothcreator\/slothysample","kind":"article","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/SlothySample","title":"Slothy: Integrating SlothCreator into an App"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/color-swift.property":{"type":"topic","abstract":[{"text":"The color of the sloth.","type":"text"}],"role":"symbol","url":"\/documentation\/slothcreator\/sloth\/color-swift.property","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"color","kind":"identifier"},{"kind":"text","text":": "},{"text":"Color","kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator0A0V5ColorO"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/color-swift.property","title":"color"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/Color-swift.enum":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Color"}],"url":"\/documentation\/slothcreator\/sloth\/color-swift.enum","kind":"symbol","type":"topic","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/Color-swift.enum","role":"symbol","title":"Sloth.Color","navigatorTitle":[{"text":"Color","kind":"identifier"}],"abstract":[{"text":"The color of a sloth.","type":"text"}]},"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","identifier":"slothCreator-icon.png"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/Power-swift.enum":{"role":"symbol","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/Power-swift.enum","navigatorTitle":[{"kind":"identifier","text":"Power"}],"kind":"symbol","url":"\/documentation\/slothcreator\/sloth\/power-swift.enum","title":"Sloth.Power","type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"Power","kind":"identifier"}],"abstract":[{"text":"The power of a sloth.","type":"text"}]},"gettingStarted-card.png":{"alt":"The profile images for a regular sloth and an ice sloth.","variants":[{"traits":["2x","light"],"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/gettingStarted-card@2x.png"}],"type":"image","identifier":"gettingStarted-card.png"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/init(name:color:power:)":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"name","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"color"},{"text":": ","kind":"text"},{"text":"Color","kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator0A0V5ColorO"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"power"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator0A0V5PowerO","text":"Power"},{"text":")","kind":"text"}],"type":"topic","kind":"symbol","title":"init(name:color:power:)","abstract":[{"text":"Creates a sloth with the specified name and color.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)","url":"\/documentation\/slothcreator\/sloth\/init(name:color:power:)","role":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/GettingStarted":{"url":"\/documentation\/slothcreator\/gettingstarted","kind":"article","abstract":[{"type":"text","text":"Create a sloth and assign personality traits and abilities."}],"role":"article","images":[{"type":"card","identifier":"gettingStarted-card.png"}],"type":"topic","title":"Getting Started with Sloths","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/GettingStarted"},"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"}]},"slothy-card.png":{"alt":"Two screenshots showing the Slothy app. The first screenshot shows a sloth map and the second screenshot shows a sloth power picker.","variants":[{"url":"\/images\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/slothy-card@2x.png","traits":["2x","light"]}],"type":"image","identifier":"slothy-card.png"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/sleep(in:for:)":{"title":"sleep(in:for:)","abstract":[{"text":"Sleep in the specified habitat for a number of hours.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/sleep(in:for:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"sleep"},{"text":"(","kind":"text"},{"text":"in","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Habitat","kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator7HabitatV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"for"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"url":"\/documentation\/slothcreator\/sloth\/sleep(in:for:)","kind":"symbol","role":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/eat(_:quantity:)":{"title":"eat(_:quantity:)","kind":"symbol","type":"topic","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/eat(_:quantity:)","abstract":[{"text":"Eat the provided specialty sloth food.","type":"text"}],"url":"\/documentation\/slothcreator\/sloth\/eat(_:quantity:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"eat","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Food","kind":"typeIdentifier","preciseIdentifier":"s:12SlothCreator0A0V4FoodV"},{"text":", ","kind":"text"},{"text":"quantity","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"}],"role":"symbol"},"doc://slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator/documentation/SlothCreator/Sloth/schedule":{"title":"schedule","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"schedule"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"CareSchedule","preciseIdentifier":"s:12SlothCreator12CareScheduleV"}],"kind":"symbol","abstract":[{"text":"The care schedule of the sloth.","type":"text"}],"identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-3.SlothCreator\/documentation\/SlothCreator\/Sloth\/schedule","url":"\/documentation\/slothcreator\/sloth\/schedule","type":"topic","role":"symbol"}}}