Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 176 additions & 14 deletions extensions/reviewed/TiledUnitsBar.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"author": "",
"category": "User interface",
"dimension": "2D",
"extensionNamespace": "",
"fullName": "Resource bar (separated units)",
"gdevelopVersion": ">=5.5.230",
Expand All @@ -9,8 +10,7 @@
"name": "TiledUnitsBar",
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/063e9152cf65bc0f3be2a828afd950c3ecf1b1fc72feefdc2467252fe987dc0f_dots-horizontal.svg",
"shortDescription": "A bar that represents a resource in the game (health, mana, ammo, etc).",
"dimension": "2D",
"version": "2.0.1",
"version": "2.0.2",
"description": [
"A bar that represents a resource in the game (health, mana, ammo, etc).",
"",
Expand Down Expand Up @@ -61,11 +61,15 @@
"}",
"const { anchors } = gdjs._TiledUnitsBarExtension;",
"",
"const object = objects[0];",
"/** @type {gdjs.AnchorRuntimeBehavior} */",
"const anchor = object.getBehavior(eventsFunctionContext.getBehaviorName(\"Anchor\"));",
"eventsFunctionContext.returnValue = anchors[anchor._leftEdgeAnchor] || \"None\";",
""
"if (objects.length === 0) {",
" eventsFunctionContext.returnValue = \"None\";",
"}",
"else {",
" const object = objects[0];",
" /** @type {gdjs.AnchorRuntimeBehavior} */",
" const anchor = object.getBehavior(eventsFunctionContext.getBehaviorName(\"Anchor\"));",
" eventsFunctionContext.returnValue = anchors[anchor._leftEdgeAnchor] || \"None\";",
"}"
],
"parameterObjects": "Object",
"useStrict": true,
Expand Down Expand Up @@ -107,11 +111,15 @@
"}",
"const { anchors } = gdjs._TiledUnitsBarExtension;",
"",
"const object = objects[0];",
"/** @type {gdjs.AnchorRuntimeBehavior} */",
"const anchor = object.getBehavior(eventsFunctionContext.getBehaviorName(\"Anchor\"));",
"eventsFunctionContext.returnValue = anchors[anchor._rightEdgeAnchor] || \"None\";",
""
"if (objects.length === 0) {",
" eventsFunctionContext.returnValue = \"None\";",
"}",
"else {",
" const object = objects[0];",
" /** @type {gdjs.AnchorRuntimeBehavior} */",
" const anchor = object.getBehavior(eventsFunctionContext.getBehaviorName(\"Anchor\"));",
" eventsFunctionContext.returnValue = anchors[anchor._rightEdgeAnchor] || \"None\";",
"}"
],
"parameterObjects": "Object",
"useStrict": true,
Expand All @@ -138,12 +146,26 @@
"objectGroups": []
}
],
"eventsFunctionsFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"functionName": "LeftEdgeAnchor"
},
{
"functionName": "RightEdgeAnchor"
}
]
},
"eventsBasedBehaviors": [
{
"description": "A bar that represents a resource in the game (health, mana, ammo, etc).",
"fullName": "Resource bar",
"helpPath": "",
"iconUrl": "",
"name": "ResourceBar",
"objectType": "",
"previewIconUrl": "",
"private": true,
"eventsFunctions": [
{
Expand Down Expand Up @@ -386,6 +408,7 @@
"fullName": "",
"functionType": "ActionWithOperator",
"getterName": "MaxValue",
"group": "Resource bar configuration",
"name": "SetMaxValue",
"sentence": "",
"events": [
Expand Down Expand Up @@ -641,6 +664,7 @@
"fullName": "",
"functionType": "ActionWithOperator",
"getterName": "PreviousHighValueDuration",
"group": "Resource bar configuration",
"name": "SetPreviousHighValueDuration",
"sentence": "",
"events": [
Expand Down Expand Up @@ -738,6 +762,52 @@
"objectGroups": []
}
],
"eventsFunctionsFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"functionName": "doStepPostEvents"
},
{
"functionName": "Value"
},
{
"functionName": "SetValue"
},
{
"folderName": "Resource bar configuration",
"children": [
{
"functionName": "MaxValue"
},
{
"functionName": "SetMaxValue"
},
{
"functionName": "PreviousHighValueDuration"
},
{
"functionName": "SetPreviousHighValueDuration"
}
]
},
{
"functionName": "IsEmpty"
},
{
"functionName": "IsFull"
},
{
"functionName": "PreviousHighValue"
},
{
"functionName": "UpdatePreviousHighValue"
},
{
"functionName": "IsChanging"
}
]
},
"propertyDescriptors": [
{
"value": "1",
Expand Down Expand Up @@ -765,7 +835,23 @@
"name": "PreviousHighValueDuration"
}
],
"sharedPropertyDescriptors": []
"propertiesFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"propertyName": "CurrentValue"
},
{
"propertyName": "MaxValue"
},
{
"propertyName": "PreviousHighValue"
},
{
"propertyName": "PreviousHighValueDuration"
}
]
}
}
],
"eventsBasedObjects": [
Expand All @@ -780,9 +866,12 @@
"defaultName": "ResourceBar",
"description": "A bar that represents a resource in the game (health, mana, ammo, etc).",
"fullName": "Resource bar (separated units)",
"helpPath": "",
"iconUrl": "",
"isInnerAreaFollowingParentSize": true,
"isUsingLegacyInstancesRenderer": false,
"name": "TiledUnitsBar",
"previewIconUrl": "",
"objects": [
{
"assetStoreId": "",
Expand Down Expand Up @@ -883,6 +972,7 @@
"ambientLightColorB": 200,
"ambientLightColorG": 200,
"ambientLightColorR": 200,
"camera2DPlaneMaxDrawingDistance": 5000,
"camera3DFarPlaneDistance": 10000,
"camera3DFieldOfView": 45,
"camera3DNearPlaneDistance": 3,
Expand Down Expand Up @@ -958,6 +1048,7 @@
"initialVariables": []
}
],
"editionSettings": {},
"eventsFunctions": [
{
"fullName": "",
Expand Down Expand Up @@ -1191,6 +1282,7 @@
"fullName": "",
"functionType": "ActionWithOperator",
"getterName": "Value",
"group": "Resource bar",
"name": "SetValue",
"sentence": "",
"events": [
Expand Down Expand Up @@ -1290,6 +1382,7 @@
"fullName": "",
"functionType": "ActionWithOperator",
"getterName": "MaxValue",
"group": "Resource bar configuration",
"name": "SetMaxValue",
"sentence": "",
"events": [
Expand Down Expand Up @@ -1468,6 +1561,7 @@
"fullName": "",
"functionType": "ActionWithOperator",
"getterName": "UnitWidth",
"group": "Resource bar configuration",
"name": "SetUnitWidth",
"private": true,
"sentence": "",
Expand Down Expand Up @@ -1720,6 +1814,57 @@
"objectGroups": []
}
],
"eventsFunctionsFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"functionName": "onCreated"
},
{
"functionName": "doStepPostEvents"
},
{
"functionName": "onHotReloading"
},
{
"folderName": "Resource bar",
"children": [
{
"functionName": "Value"
},
{
"functionName": "SetValue"
},
{
"functionName": "IsEmpty"
},
{
"functionName": "IsFull"
}
]
},
{
"folderName": "Resource bar configuration",
"children": [
{
"functionName": "MaxValue"
},
{
"functionName": "SetMaxValue"
},
{
"functionName": "UnitWidth"
},
{
"functionName": "SetUnitWidth"
}
]
},
{
"functionName": "UpdateBarWidth"
}
]
},
"propertyDescriptors": [
{
"value": "3",
Expand Down Expand Up @@ -1751,7 +1896,24 @@
"description": "How much pixels to show for a value of 1.",
"name": "UnitWidth"
}
]
],
"propertiesFolderStructure": {
"folderName": "__ROOT",
"children": [
{
"propertyName": "MaxValue"
},
{
"propertyName": "InitialValue"
},
{
"propertyName": "PreviousInitialValue"
},
{
"propertyName": "UnitWidth"
}
]
}
}
]
}
Loading
Loading