Skip to content

Commit 98d1f28

Browse files
authored
[3D City builder] Use unified actions (#567)
1 parent fc23ee8 commit 98d1f28

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

examples/3d-tile-based-city-builder/3d-tile-based-city-builder.json

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,7 @@
13621362
"parameters": [
13631363
"",
13641364
"Button",
1365+
"Effect",
13651366
""
13661367
]
13671368
}
@@ -2253,7 +2254,7 @@
22532254
"name": "MousePointerLock",
22542255
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Virtual Reality/Virtual Reality_360_rotate_vr_movement.svg",
22552256
"shortDescription": "This behavior removes the limit on the distance the mouse can move and hides the cursor.",
2256-
"version": "0.1.5",
2257+
"version": "0.1.4",
22572258
"description": [
22582259
"This behavior removes the limit on the distance the mouse can move and hides the cursor.",
22592260
"",
@@ -2262,7 +2263,7 @@
22622263
"",
22632264
"Game players don't have to worry about leaving the gameplay area or accidentally clicking on another application that moves the mouse focus away from the game.",
22642265
"",
2265-
"Locking the pointer locks `CursorX()` and `CursorY()` expressions.",
2266+
"Locking the pointer locks `MouseX()` and `MouseY()` expressions.",
22662267
"Use `MovementX()` and `MovementY()` instead.",
22672268
""
22682269
],
@@ -2273,6 +2274,7 @@
22732274
"tags": [
22742275
"mouse",
22752276
"lock",
2277+
"cursor",
22762278
"pointer"
22772279
],
22782280
"authorIds": [
@@ -2294,7 +2296,7 @@
22942296
"gdjs._MousePointerLockExtension = {};",
22952297
"gdjs._MousePointerLockExtension.movement = { x: 0, y: 0 };",
22962298
"",
2297-
"canvas.addEventListener(\"pointermove\", (e) => {",
2299+
"canvas.addEventListener(\"mousemove\", (e) => {",
22982300
" gdjs._MousePointerLockExtension.movement.x += e.movementX || 0;",
22992301
" gdjs._MousePointerLockExtension.movement.y += e.movementY || 0;",
23002302
"}, false);"
@@ -2377,7 +2379,7 @@
23772379
"type": "BuiltinCommonInstructions::JsCode",
23782380
"inlineCode": [
23792381
"const canvas = runtimeScene.getGame().getRenderer().getCanvas();\r",
2380-
"canvas.requestPointerLock();"
2382+
"canvas.requestPointerLock({ unadjustedMovement: true });"
23812383
],
23822384
"parameterObjects": "",
23832385
"useStrict": true,
@@ -2446,6 +2448,10 @@
24462448
"- Isometric view",
24472449
""
24482450
],
2451+
"origin": {
2452+
"identifier": "ThirdPersonCamera",
2453+
"name": "gdevelop-extension-store"
2454+
},
24492455
"tags": [
24502456
"3d",
24512457
"camera"
@@ -6011,20 +6017,22 @@
60116017
"actions": [
60126018
{
60136019
"type": {
6014-
"value": "EnableEffect"
6020+
"value": "EffectCapability::EffectBehavior::EnableEffect"
60156021
},
60166022
"parameters": [
60176023
"Button",
6024+
"Effect",
60186025
"\"Black\"",
6019-
"no"
6026+
""
60206027
]
60216028
},
60226029
{
60236030
"type": {
6024-
"value": "EnableEffect"
6031+
"value": "EffectCapability::EffectBehavior::EnableEffect"
60256032
},
60266033
"parameters": [
60276034
"Button",
6035+
"Effect",
60286036
"\"White\"",
60296037
"yes"
60306038
]
@@ -6058,20 +6066,22 @@
60586066
"actions": [
60596067
{
60606068
"type": {
6061-
"value": "EnableEffect"
6069+
"value": "EffectCapability::EffectBehavior::EnableEffect"
60626070
},
60636071
"parameters": [
60646072
"Button",
6073+
"Effect",
60656074
"\"Black\"",
60666075
"yes"
60676076
]
60686077
},
60696078
{
60706079
"type": {
6071-
"value": "EnableEffect"
6080+
"value": "EffectCapability::EffectBehavior::EnableEffect"
60726081
},
60736082
"parameters": [
60746083
"Button",
6084+
"Effect",
60756085
"\"White\"",
60766086
"no"
60776087
]
@@ -6085,6 +6095,12 @@
60856095
"name": "Button",
60866096
"supplementaryInformation": "SpriteToggleSwitch::SpriteToggleSwitch",
60876097
"type": "objectList"
6098+
},
6099+
{
6100+
"description": "Effect capacity",
6101+
"name": "Effect",
6102+
"supplementaryInformation": "EffectCapability::EffectBehavior",
6103+
"type": "behavior"
60886104
}
60896105
],
60906106
"objectGroups": []

0 commit comments

Comments
 (0)