Skip to content

Commit 98ecb77

Browse files
authored
[Run Dino Run] Fix the character not to stick on platforms (#771)
1 parent 8e5c5c5 commit 98ecb77

File tree

1 file changed

+63
-25
lines changed

1 file changed

+63
-25
lines changed

examples/run-dino-run/run-dino-run.json

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"firstLayout": "Intro",
33
"gdVersion": {
4-
"build": 223,
4+
"build": 225,
55
"major": 5,
66
"minor": 5,
77
"revision": 0
@@ -1987,11 +1987,11 @@
19871987
"conditions": [
19881988
{
19891989
"type": {
1990-
"value": "MouseButtonReleased"
1990+
"value": "MouseButtonFromTextReleased"
19911991
},
19921992
"parameters": [
19931993
"",
1994-
"Left"
1994+
"\"Left\""
19951995
]
19961996
}
19971997
],
@@ -3092,18 +3092,15 @@
30923092
"name": "Dino",
30933093
"type": "Sprite",
30943094
"updateIfNotVisible": false,
3095-
"variables": [],
3095+
"variables": [
3096+
{
3097+
"name": "InitialX",
3098+
"type": "number",
3099+
"value": 0
3100+
}
3101+
],
30963102
"effects": [],
30973103
"behaviors": [
3098-
{
3099-
"name": "Anchor",
3100-
"type": "AnchorBehavior::AnchorBehavior",
3101-
"bottomEdgeAnchor": 0,
3102-
"leftEdgeAnchor": 1,
3103-
"relativeToOriginalWindowSize": true,
3104-
"rightEdgeAnchor": 0,
3105-
"topEdgeAnchor": 0
3106-
},
31073104
{
31083105
"name": "PlatformerObject",
31093106
"type": "PlatformBehavior::PlatformerObjectBehavior",
@@ -5144,6 +5141,17 @@
51445141
"PlatformerObject",
51455142
""
51465143
]
5144+
},
5145+
{
5146+
"type": {
5147+
"value": "SetNumberObjectVariable"
5148+
},
5149+
"parameters": [
5150+
"Dino",
5151+
"InitialX",
5152+
"=",
5153+
"Dino.X()"
5154+
]
51475155
}
51485156
],
51495157
"events": [
@@ -5260,11 +5268,11 @@
52605268
},
52615269
{
52625270
"type": {
5263-
"value": "MouseButtonPressed"
5271+
"value": "MouseButtonFromTextPressed"
52645272
},
52655273
"parameters": [
52665274
"Dino",
5267-
"Left"
5275+
"\"Left\""
52685276
]
52695277
}
52705278
]
@@ -5483,6 +5491,34 @@
54835491
"source": "",
54845492
"type": "BuiltinCommonInstructions::Group",
54855493
"events": [
5494+
{
5495+
"type": "BuiltinCommonInstructions::Comment",
5496+
"color": {
5497+
"b": 109,
5498+
"g": 230,
5499+
"r": 255,
5500+
"textB": 0,
5501+
"textG": 0,
5502+
"textR": 0
5503+
},
5504+
"comment": "Avoid the dino to stick on platforms."
5505+
},
5506+
{
5507+
"type": "BuiltinCommonInstructions::Standard",
5508+
"conditions": [],
5509+
"actions": [
5510+
{
5511+
"type": {
5512+
"value": "MettreX"
5513+
},
5514+
"parameters": [
5515+
"Dino",
5516+
"=",
5517+
"Dino.InitialX"
5518+
]
5519+
}
5520+
]
5521+
},
54865522
{
54875523
"type": "BuiltinCommonInstructions::Standard",
54885524
"conditions": [
@@ -5710,11 +5746,11 @@
57105746
"conditions": [
57115747
{
57125748
"type": {
5713-
"value": "KeyPressed"
5749+
"value": "KeyFromTextPressed"
57145750
},
57155751
"parameters": [
57165752
"Dino",
5717-
"Up"
5753+
"\"Up\""
57185754
]
57195755
}
57205756
],
@@ -5735,11 +5771,11 @@
57355771
"conditions": [
57365772
{
57375773
"type": {
5738-
"value": "KeyPressed"
5774+
"value": "KeyFromTextPressed"
57395775
},
57405776
"parameters": [
57415777
"Dino",
5742-
"Down"
5778+
"\"Down\""
57435779
]
57445780
},
57455781
{
@@ -5799,11 +5835,11 @@
57995835
"conditions": [
58005836
{
58015837
"type": {
5802-
"value": "MouseButtonPressed"
5838+
"value": "MouseButtonFromTextPressed"
58035839
},
58045840
"parameters": [
58055841
"Dino",
5806-
"Left"
5842+
"\"Left\""
58075843
]
58085844
},
58095845
{
@@ -6761,10 +6797,6 @@
67616797
}
67626798
],
67636799
"behaviorsSharedData": [
6764-
{
6765-
"name": "Anchor",
6766-
"type": "AnchorBehavior::AnchorBehavior"
6767-
},
67686800
{
67696801
"name": "Animation",
67706802
"type": "AnimatableCapability::AnimatableBehavior"
@@ -7168,6 +7200,7 @@
71687200
"category": "User interface",
71697201
"extensionNamespace": "",
71707202
"fullName": "",
7203+
"gdevelopVersion": "",
71717204
"helpPath": "",
71727205
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRyb3BoeSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCAyQzE3LjEgMiAxNiAzIDE2IDRIOEM4IDMgNi45IDIgNiAySDJWMTFDMiAxMiAzIDEzIDQgMTNINi4yQzYuNiAxNSA3LjkgMTYuNyAxMSAxN1YxOS4wOEM4IDE5LjU0IDggMjIgOCAyMkgxNkMxNiAyMiAxNiAxOS41NCAxMyAxOS4wOFYxN0MxNi4xIDE2LjcgMTcuNCAxNSAxNy44IDEzSDIwQzIxIDEzIDIyIDEyIDIyIDExVjJIMThNNiAxMUg0VjRINlYxMU0yMCAxMUgxOFY0SDIwVjExWiIgLz48L3N2Zz4=",
71737206
"name": "LeaderboardDialog",
@@ -8487,6 +8520,7 @@
84878520
"category": "Movement",
84888521
"extensionNamespace": "",
84898522
"fullName": "Linear Movement",
8523+
"gdevelopVersion": "",
84908524
"helpPath": "",
84918525
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJheS1zdGFydC1hcnJvdyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMywxMkwxOSwxNlYxM0g2LjgzQzYuNDIsMTQuMTcgNS4zMSwxNSA0LDE1QTMsMyAwIDAsMSAxLDEyQTMsMyAwIDAsMSA0LDlDNS4zMSw5IDYuNDIsOS44MyA2LjgzLDExSDE5VjhMMjMsMTJaIiAvPjwvc3ZnPg==",
84928526
"name": "LinearMovement",
@@ -8589,6 +8623,7 @@
85898623
"category": "Movement",
85908624
"extensionNamespace": "",
85918625
"fullName": "Screen wrap",
8626+
"gdevelopVersion": "",
85928627
"helpPath": "",
85938628
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vbml0b3Itc2NyZWVuc2hvdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LDZINVYxMEg3VjhIOU0xOSwxMEgxN1YxMkgxNVYxNEgxOU0yMSwxNkgzVjRIMjFNMjEsMkgzQzEuODksMiAxLDIuODkgMSw0VjE2QTIsMiAwIDAsMCAzLDE4SDEwVjIwSDhWMjJIMTZWMjBIMTRWMThIMjFBMiwyIDAgMCwwIDIzLDE2VjRDMjMsMi44OSAyMi4xLDIgMjEsMiIgLz48L3N2Zz4=",
85948629
"name": "ScreenWrap",
@@ -11060,6 +11095,7 @@
1106011095
"category": "User interface",
1106111096
"extensionNamespace": "",
1106211097
"fullName": "Panel sprite button",
11098+
"gdevelopVersion": "",
1106311099
"helpPath": "/objects/button",
1106411100
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K",
1106511101
"name": "PanelSpriteButton",
@@ -13795,6 +13831,7 @@
1379513831
"category": "Movement",
1379613832
"extensionNamespace": "",
1379713833
"fullName": "Sine (or ellipsis) Movement (deprecated)",
13834+
"gdevelopVersion": "",
1379813835
"helpPath": "https://victrisgames.itch.io/extension-sinemovement-and-deptheffect",
1379913836
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNpbmUtd2F2ZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNi41LDIxQzEzLjUsMjEgMTIuMzEsMTYuNzYgMTEuMDUsMTIuMjhDMTAuMTQsOS4wNCA5LDUgNy41LDVDNC4xMSw1IDQsMTEuOTMgNCwxMkgyQzIsMTEuNjMgMi4wNiwzIDcuNSwzQzEwLjUsMyAxMS43MSw3LjI1IDEyLjk3LDExLjc0QzEzLjgzLDE0LjggMTUsMTkgMTYuNSwxOUMxOS45NCwxOSAyMC4wMywxMi4wNyAyMC4wMywxMkgyMi4wM0MyMi4wMywxMi4zNyAyMS45NywyMSAxNi41LDIxWiIgLz48L3N2Zz4=",
1380013837
"name": "SineMovement",
@@ -14780,6 +14817,7 @@
1478014817
"category": "Game mechanic",
1478114818
"extensionNamespace": "",
1478214819
"fullName": "Object \"Is On Screen\" Detection",
14820+
"gdevelopVersion": "",
1478314821
"helpPath": "",
1478414822
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vbml0b3Itc2NyZWVuc2hvdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LDZINVYxMEg3VjhIOU0xOSwxMEgxN1YxMkgxNVYxNEgxOU0yMSwxNkgzVjRIMjFNMjEsMkgzQzEuODksMiAxLDIuODkgMSw0VjE2QTIsMiAwIDAsMCAzLDE4SDEwVjIwSDhWMjJIMTZWMjBIMTRWMThIMjFBMiwyIDAgMCwwIDIzLDE2VjRDMjMsMi44OSAyMi4xLDIgMjEsMiIgLz48L3N2Zz4=",
1478514823
"name": "IsOnScreen",

0 commit comments

Comments
 (0)