Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 1 Support › Retrieve customData from saved Levels

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5066

    Saims

    Hi,

    as you know, we are currently working on a level-editor for CrazyElephant. Each of our levels has different properties, like the number of shots, or the needed score for 1/2/3 stars.

    So we are using the customData in the saveCurrentLevel()-method, as follows:

    MenuButton {
            id: saveBtn
            text: "Save Level"
            mouseArea.onClicked: nativeUtils.displayTextInput("Enter name.", "Please enter a name for your level:", levelEditor.currentLevelName)
            anchors.right: parent.right
    
            Connections {
              target: nativeUtils
              onTextInputFinished: {
                if(accepted) {
                    levelEditor.saveCurrentLevel( {levelMetaData: {levelName: enteredText}, customData: {star1score: "340"}} )
                    scene.state = "editing"
                }
              }
            }
        }

    So my question is now, how can I access this customData from anywhere else?

    Or is there a better solution for our problem?

    #5067

    phil.jahoda

    So the question is how to get to the customData key-value pairs when the level is loaded e.g. with the LevelSelectionList?

    #5068

    Christian
    Felgo Team
Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.