18193 lines
649 KiB
JSON
18193 lines
649 KiB
JSON
{
|
|
"firstLayout": "",
|
|
"gdVersion": {
|
|
"build": 279,
|
|
"major": 5,
|
|
"minor": 6,
|
|
"revision": 0
|
|
},
|
|
"initialGDVersion": "5.6.279",
|
|
"properties": {
|
|
"adaptGameResolutionAtRuntime": true,
|
|
"antialiasingMode": "MSAA",
|
|
"antialisingEnabledOnMobile": false,
|
|
"folderProject": false,
|
|
"orientation": "landscape",
|
|
"packageName": "com.example.gamename",
|
|
"pixelsRounding": true,
|
|
"projectUuid": "459bb859-e4c7-45fe-a4a8-13e8403e786f",
|
|
"scaleMode": "nearest",
|
|
"sizeOnStartupMode": "scaleOuter",
|
|
"templateSlug": "",
|
|
"version": "1.0.0",
|
|
"name": "WorldOfSolariaV1",
|
|
"description": "",
|
|
"author": "",
|
|
"windowWidth": 768,
|
|
"windowHeight": 432,
|
|
"latestCompilationDirectory": "",
|
|
"maxFPS": 60,
|
|
"minFPS": 20,
|
|
"verticalSync": false,
|
|
"platformSpecificAssets": {
|
|
"android-icon-144": "",
|
|
"android-icon-192": "",
|
|
"android-icon-36": "",
|
|
"android-icon-48": "",
|
|
"android-icon-72": "",
|
|
"android-icon-96": "",
|
|
"android-windowSplashScreenAnimatedIcon": "",
|
|
"desktop-icon-512": "",
|
|
"ios-icon-100": "",
|
|
"ios-icon-1024": "",
|
|
"ios-icon-114": "",
|
|
"ios-icon-120": "",
|
|
"ios-icon-144": "",
|
|
"ios-icon-152": "",
|
|
"ios-icon-167": "",
|
|
"ios-icon-180": "",
|
|
"ios-icon-20": "",
|
|
"ios-icon-29": "",
|
|
"ios-icon-40": "",
|
|
"ios-icon-50": "",
|
|
"ios-icon-57": "",
|
|
"ios-icon-58": "",
|
|
"ios-icon-60": "",
|
|
"ios-icon-72": "",
|
|
"ios-icon-76": "",
|
|
"ios-icon-80": "",
|
|
"ios-icon-87": ""
|
|
},
|
|
"loadingScreen": {
|
|
"backgroundColor": 0,
|
|
"backgroundFadeInDuration": 0.2,
|
|
"backgroundImageResourceName": "",
|
|
"gdevelopLogoStyle": "light",
|
|
"logoAndProgressFadeInDuration": 0.2,
|
|
"logoAndProgressLogoFadeInDelay": 0,
|
|
"minDuration": 1.5,
|
|
"progressBarColor": 16777215,
|
|
"progressBarHeight": 20,
|
|
"progressBarMaxWidth": 200,
|
|
"progressBarMinWidth": 40,
|
|
"progressBarWidthPercent": 30,
|
|
"showGDevelopSplash": true,
|
|
"showProgressBar": true
|
|
},
|
|
"watermark": {
|
|
"placement": "bottom-left",
|
|
"showWatermark": true
|
|
},
|
|
"authorIds": [],
|
|
"authorUsernames": [],
|
|
"categories": [],
|
|
"playableDevices": [],
|
|
"extensionProperties": [],
|
|
"platforms": [
|
|
{
|
|
"name": "GDevelop JS platform"
|
|
}
|
|
],
|
|
"currentPlatform": "GDevelop JS platform"
|
|
},
|
|
"resources": {
|
|
"resources": [
|
|
{
|
|
"file": "assets/NewSprite.png",
|
|
"kind": "image",
|
|
"metadata": "{\"extension\":\".png\"}",
|
|
"name": "NewSprite",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/tempLogo.png",
|
|
"kind": "image",
|
|
"metadata": "{\"extension\":\".png\"}",
|
|
"name": "tempLogo",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/tempLogo.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets/tempLogo.png",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/tempLogo3.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets/tempLogo3.png",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/NewSprite2.png",
|
|
"kind": "image",
|
|
"metadata": "{\"extension\":\".png\"}",
|
|
"name": "NewSprite2",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/tempTitle.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets/tempTitle.png",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/8BitOperatorPlus8Regular_Edited.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets\\8BitOperatorPlus8Regular_Edited.png",
|
|
"smoothed": false,
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/15c1797cbcb41c3a753b6bbb21cfa60284cfaf81c9891c3abf78a8e0e1cacf59_8BitOperatorPlus8Regular_Edited.png",
|
|
"name": "8BitOperatorPlus8Regular_Edited.png"
|
|
}
|
|
},
|
|
{
|
|
"file": "assets/Small Blue Button_Hovered.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets\\Small Blue Button_Hovered.png",
|
|
"smoothed": false,
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/f80ae062891a0a4612c0160ed931165461392019f89a8545f28c195f645ebc48_Small Blue Button_Hovered.png",
|
|
"name": "Small Blue Button_Hovered.png"
|
|
}
|
|
},
|
|
{
|
|
"file": "assets/Small Blue Button_Idle.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets\\Small Blue Button_Idle.png",
|
|
"smoothed": false,
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/c22b15c77047f1545806141e1129900bdc985d191b7ab5ebaae834a90c270ed2_Small Blue Button_Idle.png",
|
|
"name": "Small Blue Button_Idle.png"
|
|
}
|
|
},
|
|
{
|
|
"file": "assets/Small Blue Button_Pressed.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets\\Small Blue Button_Pressed.png",
|
|
"smoothed": false,
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/9e01b09016c6a200b53a55cac3cf34f083785eb6b9f55de490a71ad352858b36_Small Blue Button_Pressed.png",
|
|
"name": "Small Blue Button_Pressed.png"
|
|
}
|
|
},
|
|
{
|
|
"file": "assets/8BitOperatorPlus8Regular_Edited.fnt",
|
|
"kind": "bitmapFont",
|
|
"metadata": "",
|
|
"name": "assets\\8BitOperatorPlus8Regular_Edited.fnt",
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Menu buttons/Pixel art/6b410f07a3a02e721a49d41795e84b56707ef28ac4d095d55f1fd1093760e134_8BitOperatorPlus8Regular_Edited.fnt",
|
|
"name": "8BitOperatorPlus8Regular_Edited.fnt"
|
|
}
|
|
},
|
|
{
|
|
"file": "assets/tarnishedDiamondLogo.png",
|
|
"kind": "image",
|
|
"metadata": "{\"localFilePath\":\"assets/tarnishedDiamondLogo.png\",\"extension\":\".png\"}",
|
|
"name": "assets/tarnishedDiamondLogo.png",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/scrollingworldTemp.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets/scrollingworldTemp.png",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/WorldofSolariaTitleTemp.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets/WorldofSolariaTitleTemp.png",
|
|
"smoothed": false,
|
|
"userAdded": false
|
|
},
|
|
{
|
|
"file": "assets/8BitOperatorPlus8Regular_Edited2.png",
|
|
"kind": "image",
|
|
"metadata": "",
|
|
"name": "assets\\8BitOperatorPlus8Regular_Edited.png2",
|
|
"smoothed": false,
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Bitmap texts/GDevelop/15c1797cbcb41c3a753b6bbb21cfa60284cfaf81c9891c3abf78a8e0e1cacf59_8BitOperatorPlus8Regular_Edited.png",
|
|
"name": "8BitOperatorPlus8Regular_Edited.png"
|
|
}
|
|
},
|
|
{
|
|
"file": "assets/8BitOperatorPlus8Regular_Edited2.fnt",
|
|
"kind": "bitmapFont",
|
|
"metadata": "",
|
|
"name": "assets\\8BitOperatorPlus8Regular_Edited.fnt2",
|
|
"userAdded": false,
|
|
"origin": {
|
|
"identifier": "https://asset-resources.gdevelop.io/public-resources/Bitmap texts/GDevelop/6b410f07a3a02e721a49d41795e84b56707ef28ac4d095d55f1fd1093760e134_8BitOperatorPlus8Regular_Edited.fnt",
|
|
"name": "8BitOperatorPlus8Regular_Edited.fnt"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"objects": [
|
|
{
|
|
"assetStoreId": "",
|
|
"name": "shp_fade",
|
|
"persistentUuid": "7c029e6d-47df-4889-bb1b-6130d9888e56",
|
|
"type": "PrimitiveDrawing::Drawer",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "FlashTransitionPainter",
|
|
"type": "FlashTransitionPainter::FlashTransitionPainter",
|
|
"Progress": 0,
|
|
"Duration": 0,
|
|
"Type": "",
|
|
"Direction": "",
|
|
"MaxOpacity": 255
|
|
}
|
|
],
|
|
"fillOpacity": 255,
|
|
"outlineSize": 1,
|
|
"outlineOpacity": 255,
|
|
"absoluteCoordinates": false,
|
|
"clearBetweenFrames": true,
|
|
"antialiasing": "none",
|
|
"fillColor": {
|
|
"r": 255,
|
|
"g": 255,
|
|
"b": 255
|
|
},
|
|
"outlineColor": {
|
|
"r": 0,
|
|
"g": 0,
|
|
"b": 0
|
|
}
|
|
}
|
|
],
|
|
"objectsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"folderName": "Fade",
|
|
"children": [
|
|
{
|
|
"objectName": "shp_fade"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"objectsGroups": [],
|
|
"variables": [
|
|
{
|
|
"name": "host",
|
|
"type": "string",
|
|
"value": ""
|
|
}
|
|
],
|
|
"layouts": [
|
|
{
|
|
"b": 0,
|
|
"disableInputWhenNotFocused": true,
|
|
"mangledName": "Splash",
|
|
"name": "Splash",
|
|
"r": 0,
|
|
"standardSortMethod": true,
|
|
"stopSoundsOnStartup": true,
|
|
"title": "",
|
|
"v": 0,
|
|
"uiSettings": {
|
|
"grid": true,
|
|
"gridType": "rectangular",
|
|
"gridWidth": 16,
|
|
"gridHeight": 16,
|
|
"gridDepth": 32,
|
|
"gridOffsetX": 0,
|
|
"gridOffsetY": 0,
|
|
"gridOffsetZ": 0,
|
|
"gridColor": 10401023,
|
|
"gridAlpha": 0.8,
|
|
"snap": true,
|
|
"zoomFactor": 1.384119804630684,
|
|
"windowMask": false,
|
|
"selectedLayer": "",
|
|
"gameEditorMode": "instances-editor"
|
|
},
|
|
"objectsGroups": [],
|
|
"variables": [],
|
|
"instances": [
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "",
|
|
"name": "shp_fade",
|
|
"persistentUuid": "43c12b31-9f4a-4fd7-970e-a848140da139",
|
|
"width": 0,
|
|
"x": 640,
|
|
"y": 0,
|
|
"zOrder": 2,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 384,
|
|
"keepRatio": true,
|
|
"layer": "",
|
|
"name": "spr_studioLogo",
|
|
"persistentUuid": "ff3f74cf-46d0-4e05-9518-03d69f2a3cce",
|
|
"width": 448,
|
|
"x": 160,
|
|
"y": 16,
|
|
"zOrder": 1,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
}
|
|
],
|
|
"objects": [
|
|
{
|
|
"adaptCollisionMaskAutomatically": true,
|
|
"assetStoreId": "",
|
|
"name": "spr_studioLogo",
|
|
"persistentUuid": "d8d7a523-1dfa-4cd4-9080-3d6c7deb792f",
|
|
"type": "Sprite",
|
|
"updateIfNotVisible": false,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"animations": [
|
|
{
|
|
"name": "tempLogo",
|
|
"useMultipleDirections": false,
|
|
"directions": [
|
|
{
|
|
"looping": false,
|
|
"metadata": "{\"pskl\":{}}",
|
|
"timeBetweenFrames": 0.08,
|
|
"sprites": [
|
|
{
|
|
"hasCustomCollisionMask": true,
|
|
"image": "assets/tarnishedDiamondLogo.png",
|
|
"points": [],
|
|
"originPoint": {
|
|
"name": "origine",
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"centerPoint": {
|
|
"automatic": true,
|
|
"name": "centre",
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"customCollisionMask": [
|
|
[
|
|
{
|
|
"x": 55,
|
|
"y": 73
|
|
},
|
|
{
|
|
"x": 564,
|
|
"y": 73
|
|
},
|
|
{
|
|
"x": 564,
|
|
"y": 483
|
|
},
|
|
{
|
|
"x": 55,
|
|
"y": 483
|
|
}
|
|
]
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"objectsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"folderName": "Sprites",
|
|
"children": [
|
|
{
|
|
"objectName": "spr_studioLogo"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Link",
|
|
"include": {
|
|
"includeConfig": 0
|
|
},
|
|
"target": "Functions"
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Scene Start",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "SceneJustBegins"
|
|
},
|
|
"parameters": [
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetWindowSize"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"768",
|
|
"432",
|
|
"yes"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "CenterWindow"
|
|
},
|
|
"parameters": [
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "AdvancedWindow::SetResizable"
|
|
},
|
|
"parameters": [
|
|
"yes",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Wait"
|
|
},
|
|
"parameters": [
|
|
"3"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect"
|
|
},
|
|
"parameters": [
|
|
"shp_fade",
|
|
"FlashTransitionPainter",
|
|
"\"0;0;0\"",
|
|
"1",
|
|
"\"Flash\"",
|
|
"\"Forward\"",
|
|
"255",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Wait"
|
|
},
|
|
"parameters": [
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Scene"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"\"Title\"",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Host Device",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "SystemInfo::HasTouchScreen"
|
|
},
|
|
"parameters": [
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"host",
|
|
"=",
|
|
"\"touchscreen\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "SystemInfo::IsNativeDesktopApp"
|
|
},
|
|
"parameters": [
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"host",
|
|
"=",
|
|
"\"desktop\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": []
|
|
}
|
|
],
|
|
"layers": [
|
|
{
|
|
"ambientLightColorB": 200,
|
|
"ambientLightColorG": 200,
|
|
"ambientLightColorR": 200,
|
|
"camera2DPlaneMaxDrawingDistance": 5000,
|
|
"camera3DFarPlaneDistance": 10000,
|
|
"camera3DFieldOfView": 45,
|
|
"camera3DNearPlaneDistance": 3,
|
|
"cameraType": "",
|
|
"followBaseLayerCamera": false,
|
|
"isLightingLayer": false,
|
|
"isLocked": false,
|
|
"name": "",
|
|
"renderingType": "",
|
|
"visibility": true,
|
|
"cameras": [
|
|
{
|
|
"defaultSize": true,
|
|
"defaultViewport": true,
|
|
"height": 0,
|
|
"viewportBottom": 1,
|
|
"viewportLeft": 0,
|
|
"viewportRight": 1,
|
|
"viewportTop": 0,
|
|
"width": 0
|
|
}
|
|
],
|
|
"effects": [
|
|
{
|
|
"effectType": "Scene3D::HemisphereLight",
|
|
"name": "3D Ambient Hemisphere Light",
|
|
"doubleParameters": {
|
|
"elevation": 40,
|
|
"intensity": 0.33,
|
|
"rotation": 300
|
|
},
|
|
"stringParameters": {
|
|
"groundColor": "127;127;127",
|
|
"skyColor": "255;255;255",
|
|
"top": "Z+"
|
|
},
|
|
"booleanParameters": {}
|
|
},
|
|
{
|
|
"effectType": "Scene3D::DirectionalLight",
|
|
"name": "3D Sun Light",
|
|
"doubleParameters": {
|
|
"distanceFromCamera": 1500,
|
|
"elevation": 40,
|
|
"frustumSize": 4000,
|
|
"intensity": 0.75,
|
|
"minimumShadowBias": 0,
|
|
"rotation": 300
|
|
},
|
|
"stringParameters": {
|
|
"color": "255;255;255",
|
|
"shadowQuality": "medium",
|
|
"top": "Z+"
|
|
},
|
|
"booleanParameters": {
|
|
"isCastingShadow": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"behaviorsSharedData": [
|
|
{
|
|
"name": "Animation",
|
|
"type": "AnimatableCapability::AnimatableBehavior"
|
|
},
|
|
{
|
|
"name": "Effect",
|
|
"type": "EffectCapability::EffectBehavior"
|
|
},
|
|
{
|
|
"name": "FlashTransitionPainter",
|
|
"type": "FlashTransitionPainter::FlashTransitionPainter"
|
|
},
|
|
{
|
|
"name": "Flippable",
|
|
"type": "FlippableCapability::FlippableBehavior"
|
|
},
|
|
{
|
|
"name": "Opacity",
|
|
"type": "OpacityCapability::OpacityBehavior"
|
|
},
|
|
{
|
|
"name": "Resizable",
|
|
"type": "ResizableCapability::ResizableBehavior"
|
|
},
|
|
{
|
|
"name": "Scale",
|
|
"type": "ScalableCapability::ScalableBehavior"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"b": 255,
|
|
"disableInputWhenNotFocused": true,
|
|
"mangledName": "Title",
|
|
"name": "Title",
|
|
"r": 247,
|
|
"standardSortMethod": true,
|
|
"stopSoundsOnStartup": true,
|
|
"title": "",
|
|
"v": 249,
|
|
"uiSettings": {
|
|
"grid": true,
|
|
"gridType": "rectangular",
|
|
"gridWidth": 16,
|
|
"gridHeight": 16,
|
|
"gridDepth": 32,
|
|
"gridOffsetX": 0,
|
|
"gridOffsetY": 0,
|
|
"gridOffsetZ": 0,
|
|
"gridColor": 10401023,
|
|
"gridAlpha": 0.8,
|
|
"snap": true,
|
|
"zoomFactor": 0.3722667648968592,
|
|
"windowMask": false,
|
|
"selectedLayer": "",
|
|
"gameEditorMode": "instances-editor"
|
|
},
|
|
"objectsGroups": [],
|
|
"variables": [],
|
|
"instances": [
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "",
|
|
"name": "shp_fade",
|
|
"persistentUuid": "b2376dc0-a75e-41fc-b571-46598d263229",
|
|
"width": 0,
|
|
"x": 768,
|
|
"y": 0,
|
|
"zOrder": 2,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "UI",
|
|
"name": "btn_login",
|
|
"persistentUuid": "1094a52f-c2c7-43fd-9c08-fd6d96bf9310",
|
|
"width": 0,
|
|
"x": 208,
|
|
"y": 352,
|
|
"zOrder": 3,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "UI",
|
|
"name": "btn_register",
|
|
"persistentUuid": "985c1bc0-a895-4ac6-8cfb-27f8999e9fa1",
|
|
"width": 0,
|
|
"x": 432,
|
|
"y": 352,
|
|
"zOrder": 4,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "UI",
|
|
"name": "btn_settings",
|
|
"persistentUuid": "e0c76744-0bfc-491c-8182-c8f0dc1d5d73",
|
|
"width": 0,
|
|
"x": 688,
|
|
"y": 16,
|
|
"zOrder": 5,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 288,
|
|
"keepRatio": true,
|
|
"layer": "UI",
|
|
"name": "spr_wosTtile",
|
|
"persistentUuid": "916c983f-e510-4276-a85f-c5e4d22c389e",
|
|
"width": 480,
|
|
"x": 144,
|
|
"y": 32,
|
|
"zOrder": 6,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "UI",
|
|
"name": "fnt_scrollY",
|
|
"persistentUuid": "3d74a3f7-e161-4851-9188-dcc34a7b6607",
|
|
"width": 0,
|
|
"x": 32,
|
|
"y": 400,
|
|
"zOrder": 7,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": false,
|
|
"height": 0,
|
|
"keepRatio": true,
|
|
"layer": "",
|
|
"name": "spr_scroll",
|
|
"persistentUuid": "3c2cf7f6-e6bf-4c35-b319-48072b153e53",
|
|
"width": 0,
|
|
"x": -1,
|
|
"y": 432,
|
|
"zOrder": 8,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
}
|
|
],
|
|
"objects": [
|
|
{
|
|
"assetStoreId": "80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf",
|
|
"name": "btn_login",
|
|
"persistentUuid": "510c8083-e726-45db-abbd-3ce87aeaa45f",
|
|
"type": "PanelSpriteButton::PanelSpriteButton",
|
|
"variant": "Small Blue Button",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"content": {
|
|
"LabelText": "Login",
|
|
"PressedLabelOffsetY": 2
|
|
}
|
|
},
|
|
{
|
|
"assetStoreId": "80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf",
|
|
"name": "btn_register",
|
|
"persistentUuid": "dfc9eada-5314-4e7b-ba3c-fdde292f095b",
|
|
"type": "PanelSpriteButton::PanelSpriteButton",
|
|
"variant": "Small Blue Button",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"content": {
|
|
"LabelText": "Register",
|
|
"PressedLabelOffsetY": 2
|
|
}
|
|
},
|
|
{
|
|
"assetStoreId": "90c9b872a1439405f56d1591e01d6b9fe5dadc4dc1c3afc0bdd98f763b340fa0",
|
|
"name": "btn_settings",
|
|
"persistentUuid": "4ce8f8a6-d5f7-44d7-8681-c71ba077bf4b",
|
|
"type": "PanelSpriteButton::PanelSpriteButton",
|
|
"variant": "Tiny Blue Button",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"content": {
|
|
"LabelText": "Settings",
|
|
"PressedLabelOffsetY": 2
|
|
}
|
|
},
|
|
{
|
|
"adaptCollisionMaskAutomatically": true,
|
|
"assetStoreId": "",
|
|
"name": "spr_scroll",
|
|
"persistentUuid": "fea34755-440f-4b1d-a52f-1ebe15f00464",
|
|
"type": "Sprite",
|
|
"updateIfNotVisible": false,
|
|
"variables": [
|
|
{
|
|
"name": "count",
|
|
"persistentUuid": "8609b795-983e-408c-bced-bdeec82a2146",
|
|
"type": "number",
|
|
"value": 1
|
|
}
|
|
],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"animations": [
|
|
{
|
|
"name": "",
|
|
"useMultipleDirections": false,
|
|
"directions": [
|
|
{
|
|
"looping": false,
|
|
"timeBetweenFrames": 0.08,
|
|
"sprites": [
|
|
{
|
|
"hasCustomCollisionMask": true,
|
|
"image": "assets/scrollingworldTemp.png",
|
|
"points": [],
|
|
"originPoint": {
|
|
"name": "origine",
|
|
"x": -1,
|
|
"y": 1735
|
|
},
|
|
"centerPoint": {
|
|
"automatic": true,
|
|
"name": "centre",
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"customCollisionMask": [
|
|
[
|
|
{
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
{
|
|
"x": 828,
|
|
"y": 0
|
|
},
|
|
{
|
|
"x": 828,
|
|
"y": 1899
|
|
},
|
|
{
|
|
"x": 0,
|
|
"y": 1899
|
|
}
|
|
]
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"adaptCollisionMaskAutomatically": true,
|
|
"assetStoreId": "",
|
|
"name": "spr_wosTtile",
|
|
"persistentUuid": "aeee4d9f-dfe5-4633-8da9-4d6fcafd02e5",
|
|
"type": "Sprite",
|
|
"updateIfNotVisible": false,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"animations": [
|
|
{
|
|
"name": "",
|
|
"useMultipleDirections": false,
|
|
"directions": [
|
|
{
|
|
"looping": false,
|
|
"timeBetweenFrames": 0.08,
|
|
"sprites": [
|
|
{
|
|
"hasCustomCollisionMask": true,
|
|
"image": "assets/WorldofSolariaTitleTemp.png",
|
|
"points": [],
|
|
"originPoint": {
|
|
"name": "origine",
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"centerPoint": {
|
|
"automatic": true,
|
|
"name": "centre",
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"customCollisionMask": [
|
|
[
|
|
{
|
|
"x": 14,
|
|
"y": 2
|
|
},
|
|
{
|
|
"x": 405,
|
|
"y": 2
|
|
},
|
|
{
|
|
"x": 405,
|
|
"y": 232
|
|
},
|
|
{
|
|
"x": 14,
|
|
"y": 232
|
|
}
|
|
]
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "4823f168c941818ff4e0396fc6a3ccec2dc18ade7d350364d57d4f8f096cc9b9",
|
|
"name": "fnt_scrollY",
|
|
"persistentUuid": "371471d9-e22b-450e-8db1-5ed9e5193741",
|
|
"type": "BitmapText::BitmapTextObject",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [],
|
|
"content": {
|
|
"text": "Text",
|
|
"opacity": 255,
|
|
"scale": 1,
|
|
"fontSize": 20,
|
|
"tint": "255;255;255",
|
|
"bitmapFontResourceName": "assets\\8BitOperatorPlus8Regular_Edited.fnt2",
|
|
"textureAtlasResourceName": "assets\\8BitOperatorPlus8Regular_Edited.png2",
|
|
"align": "left",
|
|
"verticalTextAlignment": "top"
|
|
}
|
|
}
|
|
],
|
|
"objectsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"objectName": "btn_login"
|
|
},
|
|
{
|
|
"objectName": "btn_register"
|
|
},
|
|
{
|
|
"objectName": "btn_settings"
|
|
},
|
|
{
|
|
"objectName": "spr_scroll"
|
|
},
|
|
{
|
|
"objectName": "fnt_scrollY"
|
|
},
|
|
{
|
|
"objectName": "spr_wosTtile"
|
|
}
|
|
]
|
|
},
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Link",
|
|
"include": {
|
|
"includeConfig": 0
|
|
},
|
|
"target": "Functions"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "AddForceAL"
|
|
},
|
|
"parameters": [
|
|
"spr_scroll",
|
|
"270",
|
|
"20",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"fnt_scrollY",
|
|
"Text",
|
|
"=",
|
|
"ToString(spr_scroll.Y())"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PosY"
|
|
},
|
|
"parameters": [
|
|
"spr_scroll",
|
|
"<=",
|
|
"500"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Create"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"spr_scroll",
|
|
"spr_scroll.X()",
|
|
"spr_scroll.Y()+spr_scroll.Height()-1",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "AddForceAL"
|
|
},
|
|
"parameters": [
|
|
"spr_scroll",
|
|
"270",
|
|
"20",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PosY"
|
|
},
|
|
"parameters": [
|
|
"spr_scroll",
|
|
"<=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Delete"
|
|
},
|
|
"parameters": [
|
|
"spr_scroll",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"layers": [
|
|
{
|
|
"ambientLightColorB": 200,
|
|
"ambientLightColorG": 200,
|
|
"ambientLightColorR": 200,
|
|
"camera2DPlaneMaxDrawingDistance": 5000,
|
|
"camera3DFarPlaneDistance": 10000,
|
|
"camera3DFieldOfView": 45,
|
|
"camera3DNearPlaneDistance": 3,
|
|
"cameraType": "",
|
|
"followBaseLayerCamera": false,
|
|
"isLightingLayer": false,
|
|
"isLocked": false,
|
|
"name": "",
|
|
"renderingType": "",
|
|
"visibility": true,
|
|
"cameras": [
|
|
{
|
|
"defaultSize": true,
|
|
"defaultViewport": true,
|
|
"height": 0,
|
|
"viewportBottom": 1,
|
|
"viewportLeft": 0,
|
|
"viewportRight": 1,
|
|
"viewportTop": 0,
|
|
"width": 0
|
|
}
|
|
],
|
|
"effects": [
|
|
{
|
|
"effectType": "Scene3D::HemisphereLight",
|
|
"name": "3D Ambient Hemisphere Light",
|
|
"doubleParameters": {
|
|
"elevation": 40,
|
|
"intensity": 0.33,
|
|
"rotation": 300
|
|
},
|
|
"stringParameters": {
|
|
"groundColor": "127;127;127",
|
|
"skyColor": "255;255;255",
|
|
"top": "Z+"
|
|
},
|
|
"booleanParameters": {}
|
|
},
|
|
{
|
|
"effectType": "Scene3D::DirectionalLight",
|
|
"name": "3D Sun Light",
|
|
"doubleParameters": {
|
|
"distanceFromCamera": 1500,
|
|
"elevation": 40,
|
|
"frustumSize": 4000,
|
|
"intensity": 0.75,
|
|
"minimumShadowBias": 0,
|
|
"rotation": 300
|
|
},
|
|
"stringParameters": {
|
|
"color": "255;255;255",
|
|
"shadowQuality": "medium",
|
|
"top": "Z+"
|
|
},
|
|
"booleanParameters": {
|
|
"isCastingShadow": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"ambientLightColorB": 200,
|
|
"ambientLightColorG": 200,
|
|
"ambientLightColorR": 200,
|
|
"camera2DPlaneMaxDrawingDistance": 5000,
|
|
"camera3DFarPlaneDistance": 10000,
|
|
"camera3DFieldOfView": 45,
|
|
"camera3DNearPlaneDistance": 3,
|
|
"cameraType": "",
|
|
"followBaseLayerCamera": false,
|
|
"isLightingLayer": false,
|
|
"isLocked": false,
|
|
"name": "UI",
|
|
"renderingType": "",
|
|
"visibility": true,
|
|
"cameras": [],
|
|
"effects": [
|
|
{
|
|
"effectType": "Scene3D::HemisphereLight",
|
|
"name": "3D Ambient Hemisphere Light",
|
|
"doubleParameters": {
|
|
"elevation": 40,
|
|
"intensity": 0.33,
|
|
"rotation": 300
|
|
},
|
|
"stringParameters": {
|
|
"groundColor": "127;127;127",
|
|
"skyColor": "255;255;255",
|
|
"top": "Z+"
|
|
},
|
|
"booleanParameters": {}
|
|
},
|
|
{
|
|
"effectType": "Scene3D::DirectionalLight",
|
|
"name": "3D Sun Light",
|
|
"doubleParameters": {
|
|
"distanceFromCamera": 1500,
|
|
"elevation": 40,
|
|
"frustumSize": 4000,
|
|
"intensity": 0.75,
|
|
"minimumShadowBias": 0,
|
|
"rotation": 300
|
|
},
|
|
"stringParameters": {
|
|
"color": "255;255;255",
|
|
"shadowQuality": "medium",
|
|
"top": "Z+"
|
|
},
|
|
"booleanParameters": {
|
|
"isCastingShadow": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"behaviorsSharedData": [
|
|
{
|
|
"name": "Animation",
|
|
"type": "AnimatableCapability::AnimatableBehavior"
|
|
},
|
|
{
|
|
"name": "Effect",
|
|
"type": "EffectCapability::EffectBehavior"
|
|
},
|
|
{
|
|
"name": "FlashTransitionPainter",
|
|
"type": "FlashTransitionPainter::FlashTransitionPainter"
|
|
},
|
|
{
|
|
"name": "Flippable",
|
|
"type": "FlippableCapability::FlippableBehavior"
|
|
},
|
|
{
|
|
"name": "Opacity",
|
|
"type": "OpacityCapability::OpacityBehavior"
|
|
},
|
|
{
|
|
"name": "Resizable",
|
|
"type": "ResizableCapability::ResizableBehavior"
|
|
},
|
|
{
|
|
"name": "Scale",
|
|
"type": "ScalableCapability::ScalableBehavior"
|
|
},
|
|
{
|
|
"name": "Text",
|
|
"type": "TextContainerCapability::TextContainerBehavior"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"externalEvents": [
|
|
{
|
|
"associatedLayout": "Splash",
|
|
"name": "Functions",
|
|
"events": [
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Scene Start",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "SceneJustBegins"
|
|
},
|
|
"parameters": [
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "FlashTransitionPainter::FlashTransitionPainter::PaintEffect"
|
|
},
|
|
"parameters": [
|
|
"shp_fade",
|
|
"FlashTransitionPainter",
|
|
"\"0;0;0\"",
|
|
"1",
|
|
"\"Flash\"",
|
|
"\"Backward\"",
|
|
"255",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Wait"
|
|
},
|
|
"parameters": [
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"eventsFunctionsExtensions": [
|
|
{
|
|
"author": "Bouh",
|
|
"category": "Input",
|
|
"dimension": "",
|
|
"extensionNamespace": "",
|
|
"fullName": "Gamepads (controllers)",
|
|
"gdevelopVersion": ">=5.5.222",
|
|
"helpPath": "/all-features/gamepad",
|
|
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdhbWVwYWQtdmFyaWFudC1vdXRsaW5lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYsOUg4VjExSDEwVjEzSDhWMTVINlYxM0g0VjExSDZWOU0xOC41LDlBMS41LDEuNSAwIDAsMSAyMCwxMC41QTEuNSwxLjUgMCAwLDEgMTguNSwxMkExLjUsMS41IDAgMCwxIDE3LDEwLjVBMS41LDEuNSAwIDAsMSAxOC41LDlNMTUuNSwxMkExLjUsMS41IDAgMCwxIDE3LDEzLjVBMS41LDEuNSAwIDAsMSAxNS41LDE1QTEuNSwxLjUgMCAwLDEgMTQsMTMuNUExLjUsMS41IDAgMCwxIDE1LjUsMTJNMTcsNUE3LDcgMCAwLDEgMjQsMTJBNyw3IDAgMCwxIDE3LDE5QzE1LjA0LDE5IDEzLjI3LDE4LjIgMTIsMTYuOUMxMC43MywxOC4yIDguOTYsMTkgNywxOUE3LDcgMCAwLDEgMCwxMkE3LDcgMCAwLDEgNyw1SDE3TTcsN0E1LDUgMCAwLDAgMiwxMkE1LDUgMCAwLDAgNywxN0M4LjY0LDE3IDEwLjA5LDE2LjIxIDExLDE1SDEzQzEzLjkxLDE2LjIxIDE1LjM2LDE3IDE3LDE3QTUsNSAwIDAsMCAyMiwxMkE1LDUgMCAwLDAgMTcsN0g3WiIgLz48L3N2Zz4=",
|
|
"name": "Gamepads",
|
|
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/gamepad-variant-outline.svg",
|
|
"shortDescription": "Gamepad/controller support: buttons, sticks, triggers, vibration. Mapper behaviors for 2D/3D.",
|
|
"version": "0.9.2",
|
|
"description": [
|
|
"Add support for gamepads (or other physical controllers).",
|
|
"",
|
|
"It gives access to:",
|
|
"- button presses,",
|
|
"- axis positions and force,",
|
|
"- trigger pressure,",
|
|
"- configurable deadzone,",
|
|
"- vibration,",
|
|
"- automatic \"gamepad mapper\" behaviors for 2D and 3D movement behaviors (platformer characters, top-down movement, 3D character etc...). Add one of these to the object with the movement behavior (i.e: the player most of the time) and the behavior will then be controlled automatically by the gamepad (it works by reading the gamepad state and simulating controls). No need for additional events to make it work once the behaviors are set up.",
|
|
"",
|
|
"The Bomberman-like example handles 4 players with gamepads ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))."
|
|
],
|
|
"origin": {
|
|
"identifier": "Gamepads",
|
|
"name": "gdevelop-extension-store"
|
|
},
|
|
"tags": [
|
|
"controllers",
|
|
"gamepads",
|
|
"joysticks",
|
|
"axis",
|
|
"xbox",
|
|
"ps4",
|
|
"platformer",
|
|
"platform",
|
|
"top-down"
|
|
],
|
|
"authorIds": [
|
|
"2OwwM8ToR9dx9RJ2sAKTcrLmCB92",
|
|
"taRwmWxwAFYFL9yyBwB3cwBw0BO2",
|
|
"mnImQKdn8nQxwzkS5D6a1JB27V23",
|
|
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
|
|
],
|
|
"dependencies": [],
|
|
"globalVariables": [],
|
|
"sceneVariables": [
|
|
{
|
|
"name": "Buttons",
|
|
"type": "structure",
|
|
"children": [
|
|
{
|
|
"name": "A or Cross",
|
|
"type": "string",
|
|
"value": "A"
|
|
},
|
|
{
|
|
"name": "B or Circle",
|
|
"type": "string",
|
|
"value": "B"
|
|
},
|
|
{
|
|
"name": "LB or L1",
|
|
"type": "string",
|
|
"value": "LB"
|
|
},
|
|
{
|
|
"name": "LT or L2",
|
|
"type": "string",
|
|
"value": "LT"
|
|
},
|
|
{
|
|
"name": "RB or R1",
|
|
"type": "string",
|
|
"value": "RB"
|
|
},
|
|
{
|
|
"name": "RT or R2",
|
|
"type": "string",
|
|
"value": "RT"
|
|
},
|
|
{
|
|
"name": "X or Square",
|
|
"type": "string",
|
|
"value": "X"
|
|
},
|
|
{
|
|
"name": "Y or Triangle",
|
|
"type": "string",
|
|
"value": "Y"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onFirstSceneLoaded",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"if (gdjs._extensionController) {\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * Associate controller button ids to button names\r",
|
|
" */\r",
|
|
"const controllerButtonNames = {\r",
|
|
" \"XBOX\": {\r",
|
|
" 0: \"A\",\r",
|
|
" 1: \"B\",\r",
|
|
" 2: \"X\",\r",
|
|
" 3: \"Y\",\r",
|
|
" 4: \"LB\",\r",
|
|
" 5: \"RB\",\r",
|
|
" 6: \"LT\",\r",
|
|
" 7: \"RT\",\r",
|
|
" 8: \"BACK\",\r",
|
|
" 9: \"START\",\r",
|
|
" 10: \"CLICK_STICK_LEFT\",\r",
|
|
" 11: \"CLICK_STICK_RIGHT\",\r",
|
|
" 12: \"UP\",\r",
|
|
" 13: \"DOWN\",\r",
|
|
" 14: \"LEFT\",\r",
|
|
" 15: \"RIGHT\",\r",
|
|
" 16: \"NONE\",\r",
|
|
" 17: \"NONE\"\r",
|
|
" },\r",
|
|
" \"PS4\": {\r",
|
|
" 0: \"CROSS\",\r",
|
|
" 1: \"CIRCLE\",\r",
|
|
" 2: \"SQUARE\",\r",
|
|
" 3: \"TRIANGLE\",\r",
|
|
" 4: \"L1\",\r",
|
|
" 5: \"R1\",\r",
|
|
" 6: \"L2\",\r",
|
|
" 7: \"R2\",\r",
|
|
" 8: \"SHARE\",\r",
|
|
" 9: \"OPTIONS\",\r",
|
|
" 10: \"CLICK_STICK_LEFT\",\r",
|
|
" 11: \"CLICK_STICK_RIGHT\",\r",
|
|
" 12: \"UP\",\r",
|
|
" 13: \"DOWN\",\r",
|
|
" 14: \"LEFT\",\r",
|
|
" 15: \"RIGHT\",\r",
|
|
" 16: \"PS_BUTTON\",\r",
|
|
" 17: \"CLICK_TOUCHPAD\"\r",
|
|
" }\r",
|
|
"};\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {number} playerId\r",
|
|
" */\r",
|
|
"function getGamepad(playerId) {\r",
|
|
" /** @type {Gamepad[]} */\r",
|
|
" const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r",
|
|
" return gamepads[playerId];\r",
|
|
"}\r",
|
|
"\r",
|
|
"/** @type {{[playerId: number]: Player}} */\r",
|
|
"const players = {};\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {number} playerId\r",
|
|
" */\r",
|
|
"function getPlayer(playerId) {\r",
|
|
" let player = players[playerId];\r",
|
|
" if (!player) {\r",
|
|
" player = new Player(playerId);\r",
|
|
" players[playerId] = player;\r",
|
|
" }\r",
|
|
" return player;\r",
|
|
"}\r",
|
|
"\r",
|
|
"class Player {\r",
|
|
" /** @type {number} */\r",
|
|
" playerId;\r",
|
|
" mapping = 'DEFAULT';\r",
|
|
" lastButtonUsed = -1;\r",
|
|
" deadzone = 0.2;\r",
|
|
" /** @type {{[buttonId: number]: ButtonState}} */\r",
|
|
" buttonStates = {};\r",
|
|
" rumble = { elapsedTime: 0, duration: 0, weakMagnitude: 0, strongMagnitude: 0 };\r",
|
|
"\r",
|
|
" /**\r",
|
|
" * @param {number} playerId\r",
|
|
" */\r",
|
|
" constructor(playerId) {\r",
|
|
" this.playerId = playerId;\r",
|
|
" }\r",
|
|
"\r",
|
|
" /**\r",
|
|
" * @param {number} buttonId\r",
|
|
" */\r",
|
|
" getButtonState(buttonId) {\r",
|
|
" let buttonState = this.buttonStates[buttonId];\r",
|
|
" if (!buttonState) {\r",
|
|
" buttonState = new ButtonState();\r",
|
|
" this.buttonStates[buttonId] = buttonState;\r",
|
|
" }\r",
|
|
" return buttonState;\r",
|
|
" }\r",
|
|
"\r",
|
|
" /**\r",
|
|
" * @param {number} buttonId\r",
|
|
" */\r",
|
|
" isButtonPressed(buttonId) {\r",
|
|
" return this.getButtonState(buttonId).isPressed;\r",
|
|
" }\r",
|
|
"\r",
|
|
" /**\r",
|
|
" * @param {number} buttonId\r",
|
|
" */\r",
|
|
" isButtonJustPressed(buttonId) {\r",
|
|
" return this.getButtonState(buttonId).isJustPressed();\r",
|
|
" }\r",
|
|
"\r",
|
|
" /**\r",
|
|
" * @param {number} buttonId\r",
|
|
" */\r",
|
|
" isButtonReleased(buttonId) {\r",
|
|
" return this.getButtonState(buttonId).isReleased();\r",
|
|
" }\r",
|
|
"\r",
|
|
" isAnyButtonReleased() {\r",
|
|
" for (const buttonId in this.buttonStates) {\r",
|
|
" const buttonState = this.buttonStates[buttonId];\r",
|
|
" if (buttonState.isReleased()) {\r",
|
|
" return true;\r",
|
|
" }\r",
|
|
" }\r",
|
|
" return false;\r",
|
|
" }\r",
|
|
"\r",
|
|
" isAnyButtonPressed() {\r",
|
|
" for (const buttonId in this.buttonStates) {\r",
|
|
" const buttonState = this.buttonStates[buttonId];\r",
|
|
" if (buttonState.isPressed) {\r",
|
|
" return true;\r",
|
|
" }\r",
|
|
" }\r",
|
|
" return false;\r",
|
|
" }\r",
|
|
"}\r",
|
|
"\r",
|
|
"class ButtonState {\r",
|
|
" wasPressed = false;\r",
|
|
" isPressed = false;\r",
|
|
"\r",
|
|
" isReleased() {\r",
|
|
" return this.wasPressed && !this.isPressed;\r",
|
|
" }\r",
|
|
"\r",
|
|
" isJustPressed() {\r",
|
|
" return !this.wasPressed && this.isPressed;\r",
|
|
" }\r",
|
|
"}\r",
|
|
"\r",
|
|
"// Async tasks are run before everything.\r",
|
|
"// This is a hack to make sure that button states are updated\r",
|
|
"// before mapping behavior events.\r",
|
|
"const frameBeginningTask = new class extends gdjs.AsyncTask {\r",
|
|
" update() {\r",
|
|
" /** @type {Gamepad[]} */\r",
|
|
" const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r",
|
|
" for (let playerId = 0; playerId < gamepads.length; playerId++) {\r",
|
|
" const gamepad = gamepads[playerId];\r",
|
|
" if (gamepad == null) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" continue;\r",
|
|
" }\r",
|
|
" const player = getPlayer(playerId);\r",
|
|
"\r",
|
|
" for (let buttonId = 0; buttonId < Object.keys(gamepad.buttons).length; buttonId++) {\r",
|
|
" const buttonState = player.getButtonState(buttonId);\r",
|
|
" buttonState.wasPressed = buttonState.isPressed;\r",
|
|
" buttonState.isPressed = gamepad.buttons[buttonId].pressed;\r",
|
|
" if (buttonState.isJustPressed()) {\r",
|
|
" player.lastButtonUsed = buttonId;\r",
|
|
" }\r",
|
|
" }\r",
|
|
" }\r",
|
|
" return false;\r",
|
|
" }\r",
|
|
"}();\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {gdjs.RuntimeScene} runtimeScene\r",
|
|
" */\r",
|
|
"function addFrameBeginningTaskIfNeeded(runtimeScene) {\r",
|
|
" const taskManager = runtimeScene.getAsyncTasksManager();\r",
|
|
" for (const taskWithCallback of taskManager.tasksWithCallback) {\r",
|
|
" if (taskWithCallback.asyncTask === frameBeginningTask) {\r",
|
|
" return;\r",
|
|
" }\r",
|
|
" }\r",
|
|
" // Async tasks are run before everything.\r",
|
|
" // This is a hack to make sure that button states are updated\r",
|
|
" // before mapping behavior events.\r",
|
|
" taskManager.addTask(frameBeginningTask);\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {gdjs.RuntimeScene} runtimeScene\r",
|
|
" */\r",
|
|
"function onScenePostEvents(runtimeScene) {\r",
|
|
" addFrameBeginningTaskIfNeeded(runtimeScene);\r",
|
|
" /** @type {Gamepad[]} */\r",
|
|
" const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r",
|
|
" for (let playerId = 0; playerId < gamepads.length; playerId++) {\r",
|
|
" let gamepad = gamepads[playerId];\r",
|
|
" if (gamepad == null) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" continue;\r",
|
|
" }\r",
|
|
" const player = getPlayer(playerId);\r",
|
|
" const rumble = player.rumble;\r",
|
|
" rumble.elapsedTime += runtimeScene.getElapsedTime(runtimeScene) / 1000;\r",
|
|
" if (rumble.duration - rumble.elapsedTime <= 0 &&\r",
|
|
" (rumble.weakMagnitude || rumble.strongMagnitude)\r",
|
|
" ) {\r",
|
|
" rumble.weakMagnitude = 0;\r",
|
|
" rumble.strongMagnitude = 0;\r",
|
|
" }\r",
|
|
" }\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {string} type\r",
|
|
" * @param {number} buttonId\r",
|
|
" */\r",
|
|
"function getInputString(type, buttonId) {\r",
|
|
" if (!controllerButtonNames[type]) {\r",
|
|
" return \"UNKNOWN_BUTTON\";\r",
|
|
" }\r",
|
|
" return controllerButtonNames[type][buttonId];\r",
|
|
"}\r",
|
|
"\r",
|
|
"function getButtonId(buttonName) {\r",
|
|
" switch (buttonName) {\r",
|
|
" case 'A':\r",
|
|
" case 'CROSS':\r",
|
|
" return 0;\r",
|
|
" case 'B':\r",
|
|
" case 'CIRCLE':\r",
|
|
" return 1;\r",
|
|
" case 'X':\r",
|
|
" case 'SQUARE':\r",
|
|
" return 2;\r",
|
|
" case 'Y':\r",
|
|
" case 'TRIANGLE':\r",
|
|
" return 3;\r",
|
|
" case 'LB':\r",
|
|
" case 'L1':\r",
|
|
" return 4;\r",
|
|
" case 'RB':\r",
|
|
" case 'R1':\r",
|
|
" return 5;\r",
|
|
" case 'LT':\r",
|
|
" case 'L2':\r",
|
|
" return 6;\r",
|
|
" case 'RT':\r",
|
|
" case 'R2':\r",
|
|
" return 7;\r",
|
|
" case 'UP':\r",
|
|
" return 12;\r",
|
|
" case 'DOWN':\r",
|
|
" return 13;\r",
|
|
" case 'LEFT':\r",
|
|
" return 14;\r",
|
|
" case 'RIGHT':\r",
|
|
" return 15;\r",
|
|
" case 'BACK':\r",
|
|
" case 'SHARE':\r",
|
|
" return 8;\r",
|
|
" case 'START':\r",
|
|
" case 'OPTIONS':\r",
|
|
" return 9;\r",
|
|
" case 'CLICK_STICK_LEFT':\r",
|
|
" return 10;\r",
|
|
" case 'CLICK_STICK_RIGHT':\r",
|
|
" return 11;\r",
|
|
" //PS4\r",
|
|
" case 'PS_BUTTON':\r",
|
|
" return 16;\r",
|
|
" case 'CLICK_TOUCHPAD':\r",
|
|
" return 17;\r",
|
|
" default:\r",
|
|
" console.error('The gamepad button: ' + buttonName + ' is not valid.');\r",
|
|
" return null;\r",
|
|
" }\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {number} playerId\r",
|
|
" * @param {string} directionName\r",
|
|
" * @param {number} axisValueX\r",
|
|
" * @param {number} axisValueY\r",
|
|
" */\r",
|
|
"function isAxisPushed(playerId, directionName, axisValueX, axisValueY) {\r",
|
|
" switch (directionName) {\r",
|
|
" case 'LEFT':\r",
|
|
" return getNormalizedAxisValue(axisValueX, playerId) < 0;\r",
|
|
" case 'RIGHT':\r",
|
|
" return getNormalizedAxisValue(axisValueX, playerId) > 0;\r",
|
|
" case 'UP':\r",
|
|
" return getNormalizedAxisValue(axisValueY, playerId) < 0;\r",
|
|
" case 'DOWN':\r",
|
|
" return getNormalizedAxisValue(axisValueY, playerId) > 0;\r",
|
|
" case 'ANY':\r",
|
|
" return getNormalizedAxisValue(axisValueX, playerId) < 0\r",
|
|
" || getNormalizedAxisValue(axisValueX, playerId) > 0\r",
|
|
" || getNormalizedAxisValue(axisValueY, playerId) < 0\r",
|
|
" || getNormalizedAxisValue(axisValueY, playerId) > 0\r",
|
|
" default:\r",
|
|
" console.error('The value stick direction is not valid.');\r",
|
|
" return false;\r",
|
|
" }\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {number} deltaX\r",
|
|
" * @param {number} deltaY\r",
|
|
" */\r",
|
|
"function axisToAngle(deltaX, deltaY) {\r",
|
|
" const rad = Math.atan2(deltaY, deltaX);\r",
|
|
" const deg = rad * (180 / Math.PI);\r",
|
|
" return deg;\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * @param {{id: string}} gamepad\r",
|
|
" */\r",
|
|
"function isXbox(gamepad) {\r",
|
|
" return (gamepad ? (\r",
|
|
" gamepad.id.toUpperCase().indexOf(\"XBOX\") !== -1\r",
|
|
" // \"XINPUT\" cannot be used to check if it is a xbox controller is just a generic\r",
|
|
" // name reported in Firefox corresponding to the driver being used by the controller\r",
|
|
" // https://gamefaqs.gamespot.com/boards/916373-pc/73341312?page=1\r",
|
|
" ) : false);\r",
|
|
"}\r",
|
|
"\r",
|
|
"/**\r",
|
|
" * Returns the new value taking into account the dead zone for the player_ID given\r",
|
|
" * @param {number} value\r",
|
|
" * @param {number} playerID\r",
|
|
" */\r",
|
|
"function getNormalizedAxisValue(value, playerID) {\r",
|
|
" // gdjs._extensionController = gdjs._extensionController || { deadzone: 0.2 };\r",
|
|
"\r",
|
|
" // Anything smaller than this is assumed to be 0,0\r",
|
|
" const deadzone = getPlayer(playerID).deadzone;\r",
|
|
"\r",
|
|
" if (Math.abs(value) < deadzone) {\r",
|
|
" return 0;\r",
|
|
" } else {\r",
|
|
" // We're outside the dead zone, but we'd like to smooth\r",
|
|
" // this value out so it still runs nicely between 0..1.\r",
|
|
" // That is, we don't want it to jump suddenly from 0 to\r",
|
|
" // deadzone.\r",
|
|
"\r",
|
|
" // Remap value from\r",
|
|
" // deadzone..1 to 0..(1-deadzone)\r",
|
|
" // or from\r",
|
|
" // -1..-deadzone to -(1-deadzone)..0\r",
|
|
" value = value - Math.sign(value) * deadzone;\r",
|
|
"\r",
|
|
" // Remap value from\r",
|
|
" // 0..(1-deadzone) to 0..1\r",
|
|
" // or from\r",
|
|
" // -(1-deadzone)..0 to -1..0\r",
|
|
" return value / (1 - deadzone);\r",
|
|
" }\r",
|
|
"}\r",
|
|
"\r",
|
|
"gdjs._extensionController = {\r",
|
|
" getPlayer,\r",
|
|
" controllerButtonNames,\r",
|
|
" getInputString,\r",
|
|
" getButtonId,\r",
|
|
" axisToAngle,\r",
|
|
" isXbox,\r",
|
|
" getNormalizedAxisValue,\r",
|
|
" isAxisPushed,\r",
|
|
" getGamepad,\r",
|
|
" onScenePostEvents,\r",
|
|
" frameBeginningTask,\r",
|
|
" addFrameBeginningTaskIfNeeded,\r",
|
|
"}"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onSceneLoaded",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": "gdjs._extensionController.addFrameBeginningTaskIfNeeded(runtimeScene);",
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": false
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onScenePostEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"gdjs._extensionController.onScenePostEvents(runtimeScene);",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "Accelerated speed",
|
|
"functionType": "Expression",
|
|
"name": "AcceleratedSpeed",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"CurrentSpeed"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TargetedSpeed",
|
|
"<",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Reduce the speed to match the stick force."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
"<",
|
|
"TargetedSpeed"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"min(TargetedSpeed, CurrentSpeed + Acceleration * TimeDelta())"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
">",
|
|
"TargetedSpeed"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
"<",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"-",
|
|
"Acceleration * TimeDelta()"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Turn back at least as fast as it would stop."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
">=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"max(TargetedSpeed, CurrentSpeed - max(Acceleration , Deceleration) * TimeDelta())"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TargetedSpeed",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Reduce the speed to match the stick force."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
">",
|
|
"TargetedSpeed"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"max(TargetedSpeed, CurrentSpeed - Acceleration * TimeDelta())"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
"<",
|
|
"TargetedSpeed"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"+",
|
|
"Acceleration * TimeDelta()"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Turn back at least as fast as it would stop."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
"<=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"min(TargetedSpeed, CurrentSpeed + max(Acceleration , Deceleration) * TimeDelta())"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TargetedSpeed",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
"<",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"min(0, CurrentSpeed + Acceleration * TimeDelta())"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentSpeed",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"AcceleratedSpeed",
|
|
"=",
|
|
"max(0, CurrentSpeed - Acceleration * TimeDelta())"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"clamp(AcceleratedSpeed, -SpeedMax, SpeedMax)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"variables": [
|
|
{
|
|
"name": "AcceleratedSpeed",
|
|
"type": "number",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Current speed",
|
|
"name": "CurrentSpeed",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Targeted speed",
|
|
"name": "TargetedSpeed",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Max speed",
|
|
"name": "SpeedMax",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Acceleration",
|
|
"name": "Acceleration",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Deceleration",
|
|
"name": "Deceleration",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Get the value of the pressure on a gamepad trigger.",
|
|
"fullName": "Pressure on a gamepad trigger",
|
|
"functionType": "Expression",
|
|
"name": "TriggerPressure",
|
|
"sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const trigger = eventsFunctionContext.getArgument(\"Trigger\").toUpperCase();\r",
|
|
"\r",
|
|
"if (trigger != \"LT\" && trigger != \"RT\" && trigger != \"L2\" && trigger != \"R2\") {\r",
|
|
" console.error('Parameter trigger is not valid in expression: \"Pressure on a gamepad trigger\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"switch (trigger) {\r",
|
|
" case 'LT':\r",
|
|
" case 'L2':\r",
|
|
" eventsFunctionContext.returnValue = gamepad.buttons[6].value;\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'RT':\r",
|
|
" case 'R2':\r",
|
|
" eventsFunctionContext.returnValue = gamepad.buttons[7].value;\r",
|
|
" break;\r",
|
|
"\r",
|
|
" default:\r",
|
|
" eventsFunctionContext.returnValue = -1;\r",
|
|
" break;\r",
|
|
"}"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Trigger button",
|
|
"name": "Trigger",
|
|
"supplementaryInformation": "[\"LT\",\"RT\",\"L2\",\"R2\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the force of gamepad stick (from 0 to 1).",
|
|
"fullName": "Stick force",
|
|
"functionType": "ExpressionAndCondition",
|
|
"name": "StickForce",
|
|
"sentence": "the gamepad _PARAM1_ _PARAM2_ stick force",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const { getNormalizedAxisValue } = gdjs._extensionController;\r",
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r",
|
|
"\r",
|
|
"if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r",
|
|
" console.error('Parameter stick is not valid in expression: \"Value of a stick force\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r",
|
|
"const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r",
|
|
"\r",
|
|
"eventsFunctionContext.returnValue = gdjs.evtTools.common.clamp(\r",
|
|
" Math.abs(getNormalizedAxisValue(axisValueX, playerId)) +\r",
|
|
" Math.abs(getNormalizedAxisValue(axisValueY, playerId)), 0, 1);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "Stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Get the rotation value of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.",
|
|
"fullName": "Value of a stick rotation (deprecated)",
|
|
"functionType": "Expression",
|
|
"name": "StickRotationValue",
|
|
"private": true,
|
|
"sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"Gamepads::StickAngle(PlayerId, Stick)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "Stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the angle of a gamepad stick.\nIf the deadzone value is high, the angle value is rounded to main axes, left, left, up, down.\nAn zero deadzone value give a total freedom on the angle value.",
|
|
"fullName": "Stick angle",
|
|
"functionType": "Expression",
|
|
"name": "StickAngle",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const { getNormalizedAxisValue } = gdjs._extensionController;\r",
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const stick = eventsFunctionContext.getArgument(\"Stick\").toUpperCase();\r",
|
|
"\r",
|
|
"if (stick !== \"LEFT\" && stick !== \"RIGHT\") {\r",
|
|
" console.error('Parameter stick is not valid in expression: \"Value of a stick rotation\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r",
|
|
"const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r",
|
|
"\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.axisToAngle(\r",
|
|
" getNormalizedAxisValue(axisValueX, playerId),\r",
|
|
" getNormalizedAxisValue(axisValueY, playerId));"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "Stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Get the value of axis of a gamepad stick.",
|
|
"fullName": "Value of a gamepad axis (deprecated)",
|
|
"functionType": "Expression",
|
|
"name": "AxisValue",
|
|
"private": true,
|
|
"sentence": "Player _PARAM1_ push axis _PARAM2_ to _PARAM3_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r",
|
|
"const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r",
|
|
"\r",
|
|
"if (stick != \"LEFT\" && stick != \"RIGHT\") {\r",
|
|
" console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"HORIZONTAL\" && direction != \"VERTICAL\") {\r",
|
|
" console.error('Parameter direction is not valid in expression: \"Value of a gamepad axis\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"let parameterError = false;\r",
|
|
"switch (stick) {\r",
|
|
" case 'LEFT':\r",
|
|
" switch (direction) {\r",
|
|
" case 'LEFT':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) < 0) {\r",
|
|
" eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'RIGHT':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId) > 0) {\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'UP':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) < 0) {\r",
|
|
" eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'DOWN':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId) > 0) {\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case \"HORIZONTAL\":\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[0], playerId);\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case \"VERTICAL\":\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[1], playerId);\r",
|
|
" break;\r",
|
|
"\r",
|
|
" default:\r",
|
|
" break;\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'RIGHT':\r",
|
|
" switch (direction) {\r",
|
|
" case 'LEFT':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) < 0) {\r",
|
|
" eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'RIGHT':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId) > 0) {\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'UP':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) < 0) {\r",
|
|
" eventsFunctionContext.returnValue = -gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case 'DOWN':\r",
|
|
" if (gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId) > 0) {\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case \"HORIZONTAL\":\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[2], playerId);\r",
|
|
" break;\r",
|
|
"\r",
|
|
" case \"VERTICAL\":\r",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[3], playerId);\r",
|
|
" break;\r",
|
|
"\r",
|
|
" default:\r",
|
|
" break;\r",
|
|
" }\r",
|
|
" break;\r",
|
|
"\r",
|
|
" default:\r",
|
|
" break;\r",
|
|
"}\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
},
|
|
{
|
|
"description": "Direction",
|
|
"name": "direction",
|
|
"supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"Horizontal\",\"Vertical\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the gamepad stick force on X axis (from -1 at the left to 1 at the right).",
|
|
"fullName": "Stick X force",
|
|
"functionType": "Expression",
|
|
"name": "StickForceX",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r",
|
|
"const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r",
|
|
"\r",
|
|
"if (stick != \"left\" && stick != \"right\") {\r",
|
|
" console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const axisIndex = stick === 'right' ? 2 : 0;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "Gamepad",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "Stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the gamepad stick force on Y axis (from -1 at the top to 1 at the bottom).",
|
|
"fullName": "Stick Y force",
|
|
"functionType": "Expression",
|
|
"name": "StickForceY",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"Gamepad\") - 1;\r",
|
|
"const stick = eventsFunctionContext.getArgument(\"Stick\").toLowerCase();\r",
|
|
"\r",
|
|
"if (stick != \"left\" && stick != \"right\") {\r",
|
|
" console.error('Parameter stick is not valid in expression: \"Value of a gamepad axis\"');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const axisIndex = stick === 'right' ? 3 : 1;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getNormalizedAxisValue(gamepad.axes[axisIndex], playerId);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "Gamepad",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "Stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Test if a button is released on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".",
|
|
"fullName": "Gamepad button released",
|
|
"functionType": "Condition",
|
|
"name": "C_Button_released",
|
|
"sentence": "Button _PARAM2_ of gamepad _PARAM1_ is released",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r",
|
|
"\r",
|
|
"let buttonId = gdjs._extensionController.getButtonId(button);\r",
|
|
"if (buttonId === null) {\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const player = gdjs._extensionController.getPlayer(playerId)\r",
|
|
"eventsFunctionContext.returnValue = player.isButtonReleased(buttonId);"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Name of the button",
|
|
"name": "Button",
|
|
"supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if a button was just pressed on a gamepad. Buttons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".",
|
|
"fullName": "Gamepad button just pressed",
|
|
"functionType": "Condition",
|
|
"name": "IsButtonJustPressed",
|
|
"sentence": "Button _PARAM2_ of gamepad _PARAM1_ was just pressed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const button = eventsFunctionContext.getArgument(\"Button\").toUpperCase();\r",
|
|
"\r",
|
|
"let buttonId = gdjs._extensionController.getButtonId(button);\r",
|
|
"if (buttonId === null) {\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const player = gdjs._extensionController.getPlayer(playerId)\r",
|
|
"eventsFunctionContext.returnValue = player.isButtonJustPressed(buttonId);"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Name of the button",
|
|
"name": "Button",
|
|
"supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the index of the last pressed button of a gamepad.",
|
|
"fullName": "Last pressed button (id)",
|
|
"functionType": "Expression",
|
|
"name": "LastButtonID",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if any button is pressed on a gamepad.",
|
|
"fullName": "Any gamepad button pressed",
|
|
"functionType": "Condition",
|
|
"name": "C_Any_Button_pressed",
|
|
"sentence": "Any button of gamepad _PARAM1_ is pressed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const player = gdjs._extensionController.getPlayer(playerId)\r",
|
|
"eventsFunctionContext.returnValue = player.isAnyButtonPressed();\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the last button pressed. \nButtons for Xbox and PS4 can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Both: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".",
|
|
"fullName": "Last pressed button (string)",
|
|
"functionType": "StringExpression",
|
|
"name": "LastButtonString",
|
|
"sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const lastButtonUsedID = gdjs._extensionController.getPlayer(playerId).lastButtonUsed;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getInputString(controllerType, lastButtonUsedID);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "string"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Controller type",
|
|
"name": "controller_type",
|
|
"supplementaryInformation": "[\"Xbox\",\"PS4\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the number of gamepads.",
|
|
"fullName": "Gamepad count",
|
|
"functionType": "Expression",
|
|
"name": "GamepadCount",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r",
|
|
"let lastGamepadIndex = -1;\r",
|
|
"for (let playerId = 0; playerId < gamepads.length; playerId++) {\r",
|
|
" // Gamepads can be disconnected and become null\r",
|
|
" if (gamepads[playerId]) {\r",
|
|
" lastGamepadIndex = playerId\r",
|
|
" }\r",
|
|
"}\r",
|
|
"eventsFunctionContext.returnValue = lastGamepadIndex + 1;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if a button is pressed on a gamepad. \nButtons can be:\n* Xbox: \"A\", \"B\", \"X\", \"Y\", \"LB\", \"RB\", \"LT\", \"RT\", \"BACK\", \"START\",\n* PS4: \"CROSS\", \"SQUARE\", \"CIRCLE\", \"TRIANGLE\", \"L1\", \"L2\", \"R1\", \"R2\", \"SHARE\", \"OPTIONS\", \"PS_BUTTON\", \"CLICK_TOUCHPAD\",\n* Other: \"UP\", \"DOWN\", \"LEFT\", \"RIGHT\", \"CLICK_STICK_LEFT\", \"CLICK_STICK_RIGHT\".",
|
|
"fullName": "Gamepad button pressed",
|
|
"functionType": "Condition",
|
|
"name": "C_Button_pressed",
|
|
"sentence": "Button _PARAM2_ of gamepad _PARAM1_ is pressed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const button = eventsFunctionContext.getArgument(\"button\").toUpperCase();\r",
|
|
"\r",
|
|
"const buttonId = gdjs._extensionController.getButtonId(button);\r",
|
|
"if (buttonId === null) {\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const player = gdjs._extensionController.getPlayer(playerId)\r",
|
|
"eventsFunctionContext.returnValue = player.isButtonPressed(buttonId);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Name of the button",
|
|
"name": "button",
|
|
"supplementaryInformation": "[\"A\",\"Cross\",\"B\",\"Circle\",\"X\",\"Square\",\"Y\",\"Triangle\",\"LB\",\"L1\",\"RB\",\"R1\",\"LT\",\"L2\",\"RT\",\"R2\",\"Up\",\"Down\",\"Left\",\"Right\",\"Back\",\"Share\",\"Start\",\"Options\",\"Click_Stick_Left\",\"Click_Stick_Right\",\"PS_Button\",\"Click_Touchpad\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the value of the deadzone applied to a gamepad sticks, between 0 and 1.",
|
|
"fullName": "Gamepad deadzone for sticks",
|
|
"functionType": "Expression",
|
|
"name": "Deadzone",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": []
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).deadzone;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Set the deadzone for sticks of the gamepad. The deadzone is an area for which movement on sticks won't be taken into account (instead, the stick will be considered as not moved). Deadzone is between 0 and 1, and is by default 0.2.",
|
|
"fullName": "Set gamepad deadzone for sticks",
|
|
"functionType": "Action",
|
|
"name": "A_Set_deadzone",
|
|
"sentence": "Set deadzone for sticks on gamepad: _PARAM1_ to _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const newDeadzone = eventsFunctionContext.getArgument(\"deadzone\");\r",
|
|
"\r",
|
|
"// https://github.com/4ian/GDevelop-extensions/pull/33#issuecomment-618224857\r",
|
|
"gdjs._extensionController.getPlayer(playerId).deadzone = gdjs.evtTools.common.clamp(newDeadzone, 0, 1);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Deadzone for sticks, 0.2 by default (0 to 1)",
|
|
"name": "deadzone",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if a stick of a gamepad is pushed in a given direction.",
|
|
"fullName": "Gamepad stick pushed (axis)",
|
|
"functionType": "Condition",
|
|
"name": "C_Axis_pushed",
|
|
"sentence": "_PARAM2_ stick of gamepad _PARAM1_ is pushed in direction _PARAM3_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const stick = eventsFunctionContext.getArgument(\"stick\").toUpperCase();\r",
|
|
"const direction = eventsFunctionContext.getArgument(\"direction\").toUpperCase();\r",
|
|
"\r",
|
|
"if (stick != \"LEFT\" && stick != \"RIGHT\") {\r",
|
|
" console.error('Parameter stick in condition: \"Gamepad stick pushed (axis)\", is not valid, must be LEFT or RIGHT');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"if (direction != \"UP\" && direction != \"DOWN\" && direction != \"LEFT\" && direction != \"RIGHT\" && direction != \"ANY\") {\r",
|
|
" console.error('Parameter direction in condition: \"Gamepad stick pushed (axis)\", is not valid, must be UP, DOWN, LEFT or RIGHT');\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"/** @type {Gamepad} */\r",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);\r",
|
|
"if (!gamepad) {\r",
|
|
" // The gamepad is not connected.\r",
|
|
" return;\r",
|
|
"}\r",
|
|
"const axisValueX = stick === 'RIGHT' ? gamepad.axes[2] : gamepad.axes[0];\r",
|
|
"const axisValueY = stick === 'RIGHT' ? gamepad.axes[3] : gamepad.axes[1];\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.isAxisPushed(playerId, direction, axisValueX, axisValueY);\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Stick: \"Left\" or \"Right\"",
|
|
"name": "stick",
|
|
"supplementaryInformation": "[\"Left\",\"Right\"]",
|
|
"type": "stringWithSelector"
|
|
},
|
|
{
|
|
"description": "Direction",
|
|
"name": "direction",
|
|
"supplementaryInformation": "[\"Up\",\"Down\",\"Left\",\"Right\",\"Any\"]",
|
|
"type": "stringWithSelector"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the number of connected gamepads.",
|
|
"fullName": "Connected gamepads count",
|
|
"functionType": "Expression",
|
|
"name": "ConnectedGamepadsCount",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r",
|
|
"let connectedGamepadCount = 0;\r",
|
|
"for (let playerId = 0; playerId < gamepads.length; playerId++) {\r",
|
|
" // Gamepads can be disconnected and become null\r",
|
|
" if (gamepads[playerId]) {\r",
|
|
" connectedGamepadCount++;\r",
|
|
" }\r",
|
|
"}\r",
|
|
"eventsFunctionContext.returnValue = connectedGamepadCount;\r",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return a string containing informations about the specified gamepad.",
|
|
"fullName": "Gamepad type",
|
|
"functionType": "StringExpression",
|
|
"name": "GamepadType",
|
|
"sentence": "Player _PARAM1_ use _PARAM2_ controller",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;",
|
|
"/** @type {Gamepad} */",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);",
|
|
"if (!gamepad) {",
|
|
" // The gamepad is not connected.",
|
|
" return;",
|
|
"}",
|
|
"eventsFunctionContext.returnValue = (gamepad && gamepad.id) ? gamepad.id : \"No information for player \" + (playerId + 1)",
|
|
""
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "string"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the specified gamepad has the specified information in its description. Useful to know if the gamepad is a Xbox or PS4 controller.",
|
|
"fullName": "Gamepad type",
|
|
"functionType": "Condition",
|
|
"name": "C_Controller_type",
|
|
"sentence": "Gamepad _PARAM1_ is a _PARAM2_ controller",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;",
|
|
"const controllerType = eventsFunctionContext.getArgument(\"controller_type\").toUpperCase();",
|
|
"/** @type {Gamepad} */",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);",
|
|
"if (!gamepad) {",
|
|
" // The gamepad is not connected.",
|
|
" return;",
|
|
"}",
|
|
"if (controllerType == \"XBOX\") {",
|
|
" eventsFunctionContext.returnValue = gdjs._extensionController.isXbox(gamepad);",
|
|
"} else {",
|
|
" eventsFunctionContext.returnValue = gamepad ? gamepad.id.toUpperCase().indexOf(controllerType) !== -1 : false;",
|
|
"}"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Type: \"Xbox\", \"PS4\", \"Steam\" or \"PS3\" (among other)",
|
|
"name": "controller_type",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if a gamepad is connected.",
|
|
"fullName": "Gamepad connected",
|
|
"functionType": "Condition",
|
|
"name": "C_Controller_X_is_connected",
|
|
"sentence": "Gamepad _PARAM1_ is plugged and connected",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;",
|
|
"/** @type {Gamepad[]} */",
|
|
"const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];",
|
|
"// If gamepad was disconnected it will be null (so this will return false)",
|
|
"// If gamepad was never connected it will be undefined (so this will return false)",
|
|
"eventsFunctionContext.returnValue = !!gamepads[playerId];"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Generate a vibration on the specified controller. Might only work if the game is running in a recent web browser.",
|
|
"fullName": "Gamepad vibration",
|
|
"functionType": "Action",
|
|
"name": "A_Vibrate_controller",
|
|
"sentence": "Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;",
|
|
"const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;",
|
|
"/** @type {Gamepad} */",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);",
|
|
"if (!gamepad) {",
|
|
" // The gamepad is not connected.",
|
|
" return;",
|
|
"}",
|
|
"//Vibration work only on game in browser.",
|
|
"if (gamepad.vibrationActuator) {",
|
|
" gamepad.vibrationActuator.playEffect(\"dual-rumble\", {",
|
|
" startDelay: 0,",
|
|
" duration: duration * 1000,",
|
|
" weakMagnitude: 1.0,",
|
|
" strongMagnitude: 1.0",
|
|
" });",
|
|
"}"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Time of the vibration, in seconds (optional, default value is 1)",
|
|
"name": "Duration",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Generate an advanced vibration on the specified controller. Incompatible with Firefox.",
|
|
"fullName": "Advanced gamepad vibration",
|
|
"functionType": "Action",
|
|
"name": "A_Advanced_Vibration_Controller",
|
|
"sentence": "Make gamepad _PARAM1_ vibrate for _PARAM2_ seconds with the vibration magnitude of _PARAM3_ and _PARAM4_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const { clamp } = gdjs.evtTools.common;",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;",
|
|
"const duration = eventsFunctionContext.getArgument(\"Duration\") || 1;",
|
|
"const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);",
|
|
"const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);",
|
|
"/** @type {Gamepad} */",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);",
|
|
"if (!gamepad) {",
|
|
" // The gamepad is not connected.",
|
|
" return;",
|
|
"}",
|
|
"//Vibration work only on game in browser.",
|
|
"if (gamepad.vibrationActuator) {",
|
|
" gamepad.vibrationActuator.playEffect(\"dual-rumble\", {",
|
|
" startDelay: 0,",
|
|
" duration: duration * 1000,",
|
|
" weakMagnitude: weakRumbleMagnitude,",
|
|
" strongMagnitude: strongRumbleMagnitude",
|
|
" });",
|
|
"}",
|
|
"const player = gdjs._extensionController.getPlayer(playerId)",
|
|
"player.rumble.duration = duration;",
|
|
"player.rumble.elapsedTime = 0;",
|
|
"player.rumble.weakMagnitude = weakRumbleMagnitude;",
|
|
"player.rumble.strongMagnitude = strongRumbleMagnitude;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Time of the vibration, in seconds (optional, default value is 1)",
|
|
"name": "Duration",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Strong rumble magnitude (from 0 to 1)",
|
|
"name": "StrongMagnitude",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Weak rumble magnitude (from 0 to 1)",
|
|
"name": "WeakMagnitude",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change a vibration on the specified controller. Incompatible with Firefox.",
|
|
"fullName": "Change gamepad active vibration",
|
|
"functionType": "Action",
|
|
"name": "A_Change_Vibration_Magnitude",
|
|
"sentence": "Change the vibration magnitude of _PARAM2_ & _PARAM3_ on gamepad _PARAM1_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const { clamp } = gdjs.evtTools.common;",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;",
|
|
"const player = gdjs._extensionController.getPlayer(playerId);",
|
|
"const elapsedTime = player.rumble.elapsedTime || 0;",
|
|
"const originalDuration = player.rumble.duration || 1;",
|
|
"const strongRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"StrongMagnitude\"), 0, 1);",
|
|
"const weakRumbleMagnitude = clamp(eventsFunctionContext.getArgument(\"WeakMagnitude\"), 0, 1);",
|
|
"/** @type {Gamepad} */",
|
|
"const gamepad = gdjs._extensionController.getGamepad(playerId);",
|
|
"if (!gamepad) {",
|
|
" // The gamepad is not connected.",
|
|
" return;",
|
|
"}",
|
|
"if (originalDuration - elapsedTime <= 0) return;",
|
|
"//Vibration work only on game in browser.",
|
|
"if (gamepad.vibrationActuator) {",
|
|
" gamepad.vibrationActuator.playEffect(\"dual-rumble\", {",
|
|
" startDelay: 0,",
|
|
" duration: 1000 * (originalDuration - elapsedTime),",
|
|
" weakMagnitude: weakRumbleMagnitude,",
|
|
" strongMagnitude: strongRumbleMagnitude",
|
|
" });",
|
|
"}",
|
|
"",
|
|
"player.rumble.weakMagnitude = weakRumbleMagnitude;",
|
|
"player.rumble.strongMagnitude = strongRumbleMagnitude;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Strong rumble magnitude (from 0 to 1)",
|
|
"name": "StrongMagnitude",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Weak rumble magnitude (from 0 to 1)",
|
|
"name": "WeakMagnitude",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if any button is released on a gamepad.",
|
|
"fullName": "Any gamepad button released",
|
|
"functionType": "Condition",
|
|
"name": "C_any_button_released",
|
|
"sentence": "Any button of gamepad _PARAM1_ is released",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": []
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"\r",
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"const player = gdjs._extensionController.getPlayer(playerId)\r",
|
|
"eventsFunctionContext.returnValue = player.isAnyButtonReleased();"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the strength of the weak vibration motor on the gamepad of a player.",
|
|
"fullName": "Weak rumble magnitude",
|
|
"functionType": "Expression",
|
|
"name": "WeakVibrationMagnitude",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.weakMagnitude;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": false
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the strength of the strong vibration motor on the gamepad of a player.",
|
|
"fullName": "Strong rumble magnitude",
|
|
"functionType": "Expression",
|
|
"name": "StrongVibrationMagnitude",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const playerId = eventsFunctionContext.getArgument(\"PlayerId\") - 1;\r",
|
|
"eventsFunctionContext.returnValue = gdjs._extensionController.getPlayer(playerId).rumble.strongMagnitude;"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": false
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "The gamepad identifier: 1, 2, 3 or 4",
|
|
"name": "PlayerId",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "onFirstSceneLoaded"
|
|
},
|
|
{
|
|
"functionName": "onSceneLoaded"
|
|
},
|
|
{
|
|
"functionName": "onScenePostEvents"
|
|
},
|
|
{
|
|
"functionName": "AcceleratedSpeed"
|
|
},
|
|
{
|
|
"functionName": "TriggerPressure"
|
|
},
|
|
{
|
|
"functionName": "StickForce"
|
|
},
|
|
{
|
|
"functionName": "StickRotationValue"
|
|
},
|
|
{
|
|
"functionName": "StickAngle"
|
|
},
|
|
{
|
|
"functionName": "AxisValue"
|
|
},
|
|
{
|
|
"functionName": "StickForceX"
|
|
},
|
|
{
|
|
"functionName": "StickForceY"
|
|
},
|
|
{
|
|
"functionName": "C_Button_released"
|
|
},
|
|
{
|
|
"functionName": "IsButtonJustPressed"
|
|
},
|
|
{
|
|
"functionName": "LastButtonID"
|
|
},
|
|
{
|
|
"functionName": "C_Any_Button_pressed"
|
|
},
|
|
{
|
|
"functionName": "LastButtonString"
|
|
},
|
|
{
|
|
"functionName": "GamepadCount"
|
|
},
|
|
{
|
|
"functionName": "C_Button_pressed"
|
|
},
|
|
{
|
|
"functionName": "Deadzone"
|
|
},
|
|
{
|
|
"functionName": "A_Set_deadzone"
|
|
},
|
|
{
|
|
"functionName": "C_Axis_pushed"
|
|
},
|
|
{
|
|
"functionName": "ConnectedGamepadsCount"
|
|
},
|
|
{
|
|
"functionName": "GamepadType"
|
|
},
|
|
{
|
|
"functionName": "C_Controller_type"
|
|
},
|
|
{
|
|
"functionName": "C_Controller_X_is_connected"
|
|
},
|
|
{
|
|
"functionName": "A_Vibrate_controller"
|
|
},
|
|
{
|
|
"functionName": "A_Advanced_Vibration_Controller"
|
|
},
|
|
{
|
|
"functionName": "A_Change_Vibration_Magnitude"
|
|
},
|
|
{
|
|
"functionName": "C_any_button_released"
|
|
},
|
|
{
|
|
"functionName": "WeakVibrationMagnitude"
|
|
},
|
|
{
|
|
"functionName": "StrongVibrationMagnitude"
|
|
}
|
|
]
|
|
},
|
|
"eventsBasedBehaviors": [
|
|
{
|
|
"description": "Control a platformer character with a gamepad.",
|
|
"fullName": "Platformer gamepad mapper",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "PlatformerGamepadMapper",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Controller_X_is_connected"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseArrows",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Up\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateUpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateLadderKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Down\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateDownKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseLeftStick",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Left\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Right\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Up\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateUpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateLadderKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Down\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateDownKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseRightStick",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Left\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Right\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Up\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateUpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateLadderKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Down\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateDownKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"Buttons[JumpButton]",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::SimulateJumpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::PlatformerGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "Platformer character behavior",
|
|
"extraInformation": [
|
|
"PlatformBehavior::PlatformerObjectBehavior"
|
|
],
|
|
"choices": [],
|
|
"name": "PlatformerCharacter"
|
|
},
|
|
{
|
|
"value": "1",
|
|
"type": "Number",
|
|
"label": "Gamepad identifier (1, 2, 3 or 4)",
|
|
"name": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Use directional pad",
|
|
"group": "Controls",
|
|
"name": "UseArrows"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Use left stick",
|
|
"group": "Controls",
|
|
"name": "UseLeftStick"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Use right stick",
|
|
"group": "Controls",
|
|
"name": "UseRightStick"
|
|
},
|
|
{
|
|
"value": "A or Cross",
|
|
"type": "Choice",
|
|
"label": "Jump button",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "A or Cross",
|
|
"value": "A or Cross"
|
|
},
|
|
{
|
|
"label": "B or Circle",
|
|
"value": "B or Circle"
|
|
},
|
|
{
|
|
"label": "X or Square",
|
|
"value": "X or Square"
|
|
},
|
|
{
|
|
"label": "Y or Triangle",
|
|
"value": "Y or Triangle"
|
|
},
|
|
{
|
|
"label": "LB or L1",
|
|
"value": "LB or L1"
|
|
},
|
|
{
|
|
"label": "RB or R1",
|
|
"value": "RB or R1"
|
|
},
|
|
{
|
|
"label": "LT or L2",
|
|
"value": "LT or L2"
|
|
},
|
|
{
|
|
"label": "RT or R2",
|
|
"value": "RT or R2"
|
|
}
|
|
],
|
|
"name": "JumpButton"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "PlatformerCharacter"
|
|
},
|
|
{
|
|
"propertyName": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"folderName": "Controls",
|
|
"children": [
|
|
{
|
|
"propertyName": "UseArrows"
|
|
},
|
|
{
|
|
"propertyName": "UseLeftStick"
|
|
},
|
|
{
|
|
"propertyName": "UseRightStick"
|
|
},
|
|
{
|
|
"propertyName": "JumpButton"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Control a 3D physics character with a gamepad.",
|
|
"fullName": "3D platformer gamepad mapper",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "Platformer3DGamepadMapper",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Controller_X_is_connected"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::StickForce"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
">",
|
|
"0",
|
|
"GamepadIdentifier",
|
|
"JoystickIdentifier",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCharacter3D::SetForwardAngle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCharacter3D",
|
|
"=",
|
|
"Gamepads::StickAngle(GamepadIdentifier, JoystickIdentifier) + CameraAngle(Object.Layer())"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCharacter3D::SimulateStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCharacter3D",
|
|
"-90",
|
|
"Gamepads::StickForce(GamepadIdentifier, JoystickIdentifier)"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"Buttons[JumpButton]",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCharacter3D"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::Platformer3DGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "3D physics character",
|
|
"extraInformation": [
|
|
"Physics3D::PhysicsCharacter3D"
|
|
],
|
|
"choices": [],
|
|
"name": "PhysicsCharacter3D"
|
|
},
|
|
{
|
|
"value": "1",
|
|
"type": "Number",
|
|
"label": "Gamepad identifier (1, 2, 3 or 4)",
|
|
"name": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"value": "Left",
|
|
"type": "Choice",
|
|
"label": "Walk joystick",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "Left",
|
|
"value": "Left"
|
|
},
|
|
{
|
|
"label": "Right",
|
|
"value": "Right"
|
|
}
|
|
],
|
|
"name": "JoystickIdentifier"
|
|
},
|
|
{
|
|
"value": "A or Cross",
|
|
"type": "Choice",
|
|
"label": "Jump button",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "A or Cross",
|
|
"value": "A or Cross"
|
|
},
|
|
{
|
|
"label": "B or Circle",
|
|
"value": "B or Circle"
|
|
},
|
|
{
|
|
"label": "X or Square",
|
|
"value": "X or Square"
|
|
},
|
|
{
|
|
"label": "Y or Triangle",
|
|
"value": "Y or Triangle"
|
|
},
|
|
{
|
|
"label": "LB or L1",
|
|
"value": "LB or L1"
|
|
},
|
|
{
|
|
"label": "RB or R1",
|
|
"value": "RB or R1"
|
|
},
|
|
{
|
|
"label": "LT or L2",
|
|
"value": "LT or L2"
|
|
},
|
|
{
|
|
"label": "RT or R2",
|
|
"value": "RT or R2"
|
|
}
|
|
],
|
|
"name": "JumpButton"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "PhysicsCharacter3D"
|
|
},
|
|
{
|
|
"propertyName": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"folderName": "Controls",
|
|
"children": [
|
|
{
|
|
"propertyName": "JoystickIdentifier"
|
|
},
|
|
{
|
|
"propertyName": "JumpButton"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Control a 3D physics character with a gamepad.",
|
|
"fullName": "3D shooter gamepad mapper",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "Shooter3DGamepadMapper",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Controller_X_is_connected"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::StickForce"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
">",
|
|
"0",
|
|
"GamepadIdentifier",
|
|
"WalkStick",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCharacter3D::SimulateStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCharacter3D",
|
|
"Gamepads::StickAngle(GamepadIdentifier, WalkStick)",
|
|
"Gamepads::StickForce(GamepadIdentifier, WalkStick)"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"Buttons[JumpButton]",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCharacter3D::SimulateJumpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCharacter3D"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::Shooter3DGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "3D physics character",
|
|
"extraInformation": [
|
|
"Physics3D::PhysicsCharacter3D"
|
|
],
|
|
"choices": [],
|
|
"name": "PhysicsCharacter3D"
|
|
},
|
|
{
|
|
"value": "1",
|
|
"type": "Number",
|
|
"label": "Gamepad identifier (1, 2, 3 or 4)",
|
|
"name": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"value": "Left",
|
|
"type": "Choice",
|
|
"label": "Walk joystick",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "Left",
|
|
"value": "Left"
|
|
},
|
|
{
|
|
"label": "Right",
|
|
"value": "Right"
|
|
}
|
|
],
|
|
"name": "WalkStick"
|
|
},
|
|
{
|
|
"value": "Right",
|
|
"type": "Choice",
|
|
"label": "Camera joystick",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "Left",
|
|
"value": "Left"
|
|
},
|
|
{
|
|
"label": "Right",
|
|
"value": "Right"
|
|
}
|
|
],
|
|
"name": "CameraStick"
|
|
},
|
|
{
|
|
"value": "A or Cross",
|
|
"type": "Choice",
|
|
"label": "Jump button",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "A or Cross",
|
|
"value": "A or Cross"
|
|
},
|
|
{
|
|
"label": "B or Circle",
|
|
"value": "B or Circle"
|
|
},
|
|
{
|
|
"label": "X or Square",
|
|
"value": "X or Square"
|
|
},
|
|
{
|
|
"label": "Y or Triangle",
|
|
"value": "Y or Triangle"
|
|
},
|
|
{
|
|
"label": "LB or L1",
|
|
"value": "LB or L1"
|
|
},
|
|
{
|
|
"label": "RB or R1",
|
|
"value": "RB or R1"
|
|
},
|
|
{
|
|
"label": "LT or L2",
|
|
"value": "LT or L2"
|
|
},
|
|
{
|
|
"label": "RT or R2",
|
|
"value": "RT or R2"
|
|
}
|
|
],
|
|
"name": "JumpButton"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "PhysicsCharacter3D"
|
|
},
|
|
{
|
|
"propertyName": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"folderName": "Controls",
|
|
"children": [
|
|
{
|
|
"propertyName": "WalkStick"
|
|
},
|
|
{
|
|
"propertyName": "CameraStick"
|
|
},
|
|
{
|
|
"propertyName": "JumpButton"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Control camera rotations with a gamepad.",
|
|
"fullName": "First person camera gamepad mapper",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "FirstPersonGamepadMapper",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "TODO It's probably a bad idea to rotate the object around Y."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentRotationSpeedZ",
|
|
"=",
|
|
"Gamepads::AcceleratedSpeed(CurrentRotationSpeedZ, Gamepads::StickForceX(GamepadIdentifier, CameraStick) * HorizontalRotationSpeedMax, HorizontalRotationSpeedMax, HorizontalRotationAcceleration, HorizontalRotationDeceleration)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetAngle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"+",
|
|
"CurrentRotationSpeedZ * TimeDelta()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CurrentRotationSpeedY",
|
|
"=",
|
|
"Gamepads::AcceleratedSpeed(CurrentRotationSpeedY, Gamepads::StickForceY(GamepadIdentifier, CameraStick) * VerticalRotationSpeedMax, VerticalRotationSpeedMax, VerticalRotationAcceleration, VerticalRotationDeceleration)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Scene3D::Base3DBehavior::SetRotationY"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Object3D",
|
|
"+",
|
|
"CurrentRotationSpeedY * TimeDelta()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Scene3D::Base3DBehavior::SetRotationY"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Object3D",
|
|
"=",
|
|
"clamp(Object.Object3D::RotationY(), VerticalAngleMin, VerticalAngleMax)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::FirstPersonGamepadMapper::LookFromObjectEyes"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Move the camera to look though _PARAM1_ eyes. The object must look to the right when all its angles are 0 and the top of its head be toward Z+.",
|
|
"fullName": "Look through object eyes",
|
|
"functionType": "Action",
|
|
"group": "Layers and cameras",
|
|
"name": "LookFromObjectEyes",
|
|
"private": true,
|
|
"sentence": "Move the camera to look though _PARAM0_ eyes",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "CenterCameraOnObject"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"Object",
|
|
"",
|
|
"Object.Layer()",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Scene3D::SetCameraZ"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Object3D::Z() + Object.Object3D::Depth() + OffsetZ",
|
|
"",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Scene3D::SetCameraRotationX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"- Object.Object3D::RotationY() + 90",
|
|
"GetArgumentAsString(\"Layer\")",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Scene3D::SetCameraRotationY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Object3D::RotationX()",
|
|
"GetArgumentAsString(\"Layer\")",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetCameraAngle"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Angle() + 90",
|
|
"Object.Layer()",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the maximum horizontal rotation speed of the object.",
|
|
"fullName": "Maximum horizontal rotation speed",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"name": "HorizontalRotationSpeedMax",
|
|
"sentence": "the maximum horizontal rotation speed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"HorizontalRotationSpeedMax"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "HorizontalRotationSpeedMax",
|
|
"group": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"name": "SetHorizontalRotationSpeedMax",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HorizontalRotationSpeedMax",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the horizontal rotation acceleration of the object.",
|
|
"fullName": "Horizontal rotation acceleration",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"name": "HorizontalRotationAcceleration",
|
|
"sentence": "the horizontal rotation acceleration",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"HorizontalRotationAcceleration"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "HorizontalRotationAcceleration",
|
|
"group": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"name": "SetHorizontalRotationAcceleration",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HorizontalRotationAcceleration",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the horizontal rotation deceleration of the object.",
|
|
"fullName": "Horizontal rotation deceleration",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"name": "HorizontalRotationDeceleration",
|
|
"sentence": "the horizontal rotation deceleration",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"HorizontalRotationDeceleration"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "HorizontalRotationDeceleration",
|
|
"group": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"name": "SetHorizontalRotationDeceleration",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HorizontalRotationDeceleration",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the maximum vertical rotation speed of the object.",
|
|
"fullName": "Maximum vertical rotation speed",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "VerticalRotationSpeedMax",
|
|
"sentence": "the maximum vertical rotation speed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"VerticalRotationSpeedMax"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "VerticalRotationSpeedMax",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "SetVerticalRotationSpeedMax",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"VerticalRotationSpeedMax",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the vertical rotation acceleration of the object.",
|
|
"fullName": "Vertical rotation acceleration",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "VerticalRotationAcceleration",
|
|
"sentence": "the vertical rotation acceleration",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"VerticalRotationAcceleration"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "VerticalRotationAcceleration",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "SetVerticalRotationAcceleration",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"VerticalRotationAcceleration",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the vertical rotation deceleration of the object.",
|
|
"fullName": "Vertical rotation deceleration",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "VerticalRotationDeceleration",
|
|
"sentence": "the vertical rotation deceleration",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"VerticalRotationDeceleration"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "VerticalRotationDeceleration",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "SetVerticalRotationDeceleration",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"VerticalRotationDeceleration",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the minimum vertical camera angle of the object.",
|
|
"fullName": "Minimum vertical camera angle",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "VerticalAngleMin",
|
|
"sentence": "the minimum vertical camera angle",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"VerticalAngleMin"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "VerticalAngleMin",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "SetVerticalAngleMin",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"VerticalAngleMin",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the maximum vertical camera angle of the object.",
|
|
"fullName": "Maximum vertical camera angle",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "VerticalAngleMax",
|
|
"sentence": "the maximum vertical camera angle",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"VerticalAngleMax"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "VerticalAngleMax",
|
|
"group": "First person camera gamepad mapper vertical rotation configuration",
|
|
"name": "SetVerticalAngleMax",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"VerticalAngleMax",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the z position offset of the object.",
|
|
"fullName": "Z position offset",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "First person camera gamepad mapper position configuration",
|
|
"name": "OffsetZ",
|
|
"sentence": "the z position offset",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"OffsetZ"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "OffsetZ",
|
|
"group": "First person camera gamepad mapper position configuration",
|
|
"name": "SetOffsetZ",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"OffsetZ",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::FirstPersonGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
},
|
|
{
|
|
"folderName": "Layers and cameras",
|
|
"children": [
|
|
{
|
|
"functionName": "LookFromObjectEyes"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "First person camera gamepad mapper horizontal rotation configuration",
|
|
"children": [
|
|
{
|
|
"functionName": "HorizontalRotationSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "SetHorizontalRotationSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "HorizontalRotationAcceleration"
|
|
},
|
|
{
|
|
"functionName": "SetHorizontalRotationAcceleration"
|
|
},
|
|
{
|
|
"functionName": "HorizontalRotationDeceleration"
|
|
},
|
|
{
|
|
"functionName": "SetHorizontalRotationDeceleration"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "First person camera gamepad mapper vertical rotation configuration",
|
|
"children": [
|
|
{
|
|
"functionName": "VerticalRotationSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "SetVerticalRotationSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "VerticalRotationAcceleration"
|
|
},
|
|
{
|
|
"functionName": "SetVerticalRotationAcceleration"
|
|
},
|
|
{
|
|
"functionName": "VerticalRotationDeceleration"
|
|
},
|
|
{
|
|
"functionName": "SetVerticalRotationDeceleration"
|
|
},
|
|
{
|
|
"functionName": "VerticalAngleMin"
|
|
},
|
|
{
|
|
"functionName": "SetVerticalAngleMin"
|
|
},
|
|
{
|
|
"functionName": "VerticalAngleMax"
|
|
},
|
|
{
|
|
"functionName": "SetVerticalAngleMax"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "First person camera gamepad mapper position configuration",
|
|
"children": [
|
|
{
|
|
"functionName": "OffsetZ"
|
|
},
|
|
{
|
|
"functionName": "SetOffsetZ"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "3D capability",
|
|
"extraInformation": [
|
|
"Scene3D::Base3DBehavior"
|
|
],
|
|
"choices": [],
|
|
"name": "Object3D"
|
|
},
|
|
{
|
|
"value": "1",
|
|
"type": "Number",
|
|
"label": "Gamepad identifier (1, 2, 3 or 4)",
|
|
"name": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"value": "Right",
|
|
"type": "Choice",
|
|
"label": "Camera joystick",
|
|
"choices": [
|
|
{
|
|
"label": "Left",
|
|
"value": "Left"
|
|
},
|
|
{
|
|
"label": "Right",
|
|
"value": "Right"
|
|
}
|
|
],
|
|
"name": "CameraStick"
|
|
},
|
|
{
|
|
"value": "180",
|
|
"type": "Number",
|
|
"unit": "AngularSpeed",
|
|
"label": "Maximum rotation speed",
|
|
"group": "Horizontal rotation",
|
|
"name": "HorizontalRotationSpeedMax"
|
|
},
|
|
{
|
|
"value": "360",
|
|
"type": "Number",
|
|
"label": "Rotation acceleration",
|
|
"group": "Horizontal rotation",
|
|
"name": "HorizontalRotationAcceleration"
|
|
},
|
|
{
|
|
"value": "720",
|
|
"type": "Number",
|
|
"label": "Rotation deceleration",
|
|
"group": "Horizontal rotation",
|
|
"name": "HorizontalRotationDeceleration"
|
|
},
|
|
{
|
|
"value": "120",
|
|
"type": "Number",
|
|
"unit": "AngularSpeed",
|
|
"label": "Maximum rotation speed",
|
|
"group": "Vertical rotation",
|
|
"name": "VerticalRotationSpeedMax"
|
|
},
|
|
{
|
|
"value": "240",
|
|
"type": "Number",
|
|
"label": "Rotation acceleration",
|
|
"group": "Vertical rotation",
|
|
"name": "VerticalRotationAcceleration"
|
|
},
|
|
{
|
|
"value": "480",
|
|
"type": "Number",
|
|
"label": "Rotation deceleration",
|
|
"group": "Vertical rotation",
|
|
"name": "VerticalRotationDeceleration"
|
|
},
|
|
{
|
|
"value": "-90",
|
|
"type": "Number",
|
|
"unit": "DegreeAngle",
|
|
"label": "Minimum angle",
|
|
"group": "Vertical rotation",
|
|
"name": "VerticalAngleMin"
|
|
},
|
|
{
|
|
"value": "90",
|
|
"type": "Number",
|
|
"unit": "DegreeAngle",
|
|
"label": "Maximum angle",
|
|
"group": "Vertical rotation",
|
|
"name": "VerticalAngleMax"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Z position offset",
|
|
"group": "Position",
|
|
"name": "OffsetZ"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "AngularSpeed",
|
|
"label": "Current rotation speed Z",
|
|
"hidden": true,
|
|
"name": "CurrentRotationSpeedZ"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "AngularSpeed",
|
|
"label": "Current rotation speed Y",
|
|
"hidden": true,
|
|
"name": "CurrentRotationSpeedY"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "Object3D"
|
|
},
|
|
{
|
|
"propertyName": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"propertyName": "CameraStick"
|
|
},
|
|
{
|
|
"folderName": "Horizontal rotation",
|
|
"children": [
|
|
{
|
|
"propertyName": "HorizontalRotationSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "HorizontalRotationAcceleration"
|
|
},
|
|
{
|
|
"propertyName": "HorizontalRotationDeceleration"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "Vertical rotation",
|
|
"children": [
|
|
{
|
|
"propertyName": "VerticalRotationSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "VerticalRotationAcceleration"
|
|
},
|
|
{
|
|
"propertyName": "VerticalRotationDeceleration"
|
|
},
|
|
{
|
|
"propertyName": "VerticalAngleMin"
|
|
},
|
|
{
|
|
"propertyName": "VerticalAngleMax"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "Position",
|
|
"children": [
|
|
{
|
|
"propertyName": "OffsetZ"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"propertyName": "CurrentRotationSpeedZ"
|
|
},
|
|
{
|
|
"propertyName": "CurrentRotationSpeedY"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Control a 3D physics car with a gamepad.",
|
|
"fullName": "3D car gamepad mapper",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "PhysicsCar3DGamepadMapper",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Controller_X_is_connected"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseArrows",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCar3D::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCar3D"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCar3D::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCar3D"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseLeftStick",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"1",
|
|
"\"Left\"",
|
|
"\"Any\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCar3D::SimulateSteeringStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCar3D",
|
|
"Gamepads::StickForceX(GamepadIdentifier, \"Left\")"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseRightStick",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"1",
|
|
"\"Right\"",
|
|
"\"Any\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCar3D::SimulateSteeringStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCar3D",
|
|
"Gamepads::StickForceX(GamepadIdentifier, \"Right\")"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"1",
|
|
"\"LT\"",
|
|
"\"Up\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"1",
|
|
"\"RT\"",
|
|
"\"Up\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCar3D::SimulateAcceleratorStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCar3D",
|
|
"Gamepads::TriggerPressure(GamepadIdentifier, \"RT\") - Gamepads::TriggerPressure(GamepadIdentifier, \"LT\")"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"Buttons[HandBrakeButton]",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Physics3D::PhysicsCar3D::SimulateHandBrakeKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PhysicsCar3D"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::PhysicsCar3DGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "3D physics car",
|
|
"extraInformation": [
|
|
"Physics3D::PhysicsCar3D"
|
|
],
|
|
"choices": [],
|
|
"name": "PhysicsCar3D"
|
|
},
|
|
{
|
|
"value": "1",
|
|
"type": "Number",
|
|
"label": "Gamepad identifier (1, 2, 3 or 4)",
|
|
"name": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Use directional pad",
|
|
"group": "Controls",
|
|
"name": "UseArrows"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Use left stick",
|
|
"group": "Controls",
|
|
"name": "UseLeftStick"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Use right stick",
|
|
"group": "Controls",
|
|
"name": "UseRightStick"
|
|
},
|
|
{
|
|
"value": "B or Circle",
|
|
"type": "Choice",
|
|
"label": "Hand brake button",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "A or Cross",
|
|
"value": "A or Cross"
|
|
},
|
|
{
|
|
"label": "B or Circle",
|
|
"value": "B or Circle"
|
|
},
|
|
{
|
|
"label": "X or Square",
|
|
"value": "X or Square"
|
|
},
|
|
{
|
|
"label": "Y or Triangle",
|
|
"value": "Y or Triangle"
|
|
},
|
|
{
|
|
"label": "LB or L1",
|
|
"value": "LB or L1"
|
|
},
|
|
{
|
|
"label": "RB or R1",
|
|
"value": "RB or R1"
|
|
},
|
|
{
|
|
"label": "LT or L2",
|
|
"value": "LT or L2"
|
|
},
|
|
{
|
|
"label": "RT or R2",
|
|
"value": "RT or R2"
|
|
}
|
|
],
|
|
"name": "HandBrakeButton"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "PhysicsCar3D"
|
|
},
|
|
{
|
|
"propertyName": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"folderName": "Controls",
|
|
"children": [
|
|
{
|
|
"propertyName": "UseArrows"
|
|
},
|
|
{
|
|
"propertyName": "UseLeftStick"
|
|
},
|
|
{
|
|
"propertyName": "UseRightStick"
|
|
},
|
|
{
|
|
"propertyName": "HandBrakeButton"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Control a top-down character with a gamepad.",
|
|
"fullName": "Top-down gamepad mapper",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "TopDownGamepadMapper",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Controller_X_is_connected"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseArrows",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Up\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateUpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Button_pressed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Down\"",
|
|
"\"Left\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateDownKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseLeftStick",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"StickMode",
|
|
"=",
|
|
"\"Analog\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement",
|
|
"Gamepads::StickRotationValue(GamepadIdentifier, \"Left\")",
|
|
"Gamepads::StickForce(GamepadIdentifier, \"Left\")"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"StickMode",
|
|
"=",
|
|
"\"360°\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement",
|
|
"Gamepads::StickRotationValue(GamepadIdentifier, \"Left\")",
|
|
"sign(Gamepads::StickForce(GamepadIdentifier, \"Left\"))"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"StickMode",
|
|
"=",
|
|
"\"8 Directions\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Left\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Right\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Up\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateUpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Left\"",
|
|
"\"Down\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateDownKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"UseRightStick",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"StickMode",
|
|
"=",
|
|
"\"Analog\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement",
|
|
"Gamepads::StickRotationValue(GamepadIdentifier, \"Right\")",
|
|
"Gamepads::StickForce(GamepadIdentifier, \"Right\")"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"StickMode",
|
|
"=",
|
|
"\"360°\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateStick"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement",
|
|
"sign(Gamepads::StickForce(GamepadIdentifier, \"Right\"))",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"StickMode",
|
|
"=",
|
|
"\"8 Directions\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Left\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateLeftKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Right\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateRightKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Up\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateUpKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Gamepads::C_Axis_pushed"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"GamepadIdentifier",
|
|
"\"Right\"",
|
|
"\"Down\"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TopDownMovementBehavior::SimulateDownKey"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TopDownMovement"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "Gamepads::TopDownGamepadMapper",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "Top-down movement behavior",
|
|
"extraInformation": [
|
|
"TopDownMovementBehavior::TopDownMovementBehavior"
|
|
],
|
|
"choices": [],
|
|
"name": "TopDownMovement"
|
|
},
|
|
{
|
|
"value": "1",
|
|
"type": "Number",
|
|
"label": "Gamepad identifier (1, 2, 3 or 4)",
|
|
"name": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Use directional pad",
|
|
"group": "Controls",
|
|
"name": "UseArrows"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Use left stick",
|
|
"group": "Controls",
|
|
"name": "UseLeftStick"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Use right stick",
|
|
"group": "Controls",
|
|
"name": "UseRightStick"
|
|
},
|
|
{
|
|
"value": "Analog",
|
|
"type": "Choice",
|
|
"label": "Stick mode",
|
|
"group": "Controls",
|
|
"choices": [
|
|
{
|
|
"label": "Analog",
|
|
"value": "Analog"
|
|
},
|
|
{
|
|
"label": "360°",
|
|
"value": "360°"
|
|
},
|
|
{
|
|
"label": "8 Directions",
|
|
"value": "8 Directions"
|
|
}
|
|
],
|
|
"name": "StickMode"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "TopDownMovement"
|
|
},
|
|
{
|
|
"propertyName": "GamepadIdentifier"
|
|
},
|
|
{
|
|
"folderName": "Controls",
|
|
"children": [
|
|
{
|
|
"propertyName": "UseArrows"
|
|
},
|
|
{
|
|
"propertyName": "UseLeftStick"
|
|
},
|
|
{
|
|
"propertyName": "UseRightStick"
|
|
},
|
|
{
|
|
"propertyName": "StickMode"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"eventsBasedObjects": []
|
|
},
|
|
{
|
|
"author": "",
|
|
"category": "Camera",
|
|
"dimension": "2D",
|
|
"extensionNamespace": "",
|
|
"fullName": "Smooth Camera",
|
|
"gdevelopVersion": ">=5.5.222",
|
|
"helpPath": "/tutorials/follow-player-with-camera/",
|
|
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEwO30NCjwvc3R5bGU+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjQsMTNoLTZjLTEuMSwwLTItMC45LTItMlY1YzAtMS4xLDAuOS0yLDItMmg2YzEuMSwwLDIsMC45LDIsMnY2QzI2LDEyLjEsMjUuMSwxMywyNCwxM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0yNiw4djEwYzAsMS4xLTAuOSwyLTIsMkg4Yy0xLjEsMC0yLTAuOS0yLTJWOGMwLTEuMSwwLjktMiwyLTJoOCIvPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMjEiIGN5PSI4IiByPSIyIi8+DQo8Y2lyY2xlIGNsYXNzPSJzdDAiIGN4PSIxMSIgY3k9IjE2IiByPSIxIi8+DQo8cmVjdCB4PSI5IiB5PSI5IiBjbGFzcz0ic3QwIiB3aWR0aD0iNCIgaGVpZ2h0PSIzIi8+DQo8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMSwyOSAyMSwyOSAxMSwyOSAxMSwyOSAiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QwIiBwb2ludHM9IjE4LDIwIDE4LDI5IDE0LDI5IDE0LDIwICIvPg0KPHJlY3QgeD0iNyIgeT0iMyIgY2xhc3M9InN0MCIgd2lkdGg9IjQiIGhlaWdodD0iMyIvPg0KPC9zdmc+DQo=",
|
|
"name": "SmoothCamera",
|
|
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Computers and Hardware/Computers and Hardware_camcoder_gopro_go_pro_camera.svg",
|
|
"shortDescription": "Smoothly scroll to follow an object.",
|
|
"version": "0.4.5",
|
|
"description": [
|
|
"The camera follows an object according to:",
|
|
"- a frame rate independent catch-up speed to make the scrolling from smooth to strong",
|
|
"- a maximum speed to do linear following ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) or slow down the camera when teleporting the object",
|
|
"- a follow-free zone to avoid scrolling on small movements",
|
|
"- an offset to see further in one direction",
|
|
"- an extra delay and catch-up speed to give an impression of speed (useful for dash)",
|
|
"- position forecasting and delay to simulate a cameraman response time",
|
|
"",
|
|
"A platformer dedicated behavior allows to switch of settings when the character is in air or on the floor. This can be used to stabilize the camera when jumping."
|
|
],
|
|
"origin": {
|
|
"identifier": "SmoothCamera",
|
|
"name": "gdevelop-extension-store"
|
|
},
|
|
"tags": [
|
|
"camera",
|
|
"scrolling",
|
|
"follow",
|
|
"smooth",
|
|
"platformer",
|
|
"platform"
|
|
],
|
|
"authorIds": [
|
|
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
|
|
],
|
|
"dependencies": [],
|
|
"globalVariables": [],
|
|
"sceneVariables": [],
|
|
"eventsFunctions": [],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT"
|
|
},
|
|
"eventsBasedBehaviors": [
|
|
{
|
|
"description": "Smoothly scroll to follow an object.",
|
|
"fullName": "Smooth Camera",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "SmoothCamera",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onCreated",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Update private properties through setters to check their values and initialize state."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetLeftwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"LeftwardSpeed",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetRightwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"RightwardSpeed",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetUpwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"UpwardSpeed",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetDownwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"DownwardSpeed",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetLeftwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"LeftwardSpeedMax",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetRightwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"RightwardSpeedMax",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"UpwardSpeedMax",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"DownwardSpeedMax",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaLeft"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"FollowFreeAreaLeft",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaRight"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"FollowFreeAreaRight",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"FollowFreeAreaTop",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"FollowFreeAreaBottom",
|
|
"log(1 - )"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraDelay",
|
|
"=",
|
|
"CameraDelay"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsCalledManually",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Move the camera closer to the object. This action must be called after the object has moved for the frame.",
|
|
"fullName": "Move the camera closer",
|
|
"functionType": "Action",
|
|
"name": "MoveCameraCloser",
|
|
"sentence": "Move the camera closer to _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "The camera following is called with an action, the call from doStepPreEvents must be disabled to avoid to do it twice."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsCalledManually",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::DoMoveCameraCloser"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Move the camera closer to the object.",
|
|
"fullName": "Do move the camera closer",
|
|
"functionType": "Action",
|
|
"name": "DoMoveCameraCloser",
|
|
"private": true,
|
|
"sentence": "Do move the camera closer _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Delaying and forecasting can be used at the same time.\nForecasting only use the positions that are older than the one used for delaying.\nThe behavior uses a position history that is split in 2 arrays:\n- one for delaying the position (from TimeFromStart to TimeFromStart - CamearDelay)\n- one for forecasting the position (from TimeFromStart - CamearDelay to TimeFromStart - CamearDelay - ForecastHistoryDuration"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::UpdateDelayedPosition"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::UpdateForecastedPosition"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "At each frame, the camera must catchup the target by a given ratio (speed)\ncameraX(t) - targetX = (cameraX(t - 1) - targetX) * speed\n\nThe frame rate must not impact on the catch-up speed, we don't want a speed in ratio per frame but a speed ratio per second, like this:\ncameraX(t) - targetX = (cameraX(t - 1s) - targetX) * speed\n\nOk, but we still need to process each frame, we can use a exponent for this:\ncameraX(t) - targetX = (cameraX(t - timeDelta) - targetX) * speed^timeDelta\ncameraX(t) = targetX + (cameraX(t - timeDelta) - targetX) * exp(timeDelta * ln(speed))\n\npow is probably more efficient than precalculated log if the speed is changed continuously but this might be rare enough."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowOnX",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"OldX",
|
|
"=",
|
|
"CameraX(Object.Layer(), 0)"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
">",
|
|
"Object.Behavior::FreeAreaRight()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Behavior::FreeAreaRight()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaRight())\n* exp(TimeDelta() * LogLeftwardSpeed)",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"<",
|
|
"OldX - LeftwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"OldX - LeftwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"<",
|
|
"Object.Behavior::FreeAreaLeft()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Behavior::FreeAreaLeft()\n+ (CameraX(Object.Layer(), 0) - Object.Behavior::FreeAreaLeft())\n* exp(TimeDelta() * LogRightwardSpeed)",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
">",
|
|
"OldX + RightwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterX"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"OldX + RightwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowOnY",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"OldY",
|
|
"=",
|
|
"CameraY(Object.Layer(), 0)"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
">",
|
|
"Object.Behavior::FreeAreaBottom()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Behavior::FreeAreaBottom()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaBottom())\n* exp(TimeDelta() * LogUpwardSpeed)",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"<",
|
|
"OldY - UpwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"OldY - UpwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"<",
|
|
"Object.Behavior::FreeAreaTop()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"Object.Behavior::FreeAreaTop()\n+ (CameraY(Object.Layer(), 0) - Object.Behavior::FreeAreaTop())\n* exp(TimeDelta() * LogDownwardSpeed)",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
">",
|
|
"OldY + DownwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCameraCenterY"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"=",
|
|
"OldY + DownwardSpeedMax * TimeDelta()",
|
|
"Object.Layer()",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Delay the camera according to a maximum speed and catch up the delay.",
|
|
"fullName": "Wait and catch up",
|
|
"functionType": "Action",
|
|
"name": "WaitAndCatchUp",
|
|
"sentence": "Delay the camera of _PARAM0_ during: _PARAM2_ seconds according to the maximum speed _PARAM3_;_PARAM4_ seconds and catch up in _PARAM5_ seconds",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Maybe the catch-up show be done in constant pixel speed instead of constant time speed."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"WaitingEnd",
|
|
"=",
|
|
"TimeFromStart() + NewWaitingDuration"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"WaitingSpeedXMax",
|
|
"=",
|
|
"NewWaitingSpeedXMax"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"WaitingSpeedYMax",
|
|
"=",
|
|
"NewWaitingSpeedYMax"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraDelayCatchUpDuration",
|
|
"=",
|
|
"NewCatchUpDuration"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Wait and catch up\"",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Waiting duration (in seconds)",
|
|
"name": "NewWaitingDuration",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Waiting maximum camera target speed X",
|
|
"name": "NewWaitingSpeedXMax",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Waiting maximum camera target speed Y",
|
|
"name": "NewWaitingSpeedYMax",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Catch up duration (in seconds)",
|
|
"name": "NewCatchUpDuration",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Draw the targeted and actual camera position.",
|
|
"fullName": "Draw debug",
|
|
"functionType": "Action",
|
|
"name": "DrawDebug",
|
|
"sentence": "Draw targeted and actual camera position for _PARAM0_ on _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::FillOpacity"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Path used by the forecasting",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::OutlineColor"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"\"245;166;35\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::BeginFillPath"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[0])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[0])"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Repeat",
|
|
"repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::PathLineTo"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[Index])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[Index])"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"+",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::EndFillPath"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Follow-free area.",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaLeft",
|
|
"!=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaRight",
|
|
"!=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaTop",
|
|
"!=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaBottom",
|
|
"!=",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::OutlineColor"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"\"126;211;33\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Rectangle"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"Object.Behavior::FreeAreaLeft() - 1",
|
|
"Object.Behavior::FreeAreaTop() - 1",
|
|
"Object.Behavior::FreeAreaRight() + 1",
|
|
"Object.Behavior::FreeAreaBottom() + 1"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Linear regression vector used by the forecasting.",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::OutlineColor"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"\"208;2;27\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::LineV2"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"ProjectedOldestX",
|
|
"ProjectedOldestY",
|
|
"ProjectedNewestX",
|
|
"ProjectedNewestY",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Targeted and actual camera position",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Circle"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"ForecastedX",
|
|
"ForecastedY",
|
|
"3"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::LineV2"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"CameraX(Object.Layer(), 0)",
|
|
"CameraY(Object.Layer(), 0) - 4",
|
|
"CameraX(Object.Layer(), 0)",
|
|
"CameraY(Object.Layer(), 0) + 4",
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::LineV2"
|
|
},
|
|
"parameters": [
|
|
"ShapePainter",
|
|
"CameraX(Object.Layer(), 0) - 4",
|
|
"CameraY(Object.Layer(), 0)",
|
|
"CameraX(Object.Layer(), 0) + 4",
|
|
"CameraY(Object.Layer(), 0)",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Shape painter",
|
|
"name": "ShapePainter",
|
|
"supplementaryInformation": "PrimitiveDrawing::Drawer",
|
|
"type": "objectList"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Enable or disable the following on X axis.",
|
|
"fullName": "Follow on X",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetFollowOnX",
|
|
"sentence": "The camera follows _PARAM0_ on X axis: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowOnX",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"Value",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowOnX",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Follow on X axis",
|
|
"name": "Value",
|
|
"type": "yesorno"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Enable or disable the following on Y axis.",
|
|
"fullName": "Follow on Y",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetFollowOnY",
|
|
"sentence": "The camera follows _PARAM0_ on Y axis: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowOnY",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"Value",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowOnY",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Follow on Y axis",
|
|
"name": "Value",
|
|
"type": "yesorno"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera follow free area right border.",
|
|
"fullName": "Follow free area right border",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetFollowFreeAreaRight",
|
|
"sentence": "Change the camera follow free area right border of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaRight",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Follow free area right border",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera follow free area left border.",
|
|
"fullName": "Follow free area left border",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetFollowFreeAreaLeft",
|
|
"sentence": "Change the camera follow free area left border of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaLeft",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Follow free area left border",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera follow free area top border.",
|
|
"fullName": "Follow free area top border",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetFollowFreeAreaTop",
|
|
"sentence": "Change the camera follow free area top border of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaTop",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Follow free area top border",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera follow free area bottom border.",
|
|
"fullName": "Follow free area bottom border",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetFollowFreeAreaBottom",
|
|
"sentence": "Change the camera follow free area bottom border of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"FollowFreeAreaBottom",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Follow free area bottom border",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera leftward maximum speed (in pixels per second).",
|
|
"fullName": "Leftward maximum speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetLeftwardSpeedMax",
|
|
"sentence": "Change the camera leftward maximum speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LeftwardSpeedMax",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Leftward maximum speed (in pixels per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera rightward maximum speed (in pixels per second).",
|
|
"fullName": "Rightward maximum speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetRightwardSpeedMax",
|
|
"sentence": "Change the camera rightward maximum speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"RightwardSpeedMax",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Rightward maximum speed (in pixels per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera upward maximum speed (in pixels per second).",
|
|
"fullName": "Upward maximum speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetUpwardSpeedMax",
|
|
"sentence": "Change the camera upward maximum speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"UpwardSpeedMax",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Upward maximum speed (in pixels per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera downward maximum speed (in pixels per second).",
|
|
"fullName": "Downward maximum speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetDownwardSpeedMax",
|
|
"sentence": "Change the camera downward maximum speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DownwardSpeedMax",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Downward maximum speed (in pixels per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera leftward catch-up speed (in ratio per second).",
|
|
"fullName": "Leftward catch-up speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetLeftwardSpeed",
|
|
"sentence": "Change the camera leftward catch-up speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LeftwardSpeed",
|
|
"=",
|
|
"clamp(0, 1, Value)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LogLeftwardSpeed",
|
|
"=",
|
|
"log(1 - Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Leftward catch-up speed (in ratio per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera rightward catch-up speed (in ratio per second).",
|
|
"fullName": "Rightward catch-up speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetRightwardSpeed",
|
|
"sentence": "Change the camera rightward catch-up speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"RightwardSpeed",
|
|
"=",
|
|
"clamp(0, 1, Value)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LogRightwardSpeed",
|
|
"=",
|
|
"log(1 - Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Rightward catch-up speed (in ratio per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera downward catch-up speed (in ratio per second).",
|
|
"fullName": "Downward catch-up speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetDownwardSpeed",
|
|
"sentence": "Change the camera downward catch-up speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DownwardSpeed",
|
|
"=",
|
|
"clamp(0, 1, Value)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LogDownwardSpeed",
|
|
"=",
|
|
"log(1 - Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Downward catch-up speed (in ratio per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera upward catch-up speed (in ratio per second).",
|
|
"fullName": "Upward catch-up speed",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetUpwardSpeed",
|
|
"sentence": "Change the camera upward catch-up speed of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"UpwardSpeed",
|
|
"=",
|
|
"clamp(0, 1, Value)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LogUpwardSpeed",
|
|
"=",
|
|
"log(1 - Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Upward catch-up speed (in ratio per second)",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the camera offset on X axis of the object. This is not the current difference between the object and the camera position.",
|
|
"fullName": "Camera offset X",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "Camera configuration",
|
|
"name": "OffsetX",
|
|
"sentence": "the camera offset on X axis",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"CameraOffsetX"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "OffsetX",
|
|
"group": "Camera configuration",
|
|
"name": "SetOffsetXOp",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraOffsetX",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera offset on X axis of an object.",
|
|
"fullName": "Camera Offset X",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetOffsetX",
|
|
"private": true,
|
|
"sentence": "Change the camera offset on X axis of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Deprecated use SetOffsetXOp instead."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetOffsetXOp"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"=",
|
|
"Value",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Camera offset X",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the camera offset on Y axis of the object. This is not the current difference between the object and the camera position.",
|
|
"fullName": "Camera offset Y",
|
|
"functionType": "ExpressionAndCondition",
|
|
"group": "Camera configuration",
|
|
"name": "OffsetY",
|
|
"sentence": "the camera offset on Y axis",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"CameraOffsetY"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "OffsetY",
|
|
"group": "Camera configuration",
|
|
"name": "SetOffsetYOp",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraOffsetY",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera offset on Y axis of an object.",
|
|
"fullName": "Camera Offset Y",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetOffsetY",
|
|
"private": true,
|
|
"sentence": "Change the camera offset on Y axis of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Deprecated use SetOffsetYOp instead."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetOffsetYOp"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"=",
|
|
"CameraOffsetY",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Camera offset Y",
|
|
"name": "CameraOffsetY",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera forecast time (in seconds).",
|
|
"fullName": "Forecast time",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetForecastTime",
|
|
"sentence": "Change the camera forecast time of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastTime",
|
|
"=",
|
|
"min(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Forecast time",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the camera delay (in seconds).",
|
|
"fullName": "Camera delay",
|
|
"functionType": "Action",
|
|
"group": "Camera configuration",
|
|
"name": "SetCameraDelay",
|
|
"sentence": "Change the camera delay of _PARAM0_: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraDelay",
|
|
"=",
|
|
"max(0, Value)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Camera delay",
|
|
"name": "Value",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return follow free area left border X.",
|
|
"fullName": "Free area left",
|
|
"functionType": "Expression",
|
|
"group": "Private",
|
|
"name": "FreeAreaLeft",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"ForecastedX + CameraOffsetX - FollowFreeAreaLeft"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return follow free area right border X.",
|
|
"fullName": "Free area right",
|
|
"functionType": "Expression",
|
|
"group": "Private",
|
|
"name": "FreeAreaRight",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"ForecastedX + CameraOffsetX + FollowFreeAreaRight"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return follow free area bottom border Y.",
|
|
"fullName": "Free area bottom",
|
|
"functionType": "Expression",
|
|
"group": "Private",
|
|
"name": "FreeAreaBottom",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"ForecastedY + CameraOffsetY + FollowFreeAreaBottom"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return follow free area top border Y.",
|
|
"fullName": "Free area top",
|
|
"functionType": "Expression",
|
|
"group": "Private",
|
|
"name": "FreeAreaTop",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"ForecastedY + CameraOffsetY - FollowFreeAreaTop"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Update delayed position and delayed history. This is called in doStepPreEvents.",
|
|
"fullName": "Update delayed position",
|
|
"functionType": "Action",
|
|
"group": "Private",
|
|
"name": "UpdateDelayedPosition",
|
|
"private": true,
|
|
"sentence": "Update delayed position and delayed history of _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Add the previous position to have enough (2) positions to evaluate the extra delay for waiting mode."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::IsWaiting"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.VariableChildCount(__SmoothCamera.ObjectTime)",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectTime",
|
|
"TimeFromStart()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectX",
|
|
"DelayedCenterX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectY",
|
|
"DelayedCenterY"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Use the object center when no delay is asked."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DelayedCenterX",
|
|
"=",
|
|
"Object.CenterX()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DelayedCenterY",
|
|
"=",
|
|
"Object.CenterY()"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "SmoothCamera::SmoothCamera::IsDelayed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::AddForecastHistoryPosition"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"TimeFromStart()",
|
|
"Object.CenterX()",
|
|
"Object.CenterY()",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::IsDelayed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::IsWaiting"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectTime",
|
|
"TimeFromStart()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectX",
|
|
"Object.CenterX()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectY",
|
|
"Object.CenterY()"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Remove history entries that are too old to be useful for delaying and pass it to the history for forecasting."
|
|
},
|
|
{
|
|
"infiniteLoopWarning": true,
|
|
"type": "BuiltinCommonInstructions::While",
|
|
"whileConditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.VariableChildCount(__SmoothCamera.ObjectTime)",
|
|
">=",
|
|
"2"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "VarObjet"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectTime[1]",
|
|
"<",
|
|
"TimeFromStart() - Object.Behavior::CurrentDelay()"
|
|
]
|
|
}
|
|
],
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::AddForecastHistoryPosition"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"Object.Variable(__SmoothCamera.ObjectTime[0])",
|
|
"Object.Variable(__SmoothCamera.ObjectX[0])",
|
|
"Object.Variable(__SmoothCamera.ObjectY[0])",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableRemoveAt"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectTime",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableRemoveAt"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectX",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableRemoveAt"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectY",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Don't move the camera if there is not enough history."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DelayedCenterX",
|
|
"=",
|
|
"Object.Variable(__SmoothCamera.ObjectX[0])"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DelayedCenterY",
|
|
"=",
|
|
"Object.Variable(__SmoothCamera.ObjectY[0])"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.VariableChildCount(__SmoothCamera.ObjectTime)",
|
|
">=",
|
|
"2"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "VarObjet"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectTime[0]",
|
|
"<",
|
|
"TimeFromStart() - Object.Behavior::CurrentDelay()"
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Add the extra delay that could be needed to respect the speed limit in waiting mode.\n\nspeedRatio = min(speedMaxX / historySpeedX, speedMaxY / historySpeedY)\ndelay += min(0, timeDelta * (1 - speedRatio))"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::IsWaiting"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraExtraDelay",
|
|
"+",
|
|
"max(0, TimeDelta() * (1 - min(WaitingSpeedXMax * abs(Object.Variable(__SmoothCamera.ObjectX[1]) - Object.Variable(__SmoothCamera.ObjectX[0])), WaitingSpeedYMax * abs(Object.Variable(__SmoothCamera.ObjectY[1]) - Object.Variable(__SmoothCamera.ObjectY[0]))) / (Object.Variable(__SmoothCamera.ObjectTime[1]) - Object.Variable(__SmoothCamera.ObjectTime[0]))))"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Extra delay: \" + ToString(CameraExtraDelay)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "The time with delay is now between the first 2 indexes"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DelayedCenterX",
|
|
"=",
|
|
"lerp(Object.Variable(__SmoothCamera.ObjectX[1]), Object.Variable(__SmoothCamera.ObjectX[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"DelayedCenterY",
|
|
"=",
|
|
"lerp(Object.Variable(__SmoothCamera.ObjectY[1]), Object.Variable(__SmoothCamera.ObjectY[0]), ((TimeFromStart() - Object.Behavior::CurrentDelay()) - Object.Variable(__SmoothCamera.ObjectTime[1])) / (Object.Variable(__SmoothCamera.ObjectTime[0]) - Object.Variable(__SmoothCamera.ObjectTime[1])))"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "SmoothCamera::SmoothCamera::IsDelayed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "SmoothCamera::SmoothCamera::IsWaiting"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableClearChildren"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectTime"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableClearChildren"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableClearChildren"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ObjectY"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "SmoothCamera::SmoothCamera::IsWaiting"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraDelayCatchUpSpeed",
|
|
"=",
|
|
"CameraExtraDelay / CameraDelayCatchUpDuration"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Start to catch up\"",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "SmoothCamera::SmoothCamera::IsWaiting"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraExtraDelay",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"CameraExtraDelay",
|
|
"=",
|
|
"max(0, CameraExtraDelay -CameraDelayCatchUpSpeed * TimeDelta())"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Catching up delay: \" + ToString(CameraExtraDelay)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the camera following target is delayed from the object.",
|
|
"fullName": "Camera is delayed",
|
|
"functionType": "Condition",
|
|
"name": "IsDelayed",
|
|
"private": true,
|
|
"sentence": "The camera of _PARAM0_ is delayed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.Behavior::CurrentDelay()",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the current camera delay.",
|
|
"fullName": "Current delay",
|
|
"functionType": "Expression",
|
|
"name": "CurrentDelay",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"CameraDelay + CameraExtraDelay"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the camera following is waiting at a reduced speed.",
|
|
"fullName": "Camera is waiting",
|
|
"functionType": "Condition",
|
|
"name": "IsWaiting",
|
|
"private": true,
|
|
"sentence": "The camera of _PARAM0_ is waiting",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"WaitingEnd",
|
|
">",
|
|
"TimeFromStart()"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Add a position to the history for forecasting. This is called 2 times in UpadteDelayedPosition.",
|
|
"fullName": "Add forecast history position",
|
|
"functionType": "Action",
|
|
"group": "Private",
|
|
"name": "AddForecastHistoryPosition",
|
|
"private": true,
|
|
"sentence": "Add the time:_PARAM2_ and position: _PARAM3_; _PARAM4_ to the forecast history of _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryDuration",
|
|
">",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastTime",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryTime",
|
|
"Time"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryX",
|
|
"ObjectX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariablePushNumber"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryY",
|
|
"ObjectY"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Remove history entries that are too old to be useful.\nKeep at least 2 positions because no forecast can be done with less positions."
|
|
},
|
|
{
|
|
"infiniteLoopWarning": true,
|
|
"type": "BuiltinCommonInstructions::While",
|
|
"whileConditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",
|
|
">=",
|
|
"3"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "VarObjet"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryTime[0]",
|
|
"<",
|
|
"TimeFromStart() - CameraDelay - CameraExtraDelay - ForecastHistoryDuration"
|
|
]
|
|
}
|
|
],
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableRemoveAt"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryTime",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableRemoveAt"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryX",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ObjectVariableRemoveAt"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"__SmoothCamera.ForecastHistoryY",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Time",
|
|
"name": "Time",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Object X",
|
|
"name": "ObjectX",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Object Y",
|
|
"name": "ObjectY",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Update forecasted position. This is called in doStepPreEvents.",
|
|
"fullName": "Update forecasted position",
|
|
"functionType": "Action",
|
|
"group": "Private",
|
|
"name": "UpdateForecastedPosition",
|
|
"private": true,
|
|
"sentence": "Update forecasted position of _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastedX",
|
|
"=",
|
|
"DelayedCenterX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastedY",
|
|
"=",
|
|
"DelayedCenterY"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Simple linear regression\ny = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX\n\nNote than we could use only one position every N positions to reduce the process time,\nbut if we really need efficient process JavaScript and circular queues are a must."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime)",
|
|
">=",
|
|
"2"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryDuration",
|
|
">",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastTime",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Mean X",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryMeanX",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Repeat",
|
|
"repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryMeanX",
|
|
"+",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[Index])"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"+",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryMeanX",
|
|
"/",
|
|
"Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Mean Y",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryMeanY",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Repeat",
|
|
"repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryMeanY",
|
|
"+",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[Index])"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"+",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryMeanY",
|
|
"/",
|
|
"Object.VariableChildCount(__SmoothCamera.ForecastHistoryY)"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Mean: \" + ToString(ForecastHistoryMeanX) + \" \" + ToString(ForecastHistoryMeanY)",
|
|
"",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Variance and Covariance",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "VarianceX = sum((X[i] - MeanX)²)\nVarianceY = sum((Y[i] - MeanY)²)\nCovariance = sum((X[i] - MeanX) * (Y[i] - MeanY))"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryVarianceX",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryVarianceY",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryCovariance",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Repeat",
|
|
"repeatExpression": "Object.VariableChildCount(__SmoothCamera.ForecastHistoryX)",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryVarianceX",
|
|
"+",
|
|
"pow(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX, 2)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryVarianceY",
|
|
"+",
|
|
"pow(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY, 2)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryCovariance",
|
|
"+",
|
|
"(Object.Variable(__SmoothCamera.ForecastHistoryX[Index]) - ForecastHistoryMeanX)\n*\n(Object.Variable(__SmoothCamera.ForecastHistoryY[Index]) - ForecastHistoryMeanY)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"+",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Variances: \" + ToString(ForecastHistoryVarianceX) + \" \" + ToString(ForecastHistoryVarianceY) + \" \" + ToString(ForecastHistoryCovariance)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"abs(ForecastHistoryVarianceX)",
|
|
"<",
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"abs(ForecastHistoryVarianceY)",
|
|
"<",
|
|
"1"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastedX",
|
|
"=",
|
|
"DelayedCenterX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastedY",
|
|
"=",
|
|
"DelayedCenterY"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"abs(ForecastHistoryVarianceX)",
|
|
">=",
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"abs(ForecastHistoryVarianceY)",
|
|
">=",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Linear function parameters",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "y = A * x + B\n\nA = Covariance / VarianceX\nB = MeanY - A * MeanX"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"abs(ForecastHistoryVarianceX)",
|
|
">=",
|
|
"abs(ForecastHistoryVarianceY)"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryLinearA",
|
|
"=",
|
|
"ForecastHistoryCovariance / ForecastHistoryVarianceX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryLinearB",
|
|
"=",
|
|
"ForecastHistoryMeanY - ForecastHistoryLinearA * ForecastHistoryMeanX"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Projection",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::ProjectHistoryEnds"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[0])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[0])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Axis permutation to avoid a ratio between 2 numbers near 0."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::CompareNumbers"
|
|
},
|
|
"parameters": [
|
|
"abs(ForecastHistoryVarianceX)",
|
|
"<",
|
|
"abs(ForecastHistoryVarianceY)"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryLinearA",
|
|
"=",
|
|
"ForecastHistoryCovariance / ForecastHistoryVarianceY"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastHistoryLinearB",
|
|
"=",
|
|
"ForecastHistoryMeanX - ForecastHistoryLinearA * ForecastHistoryMeanY"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Linear: \" + ToString(ForecastHistoryLinearA) + \" \" + ToString(ForecastHistoryLinearB)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Projection",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::ProjectHistoryEnds"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[0])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[0])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryY[Object.VariableChildCount(__SmoothCamera.ForecastHistoryY) - 1])",
|
|
"Object.Variable(__SmoothCamera.ForecastHistoryX[Object.VariableChildCount(__SmoothCamera.ForecastHistoryX) - 1])",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Permute back axis"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"ProjectedOldestX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedOldestX",
|
|
"=",
|
|
"ProjectedOldestY"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedOldestY",
|
|
"=",
|
|
"Index"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"ProjectedNewestX"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedNewestX",
|
|
"=",
|
|
"ProjectedNewestY"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedNewestY",
|
|
"=",
|
|
"Index"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Oldest: \" + ToString(ProjectedOldestX) + \" \" + ToString(ProjectedOldestY)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Newest: \" + ToString(ProjectedNewestX) + \" \" + ToString(ProjectedNewestY)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Forecasted position",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastedX",
|
|
"=",
|
|
"ProjectedNewestX + ( ProjectedNewestX - ProjectedOldestX) * Object.Behavior::ForecastTimeRatio()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ForecastedY",
|
|
"=",
|
|
"ProjectedNewestY + ( ProjectedNewestY - ProjectedOldestY) * Object.Behavior::ForecastTimeRatio()"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"disabled": true,
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "DebuggerTools::ConsoleLog"
|
|
},
|
|
"parameters": [
|
|
"\"Forecasted: \" + ToString(ForecastedX) + \" \" + ToString(ForecastedY)",
|
|
"\"info\"",
|
|
"\"SmoothCamera\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Project history ends position to have the vector on the line from linear regression. This function is only called by UpdateForecastedPosition.",
|
|
"fullName": "Project history ends",
|
|
"functionType": "Action",
|
|
"group": "Private",
|
|
"name": "ProjectHistoryEnds",
|
|
"private": true,
|
|
"sentence": "Project history oldest: _PARAM2_;_PARAM3_ and newest position: _PARAM4_;_PARAM5_ of _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Perpendicular line:\npA = -1/a; \npB = -pA * x + y\n\nIntersection:\n/ ProjectedY = a * ProjectedX + b\n\\ ProjectedY = pA * ProjectedX + b\n\nSolution that is cleaned out from indeterminism (like 0 / 0 or infinity / infinity):\nProjectedX= (x + (y - b) * a) / (a² + 1)\nProjectedY = y + (x * a - y + b) / (a² + 1)"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedNewestX",
|
|
"=",
|
|
"(NewestX + (NewestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedNewestY",
|
|
"=",
|
|
"NewestY + (NewestX * ForecastHistoryLinearA - NewestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedOldestX",
|
|
"=",
|
|
"(OldestX + (OldestY - ForecastHistoryLinearB) * ForecastHistoryLinearA) / (1 + pow(ForecastHistoryLinearA, 2))"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"ProjectedOldestY",
|
|
"=",
|
|
"OldestY + (OldestX * ForecastHistoryLinearA - OldestY \n+ ForecastHistoryLinearB) / (1 + pow(ForecastHistoryLinearA, 2))"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "OldestX",
|
|
"name": "OldestX",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "OldestY",
|
|
"name": "OldestY",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Newest X",
|
|
"name": "NewestX",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Newest Y",
|
|
"name": "NewestY",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the ratio between forecast time and the duration of the history. This function is only called by UpdateForecastedPosition.",
|
|
"fullName": "Forecast time ratio",
|
|
"functionType": "Expression",
|
|
"group": "Private",
|
|
"name": "ForecastTimeRatio",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"- ForecastTime / (Object.Variable(__SmoothCamera.ForecastHistoryTime[0]) - Object.Variable(__SmoothCamera.ForecastHistoryTime[Object.VariableChildCount(__SmoothCamera.ForecastHistoryTime) - 1]))"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "onCreated"
|
|
},
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
},
|
|
{
|
|
"functionName": "MoveCameraCloser"
|
|
},
|
|
{
|
|
"functionName": "DoMoveCameraCloser"
|
|
},
|
|
{
|
|
"functionName": "WaitAndCatchUp"
|
|
},
|
|
{
|
|
"functionName": "DrawDebug"
|
|
},
|
|
{
|
|
"folderName": "Camera configuration",
|
|
"children": [
|
|
{
|
|
"functionName": "SetFollowOnX"
|
|
},
|
|
{
|
|
"functionName": "SetFollowOnY"
|
|
},
|
|
{
|
|
"functionName": "SetFollowFreeAreaRight"
|
|
},
|
|
{
|
|
"functionName": "SetFollowFreeAreaLeft"
|
|
},
|
|
{
|
|
"functionName": "SetFollowFreeAreaTop"
|
|
},
|
|
{
|
|
"functionName": "SetFollowFreeAreaBottom"
|
|
},
|
|
{
|
|
"functionName": "SetLeftwardSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "SetRightwardSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "SetUpwardSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "SetDownwardSpeedMax"
|
|
},
|
|
{
|
|
"functionName": "SetLeftwardSpeed"
|
|
},
|
|
{
|
|
"functionName": "SetRightwardSpeed"
|
|
},
|
|
{
|
|
"functionName": "SetDownwardSpeed"
|
|
},
|
|
{
|
|
"functionName": "SetUpwardSpeed"
|
|
},
|
|
{
|
|
"functionName": "OffsetX"
|
|
},
|
|
{
|
|
"functionName": "SetOffsetXOp"
|
|
},
|
|
{
|
|
"functionName": "SetOffsetX"
|
|
},
|
|
{
|
|
"functionName": "OffsetY"
|
|
},
|
|
{
|
|
"functionName": "SetOffsetYOp"
|
|
},
|
|
{
|
|
"functionName": "SetOffsetY"
|
|
},
|
|
{
|
|
"functionName": "SetForecastTime"
|
|
},
|
|
{
|
|
"functionName": "SetCameraDelay"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "Private",
|
|
"children": [
|
|
{
|
|
"functionName": "FreeAreaLeft"
|
|
},
|
|
{
|
|
"functionName": "FreeAreaRight"
|
|
},
|
|
{
|
|
"functionName": "FreeAreaBottom"
|
|
},
|
|
{
|
|
"functionName": "FreeAreaTop"
|
|
},
|
|
{
|
|
"functionName": "UpdateDelayedPosition"
|
|
},
|
|
{
|
|
"functionName": "AddForecastHistoryPosition"
|
|
},
|
|
{
|
|
"functionName": "UpdateForecastedPosition"
|
|
},
|
|
{
|
|
"functionName": "ProjectHistoryEnds"
|
|
},
|
|
{
|
|
"functionName": "ForecastTimeRatio"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"functionName": "IsDelayed"
|
|
},
|
|
{
|
|
"functionName": "CurrentDelay"
|
|
},
|
|
{
|
|
"functionName": "IsWaiting"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "0.9",
|
|
"type": "Number",
|
|
"label": "Leftward catch-up speed (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "LeftwardSpeed"
|
|
},
|
|
{
|
|
"value": "0.9",
|
|
"type": "Number",
|
|
"label": "Rightward catch-up speed (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "RightwardSpeed"
|
|
},
|
|
{
|
|
"value": "0.9",
|
|
"type": "Number",
|
|
"label": "Upward catch-up speed (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "UpwardSpeed"
|
|
},
|
|
{
|
|
"value": "0.9",
|
|
"type": "Number",
|
|
"label": "Downward catch-up speed (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "DownwardSpeed"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Follow on X axis",
|
|
"name": "FollowOnX"
|
|
},
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "Follow on Y axis",
|
|
"name": "FollowOnY"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area left border",
|
|
"group": "Position",
|
|
"advanced": true,
|
|
"name": "FollowFreeAreaLeft"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area right border",
|
|
"group": "Position",
|
|
"advanced": true,
|
|
"name": "FollowFreeAreaRight"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area top border",
|
|
"group": "Position",
|
|
"advanced": true,
|
|
"name": "FollowFreeAreaTop"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area bottom border",
|
|
"group": "Position",
|
|
"advanced": true,
|
|
"name": "FollowFreeAreaBottom"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Camera offset X",
|
|
"group": "Position",
|
|
"advanced": true,
|
|
"name": "CameraOffsetX"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Camera offset Y",
|
|
"group": "Position",
|
|
"advanced": true,
|
|
"name": "CameraOffsetY"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Second",
|
|
"label": "Camera delay",
|
|
"group": "Timing",
|
|
"deprecated": true,
|
|
"name": "CameraDelay"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Second",
|
|
"label": "Forecast time",
|
|
"group": "Timing",
|
|
"deprecated": true,
|
|
"name": "ForecastTime"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Second",
|
|
"label": "Forecast history duration",
|
|
"group": "Timing",
|
|
"deprecated": true,
|
|
"name": "ForecastHistoryDuration"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "LogLeftwardSpeed"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "LogRightwardSpeed"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "LogDownwardSpeed"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "LogUpwardSpeed"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "DelayedCenterX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "DelayedCenterY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryMeanX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryMeanY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryVarianceX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryCovariance"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryLinearA"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryLinearB"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastedX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastedY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ProjectedNewestX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ProjectedNewestY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ProjectedOldestX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ProjectedOldestY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "ForecastHistoryVarianceY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "Index (local variable)",
|
|
"hidden": true,
|
|
"name": "Index"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "CameraDelayCatchUpSpeed"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "CameraExtraDelay"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "WaitingSpeedXMax"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "WaitingSpeedYMax"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "WaitingEnd"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "CameraDelayCatchUpDuration"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Leftward maximum speed",
|
|
"group": "Maximum speed",
|
|
"advanced": true,
|
|
"name": "LeftwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Rightward maximum speed",
|
|
"group": "Maximum speed",
|
|
"advanced": true,
|
|
"name": "RightwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Upward maximum speed",
|
|
"group": "Maximum speed",
|
|
"advanced": true,
|
|
"name": "UpwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Downward maximum speed",
|
|
"group": "Maximum speed",
|
|
"advanced": true,
|
|
"name": "DownwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "OldX (local variable)",
|
|
"hidden": true,
|
|
"name": "OldX"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "OldY (local variable)",
|
|
"hidden": true,
|
|
"name": "OldY"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "IsCalledManually"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"folderName": "Catch-up speed",
|
|
"children": [
|
|
{
|
|
"propertyName": "LeftwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "RightwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "UpwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "DownwardSpeed"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"propertyName": "FollowOnX"
|
|
},
|
|
{
|
|
"propertyName": "FollowOnY"
|
|
},
|
|
{
|
|
"folderName": "Position",
|
|
"children": [
|
|
{
|
|
"propertyName": "FollowFreeAreaLeft"
|
|
},
|
|
{
|
|
"propertyName": "FollowFreeAreaRight"
|
|
},
|
|
{
|
|
"propertyName": "FollowFreeAreaTop"
|
|
},
|
|
{
|
|
"propertyName": "FollowFreeAreaBottom"
|
|
},
|
|
{
|
|
"propertyName": "CameraOffsetX"
|
|
},
|
|
{
|
|
"propertyName": "CameraOffsetY"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "Timing",
|
|
"children": [
|
|
{
|
|
"propertyName": "CameraDelay"
|
|
},
|
|
{
|
|
"propertyName": "ForecastTime"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryDuration"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"propertyName": "LogLeftwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "LogRightwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "LogDownwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "LogUpwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "DelayedCenterX"
|
|
},
|
|
{
|
|
"propertyName": "DelayedCenterY"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryMeanX"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryMeanY"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryVarianceX"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryCovariance"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryLinearA"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryLinearB"
|
|
},
|
|
{
|
|
"propertyName": "ForecastedX"
|
|
},
|
|
{
|
|
"propertyName": "ForecastedY"
|
|
},
|
|
{
|
|
"propertyName": "ProjectedNewestX"
|
|
},
|
|
{
|
|
"propertyName": "ProjectedNewestY"
|
|
},
|
|
{
|
|
"propertyName": "ProjectedOldestX"
|
|
},
|
|
{
|
|
"propertyName": "ProjectedOldestY"
|
|
},
|
|
{
|
|
"propertyName": "ForecastHistoryVarianceY"
|
|
},
|
|
{
|
|
"propertyName": "Index"
|
|
},
|
|
{
|
|
"propertyName": "CameraDelayCatchUpSpeed"
|
|
},
|
|
{
|
|
"propertyName": "CameraExtraDelay"
|
|
},
|
|
{
|
|
"propertyName": "WaitingSpeedXMax"
|
|
},
|
|
{
|
|
"propertyName": "WaitingSpeedYMax"
|
|
},
|
|
{
|
|
"propertyName": "WaitingEnd"
|
|
},
|
|
{
|
|
"propertyName": "CameraDelayCatchUpDuration"
|
|
},
|
|
{
|
|
"folderName": "Maximum speed",
|
|
"children": [
|
|
{
|
|
"propertyName": "LeftwardSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "RightwardSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "UpwardSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "DownwardSpeedMax"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"propertyName": "OldX"
|
|
},
|
|
{
|
|
"propertyName": "OldY"
|
|
},
|
|
{
|
|
"propertyName": "IsCalledManually"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Smoothly scroll to follow a character and stabilize the camera when jumping.",
|
|
"fullName": "Smooth platformer camera",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "SmoothPlatformerCamera",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"quickCustomizationVisibility": "hidden",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPreEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "PlatformBehavior::IsJumping"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "PlatformBehavior::IsFalling"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"FloorFollowFreeAreaTop",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"FloorFollowFreeAreaBottom",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetUpwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"FloorUpwardSpeed",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetDownwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"FloorDownwardSpeed",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"FloorUpwardSpeedMax",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"FloorDownwardSpeedMax",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::IsJumping"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PlatformBehavior::IsFalling"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"PlatformerCharacter"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaBottom"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"AirFollowFreeAreaTop",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetFollowFreeAreaTop"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"AirFollowFreeAreaBottom",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetUpwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"AirUpwardSpeed",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetDownwardSpeed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"AirDownwardSpeed",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetUpwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"AirUpwardSpeedMax",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SmoothCamera::SmoothCamera::SetDownwardSpeedMax"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"SmoothCamera",
|
|
"AirDownwardSpeedMax",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "SmoothCamera::SmoothPlatformerCamera",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPreEvents"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "Platformer character behavior",
|
|
"extraInformation": [
|
|
"PlatformBehavior::PlatformerObjectBehavior"
|
|
],
|
|
"choices": [],
|
|
"name": "PlatformerCharacter"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Behavior",
|
|
"label": "Smooth camera behavior",
|
|
"extraInformation": [
|
|
"SmoothCamera::SmoothCamera"
|
|
],
|
|
"choices": [],
|
|
"name": "SmoothCamera"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "JumpOriginY"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area top in the air",
|
|
"group": "Position",
|
|
"name": "AirFollowFreeAreaTop"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area bottom in the air",
|
|
"group": "Position",
|
|
"name": "AirFollowFreeAreaBottom"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area top on the floor",
|
|
"group": "Position",
|
|
"name": "FloorFollowFreeAreaTop"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Follow free area bottom on the floor",
|
|
"group": "Position",
|
|
"name": "FloorFollowFreeAreaBottom"
|
|
},
|
|
{
|
|
"value": "0.95",
|
|
"type": "Number",
|
|
"label": "Upward speed in the air (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "AirUpwardSpeed"
|
|
},
|
|
{
|
|
"value": "0.95",
|
|
"type": "Number",
|
|
"label": "Downward speed in the air (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "AirDownwardSpeed"
|
|
},
|
|
{
|
|
"value": "0.9",
|
|
"type": "Number",
|
|
"label": "Upward speed on the floor (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "FloorUpwardSpeed"
|
|
},
|
|
{
|
|
"value": "0.9",
|
|
"type": "Number",
|
|
"label": "Downward speed on the floor (in ratio per second)",
|
|
"group": "Catch-up speed",
|
|
"name": "FloorDownwardSpeed"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Upward maximum speed in the air",
|
|
"group": "Maximum speed",
|
|
"name": "AirUpwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Downward maximum speed in the air",
|
|
"group": "Maximum speed",
|
|
"name": "AirDownwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Upward maximum speed on the floor",
|
|
"group": "Maximum speed",
|
|
"name": "FloorUpwardSpeedMax"
|
|
},
|
|
{
|
|
"value": "9000",
|
|
"type": "Number",
|
|
"unit": "PixelSpeed",
|
|
"label": "Downward maximum speed on the floor",
|
|
"group": "Maximum speed",
|
|
"name": "FloorDownwardSpeedMax"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "PlatformerCharacter"
|
|
},
|
|
{
|
|
"propertyName": "SmoothCamera"
|
|
},
|
|
{
|
|
"propertyName": "JumpOriginY"
|
|
},
|
|
{
|
|
"folderName": "Position",
|
|
"children": [
|
|
{
|
|
"propertyName": "AirFollowFreeAreaTop"
|
|
},
|
|
{
|
|
"propertyName": "AirFollowFreeAreaBottom"
|
|
},
|
|
{
|
|
"propertyName": "FloorFollowFreeAreaTop"
|
|
},
|
|
{
|
|
"propertyName": "FloorFollowFreeAreaBottom"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "Catch-up speed",
|
|
"children": [
|
|
{
|
|
"propertyName": "AirUpwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "AirDownwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "FloorUpwardSpeed"
|
|
},
|
|
{
|
|
"propertyName": "FloorDownwardSpeed"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"folderName": "Maximum speed",
|
|
"children": [
|
|
{
|
|
"propertyName": "AirUpwardSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "AirDownwardSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "FloorUpwardSpeedMax"
|
|
},
|
|
{
|
|
"propertyName": "FloorDownwardSpeedMax"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"eventsBasedObjects": []
|
|
},
|
|
{
|
|
"author": "Westboy31",
|
|
"category": "Visual effect",
|
|
"dimension": "2D",
|
|
"extensionNamespace": "",
|
|
"fullName": "Flash and transition painter",
|
|
"gdevelopVersion": ">=5.5.222",
|
|
"helpPath": "",
|
|
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vdmllLWZpbHRlciIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOCA0TDIwIDdIMTdMMTUgNEgxM0wxNSA3SDEyTDEwIDRIOEwxMCA3SDdMNSA0SDRDMi45IDQgMiA0LjkgMiA2TDIgMThDMiAxOS4xIDIuOSAyMCA0IDIwSDIwQzIxLjEgMjAgMjIgMTkuMSAyMiAxOFY0SDE4TTExLjI1IDE1LjI1TDEwIDE4TDguNzUgMTUuMjVMNiAxNEw4Ljc1IDEyLjc1TDEwIDEwTDExLjI1IDEyLjc1TDE0IDE0TDExLjI1IDE1LjI1TTE2Ljk0IDExLjk0TDE2IDE0TDE1LjA2IDExLjk0TDEzIDExTDE1LjA2IDEwLjA2TDE2IDhMMTYuOTQgMTAuMDZMMTkgMTFMMTYuOTQgMTEuOTRaIiAvPjwvc3ZnPg==",
|
|
"name": "FlashTransitionPainter",
|
|
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/movie-filter.svg",
|
|
"shortDescription": "Screen transitions painted with plain color fill using Shape Painter.",
|
|
"version": "0.2.0",
|
|
"description": [
|
|
"Paint transition effects",
|
|
"- Fade in, fade out",
|
|
"- Right to left",
|
|
"- Top to bottom",
|
|
"- Circular",
|
|
"",
|
|
"A blur effect can be added to the painter layer to smooth the transition."
|
|
],
|
|
"origin": {
|
|
"identifier": "FlashTransitionPainter",
|
|
"name": "gdevelop-extension-store"
|
|
},
|
|
"tags": [
|
|
"flash",
|
|
"transition",
|
|
"effect"
|
|
],
|
|
"authorIds": [],
|
|
"dependencies": [],
|
|
"globalVariables": [],
|
|
"sceneVariables": [],
|
|
"eventsFunctions": [],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT"
|
|
},
|
|
"eventsBasedBehaviors": [
|
|
{
|
|
"description": "Paint all over the screen a color for a period of time.",
|
|
"fullName": "Flash and transition painter",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "FlashTransitionPainter",
|
|
"objectType": "PrimitiveDrawing::Drawer",
|
|
"previewIconUrl": "",
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onCreated",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ActivateBehavior"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PrimitiveDrawing::Drawer",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPostEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Ensure shape painter properties are set correctly for this extension to work.\n"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::ClearBetweenFrames"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"no"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::OutlineSize"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::UseRelativeCoordinates"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Progress",
|
|
"=",
|
|
"min(1, Object.ObjectTimerElapsedTime(\"__FlashTransitionPainter_Time\") / Duration)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Drawer::ClearShapes"
|
|
},
|
|
"parameters": [
|
|
"Object"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Progress",
|
|
"=",
|
|
"1"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ActivateBehavior"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PauseObjectTimer"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"\"__FlashTransitionPainter_Time\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Direction",
|
|
"=",
|
|
"\"Backward\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Progress",
|
|
"=",
|
|
"1 - Progress"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Direction",
|
|
"=",
|
|
"\"Both\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Progress",
|
|
"=",
|
|
"min(2 * Progress, 2 * (1 - Progress))"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Progress",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::FillOpacity"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"MaxOpacity"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Flash",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Type",
|
|
"=",
|
|
"\"Flash\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::FillOpacity"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"MaxOpacity * Progress"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Rectangle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"CameraBorderLeft(Object.Layer())",
|
|
"CameraBorderTop(Object.Layer())",
|
|
"CameraBorderRight(Object.Layer())",
|
|
"CameraBorderBottom(Object.Layer())"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Horizontal",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "from left to right"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Type",
|
|
"=",
|
|
"\"Horizontal\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Rectangle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"CameraBorderLeft(Object.Layer())",
|
|
"CameraBorderTop(Object.Layer())",
|
|
"lerp(CameraBorderLeft(Object.Layer()), CameraBorderRight(Object.Layer()), Progress)",
|
|
"CameraBorderBottom(Object.Layer())"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Vertical",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "from top to bottom"
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Type",
|
|
"=",
|
|
"\"Vertical\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Rectangle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"CameraBorderLeft(Object.Layer())",
|
|
"CameraBorderTop(Object.Layer())",
|
|
"CameraBorderRight(Object.Layer())",
|
|
"lerp(CameraBorderTop(Object.Layer()), CameraBorderBottom(Object.Layer()), Progress)"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Circular",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "A circle scale up from the middle."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Type",
|
|
"=",
|
|
"\"Circular\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::Circle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"CameraCenterX(Object.Layer())",
|
|
"CameraCenterY(Object.Layer())",
|
|
"(DistanceBetweenPositions(0, 0, CameraWidth(Object.Layer()), CameraHeight(Object.Layer())) / 2 + 1) * Progress"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PrimitiveDrawing::Drawer",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Paint Effect.",
|
|
"fullName": "Paint Effect",
|
|
"functionType": "Action",
|
|
"name": "PaintEffect",
|
|
"sentence": "Paint effect type _PARAM4_ of _PARAM0_ with direction _PARAM5_ and color _PARAM2_ for _PARAM3_ seconds",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Initialise all variables and then activate the behavior.\nIf user doesn't assign value to color and type , we take the last value registred."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "BehaviorActivated"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ActivateBehavior"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"yes"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "UnPauseObjectTimer"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"\"__FlashTransitionPainter_Time\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ResetObjectTimer"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"\"__FlashTransitionPainter_Time\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Duration",
|
|
"=",
|
|
"NewDuration"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"Direction",
|
|
"=",
|
|
"NewDirection"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Progress",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"Type",
|
|
"=",
|
|
"\"Flash\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"NewType",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"Type",
|
|
"=",
|
|
"NewType"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"Color",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PrimitiveDrawing::FillColor"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Color"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"MaxOpacity",
|
|
"=",
|
|
"255"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"NewMaxOpacity",
|
|
"!=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"MaxOpacity",
|
|
"=",
|
|
"NewMaxOpacity"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PrimitiveDrawing::Drawer",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"description": "Color",
|
|
"name": "Color",
|
|
"type": "color"
|
|
},
|
|
{
|
|
"description": "Duration",
|
|
"name": "NewDuration",
|
|
"type": "expression"
|
|
},
|
|
{
|
|
"description": "Type of effect ",
|
|
"name": "NewType",
|
|
"supplementaryInformation": "[\"Flash\",\"Horizontal\",\"Vertical\",\"Circular\"]",
|
|
"type": "stringWithSelector"
|
|
},
|
|
{
|
|
"description": "Direction transition",
|
|
"name": "NewDirection",
|
|
"supplementaryInformation": "[\"Both\",\"Forward\",\"Backward\"]",
|
|
"type": "stringWithSelector"
|
|
},
|
|
{
|
|
"description": "End opacity",
|
|
"name": "NewMaxOpacity",
|
|
"type": "expression"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Paint effect ended.",
|
|
"fullName": "Paint effect ended ",
|
|
"functionType": "Condition",
|
|
"name": "PaintEffectIsEnd",
|
|
"sentence": "When paint effect of _PARAM0_ ends",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "ObjectTimerPaused"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"\"__FlashTransitionPainter_Time\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PrimitiveDrawing::Drawer",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "FlashTransitionPainter::FlashTransitionPainter",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "onCreated"
|
|
},
|
|
{
|
|
"functionName": "doStepPostEvents"
|
|
},
|
|
{
|
|
"functionName": "PaintEffect"
|
|
},
|
|
{
|
|
"functionName": "PaintEffectIsEnd"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Dimensionless",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "Progress"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "Duration"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "String",
|
|
"label": "Type of effect ",
|
|
"hidden": true,
|
|
"name": "Type"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "String",
|
|
"label": "Direction of transition",
|
|
"hidden": true,
|
|
"name": "Direction"
|
|
},
|
|
{
|
|
"value": "255",
|
|
"type": "Number",
|
|
"label": "The maximum of the opacity only for flash",
|
|
"hidden": true,
|
|
"name": "MaxOpacity"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "Progress"
|
|
},
|
|
{
|
|
"propertyName": "Duration"
|
|
},
|
|
{
|
|
"propertyName": "Type"
|
|
},
|
|
{
|
|
"propertyName": "Direction"
|
|
},
|
|
{
|
|
"propertyName": "MaxOpacity"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"eventsBasedObjects": []
|
|
},
|
|
{
|
|
"author": "",
|
|
"category": "User interface",
|
|
"dimension": "2D",
|
|
"extensionNamespace": "",
|
|
"fullName": "Labeled button",
|
|
"gdevelopVersion": ">=5.5.230",
|
|
"helpPath": "/objects/button",
|
|
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTI5LDIzSDNjLTEuMSwwLTItMC45LTItMlYxMWMwLTEuMSwwLjktMiwyLTJoMjZjMS4xLDAsMiwwLjksMiwydjEwQzMxLDIyLjEsMzAuMSwyMywyOSwyM3oiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xMywxOUwxMywxOWMtMS4xLDAtMi0wLjktMi0ydi0yYzAtMS4xLDAuOS0yLDItMmgwYzEuMSwwLDIsMC45LDIsMnYyQzE1LDE4LjEsMTQuMSwxOSwxMywxOXoiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxOCIgeTE9IjEzIiB4Mj0iMTgiIHkyPSIxOSIvPg0KPGxpbmUgY2xhc3M9InN0MCIgeDE9IjIxIiB5MT0iMTMiIHgyPSIxOCIgeTI9IjE3Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjEiIHkxPSIxOSIgeDI9IjE5IiB5Mj0iMTYiLz4NCjwvc3ZnPg0K",
|
|
"name": "PanelSpriteButton",
|
|
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Interface Elements/Interface Elements_interface_ui_button_ok_cta_clock_tap.svg",
|
|
"shortDescription": "Resizeable button with a label.",
|
|
"version": "2.2.1",
|
|
"description": [
|
|
"A button that can be used for menus and most labelled buttons of a game. The button can be customized with a background for each state and a label. It handles user interactions and a simple condition can be used to check if it is clicked.",
|
|
"",
|
|
"There are ready-to-use buttons in the asset-store [menu buttons pack](https://editor.gdevelop.io/?initial-dialog=asset-store&asset-pack=menu-buttons-menu-buttons)."
|
|
],
|
|
"origin": {
|
|
"identifier": "PanelSpriteButton",
|
|
"name": "gdevelop-extension-store"
|
|
},
|
|
"tags": [
|
|
"button",
|
|
"ui"
|
|
],
|
|
"authorIds": [
|
|
"IWykYNRvhCZBN3vEgKEbBPOR3Oc2"
|
|
],
|
|
"changelog": [
|
|
{
|
|
"version": "2.0.0",
|
|
"breaking": "- Buttons now use \"variants\", allowing easy swapping of their visual aspect. You will have to make some adjustments to existing buttons in your project. Follow this [migration documentation](https://wiki.gdevelop.io/gdevelop5/objects/custom-objects-prefab-template/migrate-to-variants/) to do these changes."
|
|
}
|
|
],
|
|
"dependencies": [],
|
|
"globalVariables": [],
|
|
"sceneVariables": [],
|
|
"eventsFunctions": [
|
|
{
|
|
"description": "Check if the events are running for the editor.",
|
|
"fullName": "Editor is running",
|
|
"functionType": "Condition",
|
|
"name": "IsInGameEdition",
|
|
"private": true,
|
|
"sentence": "Events are running for the editor",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"const game = runtimeScene.getGame();\r",
|
|
"eventsFunctionContext.returnValue = game.isInGameEdition && game.isInGameEdition();"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": false
|
|
}
|
|
],
|
|
"parameters": [],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "IsInGameEdition"
|
|
}
|
|
]
|
|
},
|
|
"eventsBasedBehaviors": [
|
|
{
|
|
"description": "The finite state machine used internally by the button object.",
|
|
"fullName": "Button finite state machine",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "ButtonFSM",
|
|
"objectType": "",
|
|
"previewIconUrl": "",
|
|
"private": true,
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPostEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "PanelSpriteButton::IsInGameEdition"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Finite state machine",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "The \"Validated\" state only last one frame."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Validated\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Check position",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Make sure the cursor position is only checked once per frame."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"MouseIsInside",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldCheckHovering",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "CollisionPoint"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"MouseOnlyCursorX(Object.Layer(), 0)",
|
|
"MouseOnlyCursorY(Object.Layer(), 0)"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"MouseIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchIsInside",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchId",
|
|
"!=",
|
|
"0"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "CollisionPoint"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TouchX(TouchId, Object.Layer(), 0)",
|
|
"TouchY(TouchId, Object.Layer(), 0)"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Handle touch start",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "HasAnyTouchOrMouseStarted"
|
|
},
|
|
"parameters": [
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Repeat",
|
|
"repeatExpression": "StartedTouchOrMouseCount()",
|
|
"conditions": [],
|
|
"actions": [],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "CollisionPoint"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"TouchX(StartedTouchOrMouseId(Index), Object.Layer(), 0)",
|
|
"TouchY(StartedTouchOrMouseId(Index), Object.Layer(), 0)"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchId",
|
|
"=",
|
|
"StartedTouchOrMouseId(Index)"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"=",
|
|
"\"Hovered\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::PropertyState"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedInside\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"Index",
|
|
"+",
|
|
"1"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Apply position changes",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"MouseIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Hovered\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"MouseIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Hovered\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedInside\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedOutside\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchIsInside",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedOutside\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedInside\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
},
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Handle touch end",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "HasTouchEnded"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"TouchId"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchId",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedInside\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Validated\""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedInside\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Validated\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onDeActivate",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::ResetState"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Behavior",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Reset the state of the button.",
|
|
"fullName": "Reset state",
|
|
"functionType": "Action",
|
|
"name": "ResetState",
|
|
"private": true,
|
|
"sentence": "Reset the button state of _PARAM0_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"TouchId",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is not used.",
|
|
"fullName": "Is idle",
|
|
"functionType": "Condition",
|
|
"name": "IsIdle",
|
|
"sentence": "_PARAM0_ is idle",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Idle\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button was just clicked.",
|
|
"fullName": "Is clicked",
|
|
"functionType": "Condition",
|
|
"name": "IsClicked",
|
|
"sentence": "_PARAM0_ is clicked",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Validated\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the cursor is hovered over the button.",
|
|
"fullName": "Is hovered",
|
|
"functionType": "Condition",
|
|
"name": "IsHovered",
|
|
"sentence": "_PARAM0_ is hovered",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Hovered\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is either hovered or pressed but not hovered.",
|
|
"fullName": "Is focused",
|
|
"functionType": "Condition",
|
|
"name": "IsFocused",
|
|
"sentence": "_PARAM0_ is focused",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"Hovered\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedOutside\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is currently being pressed with mouse or touch.",
|
|
"fullName": "Is pressed",
|
|
"functionType": "Condition",
|
|
"name": "IsPressed",
|
|
"sentence": "_PARAM0_ is pressed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedInside\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is currently being pressed outside with mouse or touch.",
|
|
"fullName": "Is held outside",
|
|
"functionType": "Condition",
|
|
"name": "IsPressedOutside",
|
|
"sentence": "_PARAM0_ is held outside",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"State",
|
|
"=",
|
|
"\"PressedOutside\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the touch id that is using the button or 0 if none.",
|
|
"fullName": "Touch id",
|
|
"functionType": "ExpressionAndCondition",
|
|
"name": "TouchId",
|
|
"sentence": "the touch id",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"TouchId"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::ButtonFSM",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "doStepPostEvents"
|
|
},
|
|
{
|
|
"functionName": "onDeActivate"
|
|
},
|
|
{
|
|
"functionName": "ResetState"
|
|
},
|
|
{
|
|
"functionName": "IsIdle"
|
|
},
|
|
{
|
|
"functionName": "IsClicked"
|
|
},
|
|
{
|
|
"functionName": "IsHovered"
|
|
},
|
|
{
|
|
"functionName": "IsFocused"
|
|
},
|
|
{
|
|
"functionName": "IsPressed"
|
|
},
|
|
{
|
|
"functionName": "IsPressedOutside"
|
|
},
|
|
{
|
|
"functionName": "TouchId"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "true",
|
|
"type": "Boolean",
|
|
"label": "",
|
|
"description": "Should check hovering",
|
|
"hidden": true,
|
|
"name": "ShouldCheckHovering"
|
|
},
|
|
{
|
|
"value": "Idle",
|
|
"type": "Choice",
|
|
"label": "State",
|
|
"choices": [
|
|
{
|
|
"label": "Idle",
|
|
"value": "Idle"
|
|
},
|
|
{
|
|
"label": "Hovered",
|
|
"value": "Hovered"
|
|
},
|
|
{
|
|
"label": "PressedInside",
|
|
"value": "PressedInside"
|
|
},
|
|
{
|
|
"label": "PressedOutside",
|
|
"value": "PressedOutside"
|
|
},
|
|
{
|
|
"label": "Validated",
|
|
"value": "Validated"
|
|
}
|
|
],
|
|
"hidden": true,
|
|
"name": "State"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"label": "Touch id",
|
|
"hidden": true,
|
|
"name": "TouchId"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Touch is inside",
|
|
"hidden": true,
|
|
"name": "TouchIsInside"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Mouse is inside",
|
|
"hidden": true,
|
|
"name": "MouseIsInside"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Number",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "Index"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "ShouldCheckHovering"
|
|
},
|
|
{
|
|
"propertyName": "State"
|
|
},
|
|
{
|
|
"propertyName": "TouchId"
|
|
},
|
|
{
|
|
"propertyName": "TouchIsInside"
|
|
},
|
|
{
|
|
"propertyName": "MouseIsInside"
|
|
},
|
|
{
|
|
"propertyName": "Index"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Change the text style when the button is hovered.",
|
|
"fullName": "Hover text style",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "TextStyleState",
|
|
"objectType": "TextObject::Text",
|
|
"previewIconUrl": "",
|
|
"private": true,
|
|
"eventsFunctions": [
|
|
{
|
|
"description": "Check if isHovered.",
|
|
"fullName": "IsHovered",
|
|
"functionType": "Condition",
|
|
"name": "IsHovered",
|
|
"sentence": "_PARAM0_ isHovered",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "TextObject::Text",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::TextStyleState",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change if isHovered.",
|
|
"fullName": "IsHovered",
|
|
"functionType": "Action",
|
|
"name": "SetIsHovered",
|
|
"sentence": "_PARAM0_ isHovered: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"False",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"Value",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverFontSize",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"IdleFontSize",
|
|
"=",
|
|
"Object.FontSize()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "TextObject::Text::SetFontSize"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"HoverFontSize"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverColor",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"IdleColor",
|
|
"=",
|
|
"Object.Behavior::Color()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "TextObject::ChangeColor"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"HoverColor"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldEnableShadowOnHover",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextObject::ShowShadow"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldEnableOutlineOnHover",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextObject::Text::SetOutlineEnabled"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"yes"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"Value",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverFontSize",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextObject::Text::SetFontSize"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"IdleFontSize"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverColor",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextObject::ChangeColor"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"IdleColor"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldEnableShadowOnHover",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextObject::ShowShadow"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"no"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldEnableOutlineOnHover",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextObject::Text::SetOutlineEnabled"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"no"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "TextObject::Text",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::TextStyleState",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"defaultValue": "yes",
|
|
"description": "IsHovered",
|
|
"name": "Value",
|
|
"optional": true,
|
|
"type": "yesorno"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the text color",
|
|
"fullName": "Text color",
|
|
"functionType": "StringExpression",
|
|
"name": "Color",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"/** @type {gdjs.TextRuntimeObject} */",
|
|
"const object = eventsFunctionContext.getObjects(\"Object\")[0];",
|
|
"",
|
|
"eventsFunctionContext.returnValue = object._color.join(\";\");"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "color"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "TextObject::Text",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::TextStyleState",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "IsHovered"
|
|
},
|
|
{
|
|
"functionName": "SetIsHovered"
|
|
},
|
|
{
|
|
"functionName": "Color"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Outline on hover",
|
|
"name": "ShouldEnableOutlineOnHover"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Color",
|
|
"label": "Hover color",
|
|
"name": "HoverColor"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "Enable shadow on hover",
|
|
"name": "ShouldEnableShadowOnHover"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Hover font size",
|
|
"name": "HoverFontSize"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "IsHovered"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Idle font size",
|
|
"hidden": true,
|
|
"name": "IdleFontSize"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Color",
|
|
"label": "Idle color",
|
|
"hidden": true,
|
|
"name": "IdleColor"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "IsHovered"
|
|
},
|
|
{
|
|
"propertyName": "HoverFontSize"
|
|
},
|
|
{
|
|
"propertyName": "IdleFontSize"
|
|
},
|
|
{
|
|
"propertyName": "HoverColor"
|
|
},
|
|
{
|
|
"propertyName": "IdleColor"
|
|
},
|
|
{
|
|
"propertyName": "ShouldEnableOutlineOnHover"
|
|
},
|
|
{
|
|
"propertyName": "ShouldEnableShadowOnHover"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"description": "Change the text style when the button is hovered.",
|
|
"fullName": "Hover bitmap text style",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"name": "BitmapTextStyleState",
|
|
"objectType": "BitmapText::BitmapTextObject",
|
|
"previewIconUrl": "",
|
|
"private": true,
|
|
"eventsFunctions": [
|
|
{
|
|
"description": "Check if isHovered.",
|
|
"fullName": "IsHovered",
|
|
"functionType": "Condition",
|
|
"name": "IsHovered",
|
|
"sentence": "_PARAM0_ isHovered",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "BitmapText::BitmapTextObject",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change if isHovered.",
|
|
"fullName": "IsHovered",
|
|
"functionType": "Action",
|
|
"name": "SetIsHovered",
|
|
"sentence": "_PARAM0_ isHovered: _PARAM2_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"False",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"Value",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverColor",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"IdleColor",
|
|
"=",
|
|
"Object.Behavior::Color()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BitmapText::SetTint"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"HoverColor"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverPrefix",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverSuffix",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetStringVariable"
|
|
},
|
|
"parameters": [
|
|
"IdleText",
|
|
"=",
|
|
"Object.Text::Value()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Text",
|
|
"=",
|
|
"HoverPrefix + Object.Text::Value() + HoverSuffix"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"True",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"Value",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetBooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"IsHovered",
|
|
"False",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverColor",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "BitmapText::SetTint"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"IdleColor"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Or"
|
|
},
|
|
"parameters": [],
|
|
"subInstructions": [
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverPrefix",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "StringVariable"
|
|
},
|
|
"parameters": [
|
|
"HoverSuffix",
|
|
"!=",
|
|
"\"\""
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"Text",
|
|
"=",
|
|
"IdleText"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "BitmapText::BitmapTextObject",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState",
|
|
"type": "behavior"
|
|
},
|
|
{
|
|
"defaultValue": "yes",
|
|
"description": "IsHovered",
|
|
"name": "Value",
|
|
"optional": true,
|
|
"type": "yesorno"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Return the text color",
|
|
"fullName": "Text color",
|
|
"functionType": "StringExpression",
|
|
"name": "Color",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::JsCode",
|
|
"inlineCode": [
|
|
"/** @type {gdjs.BitmapTextRuntimeObject} */",
|
|
"const object = eventsFunctionContext.getObjects(\"Object\")[0];",
|
|
"",
|
|
"eventsFunctionContext.returnValue = object._tint.join(\";\");"
|
|
],
|
|
"parameterObjects": "",
|
|
"useStrict": true,
|
|
"eventsSheetExpanded": true
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "color"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "BitmapText::BitmapTextObject",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Behavior",
|
|
"name": "Behavior",
|
|
"supplementaryInformation": "PanelSpriteButton::BitmapTextStyleState",
|
|
"type": "behavior"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "IsHovered"
|
|
},
|
|
{
|
|
"functionName": "SetIsHovered"
|
|
},
|
|
{
|
|
"functionName": "Color"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "Color",
|
|
"label": "Hover color",
|
|
"name": "HoverColor"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "String",
|
|
"label": "Hover prefix",
|
|
"name": "HoverPrefix"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "String",
|
|
"label": "Hover suffix",
|
|
"name": "HoverSuffix"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Boolean",
|
|
"label": "",
|
|
"hidden": true,
|
|
"name": "IsHovered"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "String",
|
|
"label": "Idle text",
|
|
"hidden": true,
|
|
"name": "IdleText"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Color",
|
|
"label": "Idle color",
|
|
"hidden": true,
|
|
"name": "IdleColor"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "IsHovered"
|
|
},
|
|
{
|
|
"propertyName": "HoverPrefix"
|
|
},
|
|
{
|
|
"propertyName": "HoverSuffix"
|
|
},
|
|
{
|
|
"propertyName": "IdleText"
|
|
},
|
|
{
|
|
"propertyName": "HoverColor"
|
|
},
|
|
{
|
|
"propertyName": "IdleColor"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"eventsBasedObjects": [
|
|
{
|
|
"areaMaxX": 256,
|
|
"areaMaxY": 64,
|
|
"areaMaxZ": 64,
|
|
"areaMinX": 0,
|
|
"areaMinY": 0,
|
|
"areaMinZ": 0,
|
|
"assetStoreTag": "menu buttons",
|
|
"defaultName": "Button",
|
|
"description": "Button with a label.",
|
|
"fullName": "Labeled button",
|
|
"helpPath": "",
|
|
"iconUrl": "",
|
|
"isInnerAreaFollowingParentSize": true,
|
|
"isUsingLegacyInstancesRenderer": false,
|
|
"name": "PanelSpriteButton",
|
|
"previewIconUrl": "",
|
|
"objects": [
|
|
{
|
|
"assetStoreId": "",
|
|
"bold": false,
|
|
"italic": false,
|
|
"name": "Label",
|
|
"smoothed": true,
|
|
"type": "TextObject::Text",
|
|
"underlined": false,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 4,
|
|
"topEdgeAnchor": 4,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "TextStyleState",
|
|
"type": "PanelSpriteButton::TextStyleState",
|
|
"ShouldEnableOutlineOnHover": false,
|
|
"HoverColor": "",
|
|
"ShouldEnableShadowOnHover": false,
|
|
"HoverFontSize": 0,
|
|
"IsHovered": false,
|
|
"IdleFontSize": 0,
|
|
"IdleColor": ""
|
|
}
|
|
],
|
|
"string": "Text",
|
|
"font": "",
|
|
"textAlignment": "center",
|
|
"characterSize": 20,
|
|
"color": {
|
|
"b": 0,
|
|
"g": 0,
|
|
"r": 0
|
|
},
|
|
"content": {
|
|
"bold": false,
|
|
"isOutlineEnabled": false,
|
|
"isShadowEnabled": false,
|
|
"italic": false,
|
|
"outlineColor": "255;255;255",
|
|
"outlineThickness": 2,
|
|
"shadowAngle": 90,
|
|
"shadowBlurRadius": 2,
|
|
"shadowColor": "0;0;0",
|
|
"shadowDistance": 4,
|
|
"shadowOpacity": 127,
|
|
"smoothed": true,
|
|
"underlined": false,
|
|
"text": "Text",
|
|
"font": "",
|
|
"textAlignment": "center",
|
|
"verticalTextAlignment": "center",
|
|
"characterSize": 20,
|
|
"lineHeight": 0,
|
|
"color": "0;0;0"
|
|
}
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 0,
|
|
"height": 32,
|
|
"leftMargin": 0,
|
|
"name": "Idle",
|
|
"rightMargin": 0,
|
|
"texture": "",
|
|
"tiled": false,
|
|
"topMargin": 0,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [
|
|
{
|
|
"folded": true,
|
|
"name": "State",
|
|
"type": "string",
|
|
"value": "Idle"
|
|
}
|
|
],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "ButtonFSM",
|
|
"type": "PanelSpriteButton::ButtonFSM",
|
|
"ShouldCheckHovering": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 0,
|
|
"height": 32,
|
|
"leftMargin": 0,
|
|
"name": "Hovered",
|
|
"rightMargin": 0,
|
|
"texture": "",
|
|
"tiled": false,
|
|
"topMargin": 0,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "Tween",
|
|
"type": "Tween::TweenBehavior"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 0,
|
|
"height": 32,
|
|
"leftMargin": 0,
|
|
"name": "Pressed",
|
|
"rightMargin": 0,
|
|
"texture": "",
|
|
"tiled": false,
|
|
"topMargin": 0,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"name": "BitmapLabel",
|
|
"type": "BitmapText::BitmapTextObject",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 4,
|
|
"topEdgeAnchor": 4,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "BitmapTextStyleState",
|
|
"type": "PanelSpriteButton::BitmapTextStyleState",
|
|
"HoverColor": "",
|
|
"HoverPrefix": "",
|
|
"HoverSuffix": "",
|
|
"IsHovered": false,
|
|
"IdleText": "",
|
|
"IdleColor": ""
|
|
}
|
|
],
|
|
"content": {
|
|
"text": "Text",
|
|
"opacity": 255,
|
|
"scale": 1,
|
|
"fontSize": 20,
|
|
"tint": "255;255;255",
|
|
"bitmapFontResourceName": "",
|
|
"textureAtlasResourceName": "",
|
|
"align": "center",
|
|
"verticalTextAlignment": "center"
|
|
}
|
|
}
|
|
],
|
|
"objectsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"objectName": "Label"
|
|
},
|
|
{
|
|
"objectName": "BitmapLabel"
|
|
},
|
|
{
|
|
"objectName": "Idle"
|
|
},
|
|
{
|
|
"objectName": "Hovered"
|
|
},
|
|
{
|
|
"objectName": "Pressed"
|
|
}
|
|
]
|
|
},
|
|
"objectsGroups": [
|
|
{
|
|
"name": "Background",
|
|
"objects": [
|
|
{
|
|
"name": "Idle"
|
|
},
|
|
{
|
|
"name": "Hovered"
|
|
},
|
|
{
|
|
"name": "Pressed"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Labels",
|
|
"objects": [
|
|
{
|
|
"name": "Label"
|
|
},
|
|
{
|
|
"name": "BitmapLabel"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"layers": [
|
|
{
|
|
"ambientLightColorB": 200,
|
|
"ambientLightColorG": 200,
|
|
"ambientLightColorR": 200,
|
|
"camera2DPlaneMaxDrawingDistance": 5000,
|
|
"camera3DFarPlaneDistance": 10000,
|
|
"camera3DFieldOfView": 45,
|
|
"camera3DNearPlaneDistance": 3,
|
|
"cameraType": "",
|
|
"followBaseLayerCamera": false,
|
|
"isLightingLayer": false,
|
|
"isLocked": false,
|
|
"name": "",
|
|
"renderingType": "",
|
|
"visibility": true,
|
|
"cameras": [
|
|
{
|
|
"defaultSize": true,
|
|
"defaultViewport": true,
|
|
"height": 0,
|
|
"viewportBottom": 1,
|
|
"viewportLeft": 0,
|
|
"viewportRight": 1,
|
|
"viewportTop": 0,
|
|
"width": 0
|
|
}
|
|
],
|
|
"effects": []
|
|
}
|
|
],
|
|
"instances": [
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 64,
|
|
"layer": "",
|
|
"name": "Idle",
|
|
"persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6",
|
|
"width": 256,
|
|
"x": 0,
|
|
"y": 0,
|
|
"zOrder": 1,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 64,
|
|
"layer": "",
|
|
"name": "Label",
|
|
"persistentUuid": "3b29c95c-5363-4e25-bf47-eecf13e8a226",
|
|
"width": 256,
|
|
"x": 0,
|
|
"y": 32,
|
|
"zOrder": 2,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
}
|
|
],
|
|
"editionSettings": {
|
|
"grid": false,
|
|
"gridType": "rectangular",
|
|
"gridWidth": 32,
|
|
"gridHeight": 32,
|
|
"gridDepth": 32,
|
|
"gridOffsetX": 0,
|
|
"gridOffsetY": 0,
|
|
"gridOffsetZ": 0,
|
|
"gridColor": 10401023,
|
|
"gridAlpha": 0.8,
|
|
"snap": false,
|
|
"zoomFactor": 2.734375,
|
|
"windowMask": false,
|
|
"selectedLayer": "",
|
|
"gameEditorMode": "instances-editor"
|
|
},
|
|
"eventsFunctions": [
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onCreated",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Create one background instance for of each state.\nOnly the instance for the current state is shown."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Create"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"Hovered",
|
|
"0",
|
|
"0",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Create"
|
|
},
|
|
"parameters": [
|
|
"",
|
|
"Pressed",
|
|
"0",
|
|
"0",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ResizableCapability::ResizableBehavior::SetSize"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"Resizable",
|
|
"Idle.Width()",
|
|
"Idle.Height()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "ResizableCapability::ResizableBehavior::SetSize"
|
|
},
|
|
"parameters": [
|
|
"Pressed",
|
|
"Resizable",
|
|
"Idle.Width()",
|
|
"Idle.Height()"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Hovered"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Pressed"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetZOrder"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"=",
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetZOrder"
|
|
},
|
|
"parameters": [
|
|
"Pressed",
|
|
"=",
|
|
"1"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Labels",
|
|
"Text",
|
|
"=",
|
|
"LabelText"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": [
|
|
{
|
|
"name": "Background",
|
|
"objects": [
|
|
{
|
|
"name": "Idle"
|
|
},
|
|
{
|
|
"name": "Hovered"
|
|
},
|
|
{
|
|
"name": "Pressed"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "onHotReloading",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::IsPressed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"PressedLabelOffsetY",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Labels",
|
|
"Text",
|
|
"=",
|
|
"LabelText"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "Action",
|
|
"name": "doStepPostEvents",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"colorB": 228,
|
|
"colorG": 176,
|
|
"colorR": 74,
|
|
"creationTime": 0,
|
|
"name": "Apply states",
|
|
"source": "",
|
|
"type": "BuiltinCommonInstructions::Group",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Comment",
|
|
"color": {
|
|
"b": 109,
|
|
"g": 230,
|
|
"r": 255,
|
|
"textB": 0,
|
|
"textG": 0,
|
|
"textR": 0
|
|
},
|
|
"comment": "Show the right background accordingly to the new state."
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::IsIdle"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"ButtonFSM"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::TextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"Label",
|
|
"TextStyleState",
|
|
"no",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"BitmapLabel",
|
|
"BitmapTextStyleState",
|
|
"no",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"0",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Show"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Pressed"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "Visible"
|
|
},
|
|
"parameters": [
|
|
"Hovered"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HoveredFadeOutDuration",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Tween::TweenBehavior::AddObjectOpacityTween2"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"Tween",
|
|
"\"Fadeout\"",
|
|
"0",
|
|
"\"linear\"",
|
|
"HoveredFadeOutDuration",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HoveredFadeOutDuration",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Hovered"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "OpacityCapability::OpacityBehavior::Value"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"Opacity",
|
|
"=",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Hovered"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "OpacityCapability::OpacityBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"Opacity",
|
|
"=",
|
|
"255"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::IsHovered"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"ButtonFSM"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::TextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"Label",
|
|
"TextStyleState",
|
|
"",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"BitmapLabel",
|
|
"BitmapTextStyleState",
|
|
"yes",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"0",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Idle"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Show"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Pressed"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "NumberVariable"
|
|
},
|
|
"parameters": [
|
|
"HoveredFadeOutDuration",
|
|
">",
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "Tween::RemoveTween"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"Tween",
|
|
"\"Fadeout\""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "OpacityCapability::OpacityBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
"Opacity",
|
|
"=",
|
|
"255"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::IsPressed"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"ButtonFSM"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::TextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"Label",
|
|
"TextStyleState",
|
|
"no",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"BitmapLabel",
|
|
"BitmapTextStyleState",
|
|
"no",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"PressedLabelOffsetY",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Idle"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Hovered"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Show"
|
|
},
|
|
"parameters": [
|
|
"Pressed",
|
|
""
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::IsFocused"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"ButtonFSM"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "BuiltinCommonInstructions::Once"
|
|
},
|
|
"parameters": []
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::TextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"Label",
|
|
"TextStyleState",
|
|
"yes",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::BitmapTextStyleState::SetIsHovered"
|
|
},
|
|
"parameters": [
|
|
"BitmapLabel",
|
|
"BitmapTextStyleState",
|
|
"yes",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::PanelSpriteButton::SetLabelOffset"
|
|
},
|
|
"parameters": [
|
|
"Object",
|
|
"=",
|
|
"0",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Idle"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Show"
|
|
},
|
|
"parameters": [
|
|
"Hovered",
|
|
""
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "Hide"
|
|
},
|
|
"parameters": [
|
|
"Pressed"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is not used.",
|
|
"fullName": "Is idle",
|
|
"functionType": "Condition",
|
|
"name": "IsIdle",
|
|
"sentence": "_PARAM0_ is idle",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::IsIdle"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button was just clicked.",
|
|
"fullName": "Is clicked",
|
|
"functionType": "Condition",
|
|
"name": "IsClicked",
|
|
"sentence": "_PARAM0_ is clicked",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::IsClicked"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the cursor is hovered over the button.",
|
|
"fullName": "Is hovered",
|
|
"functionType": "Condition",
|
|
"name": "IsHovered",
|
|
"sentence": "_PARAM0_ is hovered",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::IsHovered"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is either hovered or pressed but not hovered.",
|
|
"fullName": "Is focused",
|
|
"functionType": "Condition",
|
|
"name": "IsFocused",
|
|
"sentence": "_PARAM0_ is focused",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::IsFocused"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if the button is currently being pressed with mouse or touch.",
|
|
"fullName": "Is pressed",
|
|
"functionType": "Condition",
|
|
"name": "IsPressed",
|
|
"sentence": "_PARAM0_ is pressed",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "PanelSpriteButton::ButtonFSM::IsPressed"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Change the text of the button label.",
|
|
"fullName": "Label text",
|
|
"functionType": "Action",
|
|
"name": "SetLabelText",
|
|
"private": true,
|
|
"sentence": "Change the text of _PARAM0_ to _PARAM1_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Labels",
|
|
"Text",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Text",
|
|
"name": "Value",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "LabelText",
|
|
"name": "SetLabelTextOp",
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "TextContainerCapability::TextContainerBehavior::SetValue"
|
|
},
|
|
"parameters": [
|
|
"Labels",
|
|
"Text",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the label text.",
|
|
"fullName": "Label text",
|
|
"functionType": "ExpressionAndCondition",
|
|
"name": "LabelText",
|
|
"sentence": "the label text",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnString"
|
|
},
|
|
"parameters": [
|
|
"Labels.Text::Value()"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "string"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "De/activate interactions with the button.",
|
|
"fullName": "De/activate interactions",
|
|
"functionType": "Action",
|
|
"name": "Activate",
|
|
"sentence": "Activate interactions with _PARAM0_: _PARAM1_",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldActivate",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ActivateBehavior"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
"yes"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"inverted": true,
|
|
"value": "BooleanVariable"
|
|
},
|
|
"parameters": [
|
|
"ShouldActivate",
|
|
"True",
|
|
""
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "ActivateBehavior"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM",
|
|
"no"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
},
|
|
{
|
|
"description": "Activate",
|
|
"name": "ShouldActivate",
|
|
"type": "yesorno"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "Check if interactions are activated on the button.",
|
|
"fullName": "Interactions activated",
|
|
"functionType": "Condition",
|
|
"name": "IsActivated",
|
|
"sentence": "Interactions on _PARAM0_ are activated",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [
|
|
{
|
|
"type": {
|
|
"value": "BehaviorActivated"
|
|
},
|
|
"parameters": [
|
|
"Idle",
|
|
"ButtonFSM"
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnBoolean"
|
|
},
|
|
"parameters": [
|
|
"True"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"description": "the labelOffset of the object.",
|
|
"fullName": "LabelOffset",
|
|
"functionType": "ExpressionAndCondition",
|
|
"name": "LabelOffset",
|
|
"private": true,
|
|
"sentence": "the labelOffset",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetReturnNumber"
|
|
},
|
|
"parameters": [
|
|
"LabelOffset"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"expressionType": {
|
|
"type": "expression"
|
|
},
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
},
|
|
{
|
|
"fullName": "",
|
|
"functionType": "ActionWithOperator",
|
|
"getterName": "LabelOffset",
|
|
"name": "SetLabelOffset",
|
|
"private": true,
|
|
"sentence": "",
|
|
"events": [
|
|
{
|
|
"type": "BuiltinCommonInstructions::Standard",
|
|
"conditions": [],
|
|
"actions": [
|
|
{
|
|
"type": {
|
|
"value": "SetCenterY"
|
|
},
|
|
"parameters": [
|
|
"Labels",
|
|
"+",
|
|
"Value - LabelOffset"
|
|
]
|
|
},
|
|
{
|
|
"type": {
|
|
"value": "SetNumberVariable"
|
|
},
|
|
"parameters": [
|
|
"LabelOffset",
|
|
"=",
|
|
"Value"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Object",
|
|
"name": "Object",
|
|
"supplementaryInformation": "PanelSpriteButton::PanelSpriteButton",
|
|
"type": "object"
|
|
}
|
|
],
|
|
"objectGroups": []
|
|
}
|
|
],
|
|
"eventsFunctionsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"functionName": "onCreated"
|
|
},
|
|
{
|
|
"functionName": "onHotReloading"
|
|
},
|
|
{
|
|
"functionName": "doStepPostEvents"
|
|
},
|
|
{
|
|
"functionName": "IsIdle"
|
|
},
|
|
{
|
|
"functionName": "IsClicked"
|
|
},
|
|
{
|
|
"functionName": "IsHovered"
|
|
},
|
|
{
|
|
"functionName": "IsFocused"
|
|
},
|
|
{
|
|
"functionName": "IsPressed"
|
|
},
|
|
{
|
|
"functionName": "SetLabelText"
|
|
},
|
|
{
|
|
"functionName": "SetLabelTextOp"
|
|
},
|
|
{
|
|
"functionName": "LabelText"
|
|
},
|
|
{
|
|
"functionName": "Activate"
|
|
},
|
|
{
|
|
"functionName": "IsActivated"
|
|
},
|
|
{
|
|
"functionName": "LabelOffset"
|
|
},
|
|
{
|
|
"functionName": "SetLabelOffset"
|
|
}
|
|
]
|
|
},
|
|
"propertyDescriptors": [
|
|
{
|
|
"value": "",
|
|
"type": "MultilineString",
|
|
"label": "Label",
|
|
"name": "LabelText"
|
|
},
|
|
{
|
|
"value": "0.25",
|
|
"type": "Number",
|
|
"unit": "Second",
|
|
"label": "Hovered fade out duration",
|
|
"group": "States",
|
|
"name": "HoveredFadeOutDuration"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "Label offset on Y axis when pressed",
|
|
"group": "States",
|
|
"name": "PressedLabelOffsetY"
|
|
},
|
|
{
|
|
"value": "0",
|
|
"type": "Number",
|
|
"unit": "Pixel",
|
|
"label": "",
|
|
"group": "States",
|
|
"hidden": true,
|
|
"name": "LabelOffset"
|
|
},
|
|
{
|
|
"value": "",
|
|
"type": "Choice",
|
|
"label": "",
|
|
"choices": [
|
|
{
|
|
"label": "Label.Text=LabelText",
|
|
"value": "Label.Text=LabelText"
|
|
},
|
|
{
|
|
"label": "BitmapLabel.Text=LabelText",
|
|
"value": "BitmapLabel.Text=LabelText"
|
|
}
|
|
],
|
|
"hidden": true,
|
|
"name": "_PropertyMapping"
|
|
}
|
|
],
|
|
"propertiesFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"propertyName": "LabelText"
|
|
},
|
|
{
|
|
"propertyName": "_PropertyMapping"
|
|
},
|
|
{
|
|
"folderName": "States",
|
|
"children": [
|
|
{
|
|
"propertyName": "HoveredFadeOutDuration"
|
|
},
|
|
{
|
|
"propertyName": "PressedLabelOffsetY"
|
|
},
|
|
{
|
|
"propertyName": "LabelOffset"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"variants": [
|
|
{
|
|
"areaMaxX": 128,
|
|
"areaMaxY": 48,
|
|
"areaMaxZ": 64,
|
|
"areaMinX": 0,
|
|
"areaMinY": 0,
|
|
"areaMinZ": 0,
|
|
"assetStoreAssetId": "80b9ddd78c8727888bb53c7524f443682746667b1ba493c223114c04e7661bbf",
|
|
"assetStoreOriginalName": "Small Blue Button",
|
|
"name": "Small Blue Button",
|
|
"objects": [
|
|
{
|
|
"assetStoreId": "",
|
|
"bold": false,
|
|
"italic": false,
|
|
"name": "Label",
|
|
"smoothed": true,
|
|
"type": "TextObject::Text",
|
|
"underlined": false,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 4,
|
|
"topEdgeAnchor": 4,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "TextStyleState",
|
|
"type": "PanelSpriteButton::TextStyleState",
|
|
"ShouldEnableOutlineOnHover": false,
|
|
"HoverColor": "",
|
|
"ShouldEnableShadowOnHover": false,
|
|
"HoverFontSize": 0,
|
|
"IsHovered": false,
|
|
"IdleFontSize": 0,
|
|
"IdleColor": ""
|
|
}
|
|
],
|
|
"string": "Text",
|
|
"font": "",
|
|
"textAlignment": "center",
|
|
"characterSize": 20,
|
|
"color": {
|
|
"b": 0,
|
|
"g": 0,
|
|
"r": 0
|
|
},
|
|
"content": {
|
|
"bold": false,
|
|
"isOutlineEnabled": false,
|
|
"isShadowEnabled": false,
|
|
"italic": false,
|
|
"outlineColor": "255;255;255",
|
|
"outlineThickness": 2,
|
|
"shadowAngle": 90,
|
|
"shadowBlurRadius": 2,
|
|
"shadowColor": "0;0;0",
|
|
"shadowDistance": 4,
|
|
"shadowOpacity": 127,
|
|
"smoothed": true,
|
|
"underlined": false,
|
|
"text": "Text",
|
|
"font": "",
|
|
"textAlignment": "center",
|
|
"verticalTextAlignment": "center",
|
|
"characterSize": 20,
|
|
"lineHeight": 0,
|
|
"color": "0;0;0"
|
|
}
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 5,
|
|
"height": 32,
|
|
"leftMargin": 3,
|
|
"name": "Idle",
|
|
"rightMargin": 3,
|
|
"texture": "assets\\Small Blue Button_Idle.png",
|
|
"tiled": false,
|
|
"topMargin": 3,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [
|
|
{
|
|
"folded": true,
|
|
"name": "State",
|
|
"type": "string",
|
|
"value": "Idle"
|
|
}
|
|
],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "ButtonFSM",
|
|
"type": "PanelSpriteButton::ButtonFSM",
|
|
"ShouldCheckHovering": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 5,
|
|
"height": 32,
|
|
"leftMargin": 3,
|
|
"name": "Hovered",
|
|
"rightMargin": 3,
|
|
"texture": "assets\\Small Blue Button_Hovered.png",
|
|
"tiled": false,
|
|
"topMargin": 3,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "Tween",
|
|
"type": "Tween::TweenBehavior"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 3,
|
|
"height": 32,
|
|
"leftMargin": 3,
|
|
"name": "Pressed",
|
|
"rightMargin": 3,
|
|
"texture": "assets\\Small Blue Button_Pressed.png",
|
|
"tiled": false,
|
|
"topMargin": 3,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"name": "BitmapLabel",
|
|
"type": "BitmapText::BitmapTextObject",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 4,
|
|
"topEdgeAnchor": 4,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "BitmapTextStyleState",
|
|
"type": "PanelSpriteButton::BitmapTextStyleState",
|
|
"HoverColor": "",
|
|
"HoverPrefix": "",
|
|
"HoverSuffix": "",
|
|
"IsHovered": false,
|
|
"IdleText": "",
|
|
"IdleColor": ""
|
|
}
|
|
],
|
|
"content": {
|
|
"text": "Button",
|
|
"opacity": 255,
|
|
"scale": 1,
|
|
"fontSize": 20,
|
|
"tint": "255;255;255",
|
|
"bitmapFontResourceName": "assets\\8BitOperatorPlus8Regular_Edited.fnt",
|
|
"textureAtlasResourceName": "assets\\8BitOperatorPlus8Regular_Edited.png",
|
|
"align": "center",
|
|
"verticalTextAlignment": "center"
|
|
}
|
|
}
|
|
],
|
|
"objectsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"objectName": "Label"
|
|
},
|
|
{
|
|
"objectName": "BitmapLabel"
|
|
},
|
|
{
|
|
"objectName": "Idle"
|
|
},
|
|
{
|
|
"objectName": "Hovered"
|
|
},
|
|
{
|
|
"objectName": "Pressed"
|
|
}
|
|
]
|
|
},
|
|
"objectsGroups": [
|
|
{
|
|
"name": "Background",
|
|
"objects": [
|
|
{
|
|
"name": "Idle"
|
|
},
|
|
{
|
|
"name": "Hovered"
|
|
},
|
|
{
|
|
"name": "Pressed"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Labels",
|
|
"objects": [
|
|
{
|
|
"name": "Label"
|
|
},
|
|
{
|
|
"name": "BitmapLabel"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"layers": [
|
|
{
|
|
"ambientLightColorB": 200,
|
|
"ambientLightColorG": 200,
|
|
"ambientLightColorR": 200,
|
|
"camera2DPlaneMaxDrawingDistance": 5000,
|
|
"camera3DFarPlaneDistance": 10000,
|
|
"camera3DFieldOfView": 45,
|
|
"camera3DNearPlaneDistance": 3,
|
|
"cameraType": "",
|
|
"followBaseLayerCamera": false,
|
|
"isLightingLayer": false,
|
|
"isLocked": false,
|
|
"name": "",
|
|
"renderingType": "",
|
|
"visibility": true,
|
|
"cameras": [
|
|
{
|
|
"defaultSize": true,
|
|
"defaultViewport": true,
|
|
"height": 0,
|
|
"viewportBottom": 1,
|
|
"viewportLeft": 0,
|
|
"viewportRight": 1,
|
|
"viewportTop": 0,
|
|
"width": 0
|
|
}
|
|
],
|
|
"effects": []
|
|
}
|
|
],
|
|
"instances": [
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 48,
|
|
"layer": "",
|
|
"name": "Idle",
|
|
"persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6",
|
|
"width": 128,
|
|
"x": 0,
|
|
"y": 0,
|
|
"zOrder": 1,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 48,
|
|
"keepRatio": true,
|
|
"layer": "",
|
|
"name": "BitmapLabel",
|
|
"persistentUuid": "c3c3200d-dec4-4ac4-9dc5-4715d8989830",
|
|
"width": 128,
|
|
"x": 5,
|
|
"y": 26,
|
|
"zOrder": 2,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
}
|
|
],
|
|
"editionSettings": []
|
|
},
|
|
{
|
|
"areaMaxX": 68,
|
|
"areaMaxY": 28,
|
|
"areaMaxZ": 64,
|
|
"areaMinX": 0,
|
|
"areaMinY": 0,
|
|
"areaMinZ": 0,
|
|
"assetStoreAssetId": "90c9b872a1439405f56d1591e01d6b9fe5dadc4dc1c3afc0bdd98f763b340fa0",
|
|
"assetStoreOriginalName": "Tiny Blue Button",
|
|
"name": "Tiny Blue Button",
|
|
"objects": [
|
|
{
|
|
"assetStoreId": "",
|
|
"bold": false,
|
|
"italic": false,
|
|
"name": "Label",
|
|
"smoothed": true,
|
|
"type": "TextObject::Text",
|
|
"underlined": false,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 4,
|
|
"topEdgeAnchor": 4,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "TextStyleState",
|
|
"type": "PanelSpriteButton::TextStyleState",
|
|
"ShouldEnableOutlineOnHover": false,
|
|
"HoverColor": "",
|
|
"ShouldEnableShadowOnHover": false,
|
|
"HoverFontSize": 0,
|
|
"IsHovered": false,
|
|
"IdleFontSize": 0,
|
|
"IdleColor": ""
|
|
}
|
|
],
|
|
"string": "Text",
|
|
"font": "",
|
|
"textAlignment": "center",
|
|
"characterSize": 20,
|
|
"color": {
|
|
"b": 0,
|
|
"g": 0,
|
|
"r": 0
|
|
},
|
|
"content": {
|
|
"bold": false,
|
|
"isOutlineEnabled": false,
|
|
"isShadowEnabled": false,
|
|
"italic": false,
|
|
"outlineColor": "255;255;255",
|
|
"outlineThickness": 2,
|
|
"shadowAngle": 90,
|
|
"shadowBlurRadius": 2,
|
|
"shadowColor": "0;0;0",
|
|
"shadowDistance": 4,
|
|
"shadowOpacity": 127,
|
|
"smoothed": true,
|
|
"underlined": false,
|
|
"text": "Text",
|
|
"font": "",
|
|
"textAlignment": "center",
|
|
"verticalTextAlignment": "center",
|
|
"characterSize": 20,
|
|
"lineHeight": 0,
|
|
"color": "0;0;0"
|
|
}
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 5,
|
|
"height": 32,
|
|
"leftMargin": 3,
|
|
"name": "Idle",
|
|
"rightMargin": 3,
|
|
"texture": "assets\\Small Blue Button_Idle.png",
|
|
"tiled": false,
|
|
"topMargin": 3,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [
|
|
{
|
|
"folded": true,
|
|
"name": "State",
|
|
"type": "string",
|
|
"value": "Idle"
|
|
}
|
|
],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "ButtonFSM",
|
|
"type": "PanelSpriteButton::ButtonFSM",
|
|
"ShouldCheckHovering": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 5,
|
|
"height": 32,
|
|
"leftMargin": 3,
|
|
"name": "Hovered",
|
|
"rightMargin": 3,
|
|
"texture": "assets\\Small Blue Button_Hovered.png",
|
|
"tiled": false,
|
|
"topMargin": 3,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "Tween",
|
|
"type": "Tween::TweenBehavior"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"bottomMargin": 3,
|
|
"height": 32,
|
|
"leftMargin": 3,
|
|
"name": "Pressed",
|
|
"rightMargin": 3,
|
|
"texture": "assets\\Small Blue Button_Pressed.png",
|
|
"tiled": false,
|
|
"topMargin": 3,
|
|
"type": "PanelSpriteObject::PanelSprite",
|
|
"width": 32,
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 2,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"topEdgeAnchor": 1,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"assetStoreId": "",
|
|
"name": "BitmapLabel",
|
|
"type": "BitmapText::BitmapTextObject",
|
|
"variables": [],
|
|
"effects": [],
|
|
"behaviors": [
|
|
{
|
|
"name": "Anchor",
|
|
"type": "AnchorBehavior::AnchorBehavior",
|
|
"bottomEdgeAnchor": 4,
|
|
"topEdgeAnchor": 4,
|
|
"leftEdgeAnchor": 1,
|
|
"relativeToOriginalWindowSize": true,
|
|
"rightEdgeAnchor": 2,
|
|
"useLegacyBottomAndRightAnchors": false
|
|
},
|
|
{
|
|
"name": "BitmapTextStyleState",
|
|
"type": "PanelSpriteButton::BitmapTextStyleState",
|
|
"HoverColor": "",
|
|
"HoverPrefix": "",
|
|
"HoverSuffix": "",
|
|
"IsHovered": false,
|
|
"IdleText": "",
|
|
"IdleColor": ""
|
|
}
|
|
],
|
|
"content": {
|
|
"text": "Button",
|
|
"opacity": 255,
|
|
"scale": 0.5,
|
|
"fontSize": 20,
|
|
"tint": "255;255;255",
|
|
"bitmapFontResourceName": "assets\\8BitOperatorPlus8Regular_Edited.fnt",
|
|
"textureAtlasResourceName": "assets\\8BitOperatorPlus8Regular_Edited.png",
|
|
"align": "center",
|
|
"verticalTextAlignment": "center"
|
|
}
|
|
}
|
|
],
|
|
"objectsFolderStructure": {
|
|
"folderName": "__ROOT",
|
|
"children": [
|
|
{
|
|
"objectName": "Label"
|
|
},
|
|
{
|
|
"objectName": "BitmapLabel"
|
|
},
|
|
{
|
|
"objectName": "Idle"
|
|
},
|
|
{
|
|
"objectName": "Hovered"
|
|
},
|
|
{
|
|
"objectName": "Pressed"
|
|
}
|
|
]
|
|
},
|
|
"objectsGroups": [
|
|
{
|
|
"name": "Background",
|
|
"objects": [
|
|
{
|
|
"name": "Idle"
|
|
},
|
|
{
|
|
"name": "Hovered"
|
|
},
|
|
{
|
|
"name": "Pressed"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Labels",
|
|
"objects": [
|
|
{
|
|
"name": "Label"
|
|
},
|
|
{
|
|
"name": "BitmapLabel"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"layers": [
|
|
{
|
|
"ambientLightColorB": 200,
|
|
"ambientLightColorG": 200,
|
|
"ambientLightColorR": 200,
|
|
"camera2DPlaneMaxDrawingDistance": 5000,
|
|
"camera3DFarPlaneDistance": 10000,
|
|
"camera3DFieldOfView": 45,
|
|
"camera3DNearPlaneDistance": 3,
|
|
"cameraType": "",
|
|
"followBaseLayerCamera": false,
|
|
"isLightingLayer": false,
|
|
"isLocked": false,
|
|
"name": "",
|
|
"renderingType": "",
|
|
"visibility": true,
|
|
"cameras": [
|
|
{
|
|
"defaultSize": true,
|
|
"defaultViewport": true,
|
|
"height": 0,
|
|
"viewportBottom": 1,
|
|
"viewportLeft": 0,
|
|
"viewportRight": 1,
|
|
"viewportTop": 0,
|
|
"width": 0
|
|
}
|
|
],
|
|
"effects": []
|
|
}
|
|
],
|
|
"instances": [
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1,
|
|
"height": 28,
|
|
"layer": "",
|
|
"name": "Idle",
|
|
"persistentUuid": "24882334-eec8-403e-8bf1-70fc928a46e6",
|
|
"width": 68,
|
|
"x": 0,
|
|
"y": 0,
|
|
"zOrder": 1,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
},
|
|
{
|
|
"angle": 0,
|
|
"customSize": true,
|
|
"depth": 1.04,
|
|
"height": 28,
|
|
"layer": "",
|
|
"name": "BitmapLabel",
|
|
"persistentUuid": "c3c3200d-dec4-4ac4-9dc5-4715d8989830",
|
|
"width": 64,
|
|
"x": 5,
|
|
"y": 14,
|
|
"zOrder": 2,
|
|
"numberProperties": [],
|
|
"stringProperties": [],
|
|
"initialVariables": []
|
|
}
|
|
],
|
|
"editionSettings": []
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"externalLayouts": [
|
|
{
|
|
"associatedLayout": "",
|
|
"name": "functions",
|
|
"instances": [],
|
|
"editionSettings": {}
|
|
}
|
|
]
|
|
}
|