:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/../../GodotApplePlugins/doc_classes/GKChallengeDefinition.xml. .. _class_GKChallengeDefinition: GKChallengeDefinition ===================== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Describes a challenge template configured in Game Center. .. rst-class:: classref-introduction-group Description ----------- Wraps ``GKChallengeDefinition``, including metadata, repeatability, and image/loading helpers. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`details` | ``""`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`Array` | :ref:`duration_options` | ``[]`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`group_identifier` | ``""`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`identifier` | ``""`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`is_repeatable` | ``false`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`GKLeaderboard` | :ref:`leaderboard` | ``null`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`release_state` | ``0`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ | :ref:`String` | :ref:`title` | ``""`` | +-------------------------------------------+--------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`has_active_challenges`\ (\ callback\: :ref:`Callable`\ ) | +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`load_challenge_definitions`\ (\ callback\: :ref:`Callable`\ ) |static| | +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`load_image`\ (\ callback\: :ref:`Callable`\ ) | +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_GKChallengeDefinition_property_details: .. rst-class:: classref-property :ref:`String` **details** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_details**\ (\ ) Detailed challenge description. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_duration_options: .. rst-class:: classref-property :ref:`Array` **duration_options** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`Array` **get_duration_options**\ (\ ) Supported challenge durations represented as date-component dictionaries. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_group_identifier: .. rst-class:: classref-property :ref:`String` **group_identifier** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_group_identifier**\ (\ ) Group identifier for related challenge definitions. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_identifier: .. rst-class:: classref-property :ref:`String` **identifier** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_identifier**\ (\ ) Unique challenge definition identifier. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_is_repeatable: .. rst-class:: classref-property :ref:`bool` **is_repeatable** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`bool` **get_is_repeatable**\ (\ ) Whether the challenge can be repeated. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_leaderboard: .. rst-class:: classref-property :ref:`GKLeaderboard` **leaderboard** = ``null`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`GKLeaderboard` **get_leaderboard**\ (\ ) Associated leaderboard, if this definition tracks score. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_release_state: .. rst-class:: classref-property :ref:`int` **release_state** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`int` **get_release_state**\ (\ ) Apple release-state raw value. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_property_title: .. rst-class:: classref-property :ref:`String` **title** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_title**\ (\ ) Display title. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GKChallengeDefinition_method_has_active_challenges: .. rst-class:: classref-method |void| **has_active_challenges**\ (\ callback\: :ref:`Callable`\ ) :ref:`🔗` Checks whether this definition currently has active challenges. The callback receives ``(bool has_active, Variant error)``. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_method_load_challenge_definitions: .. rst-class:: classref-method |void| **load_challenge_definitions**\ (\ callback\: :ref:`Callable`\ ) |static| :ref:`🔗` Loads challenge definitions for the current player/account context. .. rst-class:: classref-item-separator ---- .. _class_GKChallengeDefinition_method_load_image: .. rst-class:: classref-method |void| **load_image**\ (\ callback\: :ref:`Callable`\ ) :ref:`🔗` Loads this challenge definition's image. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`