|
19 | 19 | "sizeOnStartupMode": "", |
20 | 20 | "templateSlug": "", |
21 | 21 | "version": "1.0.0", |
22 | | - "name": "Parse JSON from API", |
| 22 | + "name": "Network Requests to an API and using JSON", |
23 | 23 | "description": "", |
24 | 24 | "author": "gametemplates.itch.io", |
25 | 25 | "windowWidth": 800, |
|
28 | 28 | "maxFPS": 60, |
29 | 29 | "minFPS": 10, |
30 | 30 | "verticalSync": false, |
31 | | - "platformSpecificAssets": {}, |
| 31 | + "platformSpecificAssets": { |
| 32 | + "android-icon-144": "", |
| 33 | + "android-icon-192": "", |
| 34 | + "android-icon-36": "", |
| 35 | + "android-icon-48": "", |
| 36 | + "android-icon-72": "", |
| 37 | + "android-icon-96": "", |
| 38 | + "android-windowSplashScreenAnimatedIcon": "", |
| 39 | + "desktop-icon-512": "", |
| 40 | + "ios-icon-100": "", |
| 41 | + "ios-icon-1024": "", |
| 42 | + "ios-icon-114": "", |
| 43 | + "ios-icon-120": "", |
| 44 | + "ios-icon-144": "", |
| 45 | + "ios-icon-152": "", |
| 46 | + "ios-icon-167": "", |
| 47 | + "ios-icon-180": "", |
| 48 | + "ios-icon-20": "", |
| 49 | + "ios-icon-29": "", |
| 50 | + "ios-icon-40": "", |
| 51 | + "ios-icon-50": "", |
| 52 | + "ios-icon-57": "", |
| 53 | + "ios-icon-58": "", |
| 54 | + "ios-icon-60": "", |
| 55 | + "ios-icon-72": "", |
| 56 | + "ios-icon-76": "", |
| 57 | + "ios-icon-80": "", |
| 58 | + "ios-icon-87": "" |
| 59 | + }, |
32 | 60 | "loadingScreen": { |
33 | 61 | "backgroundColor": 0, |
34 | 62 | "backgroundFadeInDuration": 0.2, |
|
298 | 326 | "numberProperties": [], |
299 | 327 | "stringProperties": [], |
300 | 328 | "initialVariables": [] |
| 329 | + }, |
| 330 | + { |
| 331 | + "angle": 0, |
| 332 | + "customSize": false, |
| 333 | + "height": 0, |
| 334 | + "keepRatio": true, |
| 335 | + "layer": "", |
| 336 | + "name": "NewText", |
| 337 | + "persistentUuid": "a45272ab-d358-44b5-a33e-bedcfc207a9d", |
| 338 | + "width": 0, |
| 339 | + "x": 16, |
| 340 | + "y": 11, |
| 341 | + "zOrder": 9, |
| 342 | + "numberProperties": [], |
| 343 | + "stringProperties": [], |
| 344 | + "initialVariables": [] |
301 | 345 | } |
302 | 346 | ], |
303 | 347 | "objects": [ |
|
521 | 565 | "PressedLabelOffsetY": 2, |
522 | 566 | "LabelText": "Request with custom action" |
523 | 567 | } |
| 568 | + }, |
| 569 | + { |
| 570 | + "assetStoreId": "", |
| 571 | + "bold": false, |
| 572 | + "italic": false, |
| 573 | + "name": "NewText", |
| 574 | + "smoothed": true, |
| 575 | + "type": "TextObject::Text", |
| 576 | + "underlined": false, |
| 577 | + "variables": [], |
| 578 | + "effects": [], |
| 579 | + "behaviors": [], |
| 580 | + "string": "This is an example of doing network requests in a GDevelop game.", |
| 581 | + "font": "", |
| 582 | + "textAlignment": "left", |
| 583 | + "characterSize": 20, |
| 584 | + "color": { |
| 585 | + "b": 255, |
| 586 | + "g": 255, |
| 587 | + "r": 255 |
| 588 | + }, |
| 589 | + "content": { |
| 590 | + "bold": false, |
| 591 | + "isOutlineEnabled": false, |
| 592 | + "isShadowEnabled": false, |
| 593 | + "italic": false, |
| 594 | + "outlineColor": "255;255;255", |
| 595 | + "outlineThickness": 2, |
| 596 | + "shadowAngle": 90, |
| 597 | + "shadowBlurRadius": 2, |
| 598 | + "shadowColor": "0;0;0", |
| 599 | + "shadowDistance": 4, |
| 600 | + "shadowOpacity": 127, |
| 601 | + "smoothed": true, |
| 602 | + "underlined": false, |
| 603 | + "text": "This is an example of doing network requests in a GDevelop game.", |
| 604 | + "font": "", |
| 605 | + "textAlignment": "left", |
| 606 | + "verticalTextAlignment": "top", |
| 607 | + "characterSize": 20, |
| 608 | + "lineHeight": 0, |
| 609 | + "color": "255;255;255" |
| 610 | + } |
524 | 611 | } |
525 | 612 | ], |
526 | 613 | "objectsFolderStructure": { |
|
546 | 633 | }, |
547 | 634 | { |
548 | 635 | "objectName": "LoadingText" |
| 636 | + }, |
| 637 | + { |
| 638 | + "objectName": "NewText" |
549 | 639 | } |
550 | 640 | ] |
551 | 641 | }, |
|
649 | 739 | } |
650 | 740 | ] |
651 | 741 | }, |
| 742 | + { |
| 743 | + "type": "BuiltinCommonInstructions::Comment", |
| 744 | + "color": { |
| 745 | + "b": 109, |
| 746 | + "g": 230, |
| 747 | + "r": 255, |
| 748 | + "textB": 0, |
| 749 | + "textG": 0, |
| 750 | + "textR": 0 |
| 751 | + }, |
| 752 | + "comment": "Side note: this disabled action shows an example of sending another type of request (\"POST\") using the content of a variable that is converted to JSON" |
| 753 | + }, |
| 754 | + { |
| 755 | + "disabled": true, |
| 756 | + "type": "BuiltinCommonInstructions::Standard", |
| 757 | + "conditions": [], |
| 758 | + "actions": [ |
| 759 | + { |
| 760 | + "type": { |
| 761 | + "await": true, |
| 762 | + "value": "SendAsyncRequest" |
| 763 | + }, |
| 764 | + "parameters": [ |
| 765 | + "\"https://api.restful-api.dev/objects\"", |
| 766 | + "ToJSON(Person)", |
| 767 | + "\"POST\"", |
| 768 | + "\"application/json\"", |
| 769 | + "ResultVariable", |
| 770 | + "ErrorVariable" |
| 771 | + ] |
| 772 | + } |
| 773 | + ] |
| 774 | + }, |
652 | 775 | { |
653 | 776 | "type": "BuiltinCommonInstructions::Comment", |
654 | 777 | "color": { |
|
0 commit comments