1 line
16 KiB
JSON
1 line
16 KiB
JSON
|
{"metadata":{"title":"Sloth","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Sloth"}],"externalID":"s:12SlothCreator0A0V","roleHeading":"Structure","symbolKind":"struct","role":"symbol","modules":[{"name":"SlothCreator"}],"navigatorTitle":[{"kind":"identifier","text":"Sloth"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"topicSections":[{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothGenerator"],"title":"Creating a Sloth","anchor":"Creating-a-Sloth"},{"anchor":"Engaging-in-Activities","title":"Engaging in Activities","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/eat(_:quantity:)","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/sleep(in:for:)"]},{"anchor":"Getting-the-Sloths-Schedule","title":"Getting the Sloth’s Schedule","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/schedule"]},{"title":"Getting the Sloth’s Identity","anchor":"Getting-the-Sloths-Identity","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/name"]},{"anchor":"Getting-Visual-Attributes","title":"Getting Visual Attributes","identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/color-swift.property","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/Color-swift.enum"]},{"identifiers":["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/power-swift.property","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/Power-swift.enum","doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/energyLevel"],"anchor":"Getting-Magical-Abilities","title":"Getting Magical Abilities"}],"variants":[{"paths":["\/documentation\/slothcreator\/sloth"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Sloth"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"overview","type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"text":"Sloths are mammals known for their slowness of movement. They spend most of their","type":"text"},{"type":"text","text":" "},{"text":"lives hanging upside down in trees.","type":"text"}]},{"inlineContent":[{"type":"text","text":"You can create a sloth using the "},{"isActive":true,"type":"reference","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/Sloth\/init(name:color:power:)"},{"text":" initializer, or","type":"text"},{"type":"text","text":" "},{"type":"text","text":"create a randomly generated sloth using a "},{"type":"reference","identifier":"doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator\/SlothGenerator","isActive":true},{"type":"text","text":":"}],"type":"paragraph"},{"syntax":"swift","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))","}"],"type":"codeListing"}]}],"hierarchy":{"paths":[["doc:\/\/slothcreatorbuildingdoccdocumentationinxcode-2.SlothCreator\/documentation\/SlothCreator"]]},"abstract":[{"type":"text","text":"A model representing a sloth."}],"seeAlsoSections":[{"generate
|