mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Add test game for audio being played then immediately checked if stopped
This commit is contained in:
BIN
GDJS/tests/games/audio-play-stop-condition/Explosion.ogg
Executable file
BIN
GDJS/tests/games/audio-play-stop-condition/Explosion.ogg
Executable file
Binary file not shown.
@@ -0,0 +1,541 @@
|
||||
{
|
||||
"firstLayout": "",
|
||||
"gdVersion": {
|
||||
"build": 98,
|
||||
"major": 4,
|
||||
"minor": 0,
|
||||
"revision": 0
|
||||
},
|
||||
"properties": {
|
||||
"adMobAppId": "",
|
||||
"folderProject": false,
|
||||
"linuxExecutableFilename": "",
|
||||
"macExecutableFilename": "",
|
||||
"orientation": "landscape",
|
||||
"packageName": "com.example.gamename",
|
||||
"projectFile": "/Users/florian/Downloads/sound-test/game.json",
|
||||
"scaleMode": "linear",
|
||||
"sizeOnStartupMode": "adaptWidth",
|
||||
"useExternalSourceFiles": false,
|
||||
"version": "1.0.0",
|
||||
"winExecutableFilename": "",
|
||||
"winExecutableIconFile": "",
|
||||
"name": "Project",
|
||||
"author": "",
|
||||
"windowWidth": 800,
|
||||
"windowHeight": 600,
|
||||
"latestCompilationDirectory": "",
|
||||
"maxFPS": 60,
|
||||
"minFPS": 20,
|
||||
"verticalSync": false,
|
||||
"platformSpecificAssets": {},
|
||||
"loadingScreen": {
|
||||
"showGDevelopSplash": true
|
||||
},
|
||||
"extensions": [
|
||||
{
|
||||
"name": "BuiltinObject"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinAudio"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinVariables"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinTime"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinMouse"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinKeyboard"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinJoystick"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinCamera"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinWindow"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinFile"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinNetwork"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinScene"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinAdvanced"
|
||||
},
|
||||
{
|
||||
"name": "Sprite"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinCommonInstructions"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinCommonConversions"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinStringInstructions"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinMathematicalTools"
|
||||
},
|
||||
{
|
||||
"name": "BuiltinExternalLayouts"
|
||||
}
|
||||
],
|
||||
"platforms": [
|
||||
{
|
||||
"name": "GDevelop JS platform"
|
||||
}
|
||||
],
|
||||
"currentPlatform": "GDevelop JS platform"
|
||||
},
|
||||
"resources": {
|
||||
"resources": [
|
||||
{
|
||||
"file": "Explosion.ogg",
|
||||
"kind": "audio",
|
||||
"metadata": "",
|
||||
"name": "Explosion.ogg",
|
||||
"userAdded": true
|
||||
}
|
||||
],
|
||||
"resourceFolders": []
|
||||
},
|
||||
"objects": [],
|
||||
"objectsGroups": [],
|
||||
"variables": [],
|
||||
"layouts": [
|
||||
{
|
||||
"b": 209,
|
||||
"disableInputWhenNotFocused": true,
|
||||
"mangledName": "Scene1",
|
||||
"name": "Scene1",
|
||||
"oglFOV": 90,
|
||||
"oglZFar": 500,
|
||||
"oglZNear": 1,
|
||||
"r": 209,
|
||||
"standardSortMethod": true,
|
||||
"stopSoundsOnStartup": true,
|
||||
"title": "",
|
||||
"v": 209,
|
||||
"uiSettings": {
|
||||
"grid": false,
|
||||
"gridB": 255,
|
||||
"gridG": 180,
|
||||
"gridHeight": 32,
|
||||
"gridOffsetX": 0,
|
||||
"gridOffsetY": 0,
|
||||
"gridR": 158,
|
||||
"gridWidth": 32,
|
||||
"snap": true,
|
||||
"windowMask": false,
|
||||
"zoomFactor": 1
|
||||
},
|
||||
"objectsGroups": [],
|
||||
"variables": [],
|
||||
"instances": [
|
||||
{
|
||||
"angle": 0,
|
||||
"customSize": false,
|
||||
"height": 0,
|
||||
"layer": "",
|
||||
"locked": false,
|
||||
"name": "AudioStatus",
|
||||
"width": 0,
|
||||
"x": 204,
|
||||
"y": 253,
|
||||
"zOrder": 1,
|
||||
"numberProperties": [],
|
||||
"stringProperties": [],
|
||||
"initialVariables": []
|
||||
}
|
||||
],
|
||||
"objects": [
|
||||
{
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"name": "AudioStatus",
|
||||
"smoothed": true,
|
||||
"tags": "",
|
||||
"type": "TextObject::Text",
|
||||
"underlined": false,
|
||||
"variables": [],
|
||||
"behaviors": [],
|
||||
"string": "Scene1 - Audio Status",
|
||||
"font": "",
|
||||
"characterSize": 40,
|
||||
"color": {
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Comment",
|
||||
"color": {
|
||||
"b": 109,
|
||||
"g": 230,
|
||||
"r": 255,
|
||||
"textB": 0,
|
||||
"textG": 0,
|
||||
"textR": 0
|
||||
},
|
||||
"comment": "Expected: Check that the scene is changed only when the sound has ended.\nPress p to pause the sound, r to resume the sound. ",
|
||||
"comment2": ""
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Standard",
|
||||
"conditions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "DepartScene"
|
||||
},
|
||||
"parameters": [
|
||||
""
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "PlaySoundCanal"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"Explosion.ogg",
|
||||
"1",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Comment",
|
||||
"color": {
|
||||
"b": 109,
|
||||
"g": 230,
|
||||
"r": 255,
|
||||
"textB": 0,
|
||||
"textG": 0,
|
||||
"textR": 0
|
||||
},
|
||||
"comment": "It should go to scene 2 only if the sound is stopped",
|
||||
"comment2": ""
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Standard",
|
||||
"conditions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "SoundStopped"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"1"
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "Scene"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"\"Scene2\"",
|
||||
""
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Standard",
|
||||
"conditions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "KeyPressed"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"p"
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "PauseSoundCanal"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"1"
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Standard",
|
||||
"conditions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "KeyPressed"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"r"
|
||||
],
|
||||
"subInstructions": []
|
||||
},
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "SoundPaused"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"1"
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "RePlaySoundCanal"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"1"
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"name": "",
|
||||
"visibility": true,
|
||||
"cameras": [
|
||||
{
|
||||
"defaultSize": true,
|
||||
"defaultViewport": true,
|
||||
"height": 0,
|
||||
"viewportBottom": 1,
|
||||
"viewportLeft": 0,
|
||||
"viewportRight": 1,
|
||||
"viewportTop": 0,
|
||||
"width": 0
|
||||
}
|
||||
],
|
||||
"effects": []
|
||||
}
|
||||
],
|
||||
"behaviorsSharedData": []
|
||||
},
|
||||
{
|
||||
"b": 209,
|
||||
"disableInputWhenNotFocused": true,
|
||||
"mangledName": "Scene2",
|
||||
"name": "Scene2",
|
||||
"oglFOV": 90,
|
||||
"oglZFar": 500,
|
||||
"oglZNear": 1,
|
||||
"r": 209,
|
||||
"standardSortMethod": true,
|
||||
"stopSoundsOnStartup": true,
|
||||
"title": "",
|
||||
"v": 209,
|
||||
"uiSettings": {
|
||||
"grid": false,
|
||||
"gridB": 255,
|
||||
"gridG": 180,
|
||||
"gridHeight": 32,
|
||||
"gridOffsetX": 0,
|
||||
"gridOffsetY": 0,
|
||||
"gridR": 158,
|
||||
"gridWidth": 32,
|
||||
"snap": true,
|
||||
"windowMask": false,
|
||||
"zoomFactor": 1
|
||||
},
|
||||
"objectsGroups": [],
|
||||
"variables": [],
|
||||
"instances": [
|
||||
{
|
||||
"angle": 0,
|
||||
"customSize": false,
|
||||
"height": 0,
|
||||
"layer": "",
|
||||
"locked": false,
|
||||
"name": "AudioStatus",
|
||||
"width": 0,
|
||||
"x": 250,
|
||||
"y": 262,
|
||||
"zOrder": 1,
|
||||
"numberProperties": [],
|
||||
"stringProperties": [],
|
||||
"initialVariables": []
|
||||
}
|
||||
],
|
||||
"objects": [
|
||||
{
|
||||
"bold": false,
|
||||
"italic": false,
|
||||
"name": "AudioStatus",
|
||||
"smoothed": true,
|
||||
"tags": "",
|
||||
"type": "TextObject::Text",
|
||||
"underlined": false,
|
||||
"variables": [],
|
||||
"behaviors": [],
|
||||
"string": "Scene2 - Audio status...",
|
||||
"font": "",
|
||||
"characterSize": 40,
|
||||
"color": {
|
||||
"b": 0,
|
||||
"g": 0,
|
||||
"r": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Standard",
|
||||
"conditions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "DepartScene"
|
||||
},
|
||||
"parameters": [
|
||||
""
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "PlaySoundCanal"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"Explosion.ogg",
|
||||
"1",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
},
|
||||
{
|
||||
"disabled": false,
|
||||
"folded": false,
|
||||
"type": "BuiltinCommonInstructions::Standard",
|
||||
"conditions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "SoundStopped"
|
||||
},
|
||||
"parameters": [
|
||||
"",
|
||||
"1"
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"type": {
|
||||
"inverted": false,
|
||||
"value": "TextObject::String"
|
||||
},
|
||||
"parameters": [
|
||||
"AudioStatus",
|
||||
"=",
|
||||
"\"Scene2 - Sound is stopped\""
|
||||
],
|
||||
"subInstructions": []
|
||||
}
|
||||
],
|
||||
"events": []
|
||||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"name": "",
|
||||
"visibility": true,
|
||||
"cameras": [
|
||||
{
|
||||
"defaultSize": true,
|
||||
"defaultViewport": true,
|
||||
"height": 0,
|
||||
"viewportBottom": 1,
|
||||
"viewportLeft": 0,
|
||||
"viewportRight": 1,
|
||||
"viewportTop": 0,
|
||||
"width": 0
|
||||
}
|
||||
],
|
||||
"effects": []
|
||||
}
|
||||
],
|
||||
"behaviorsSharedData": []
|
||||
}
|
||||
],
|
||||
"externalEvents": [],
|
||||
"eventsFunctionsExtensions": [],
|
||||
"externalLayouts": [],
|
||||
"externalSourceFiles": []
|
||||
}
|
Reference in New Issue
Block a user