Skip to content

Commit

Permalink
Added a a gun select system (#214)
Browse files Browse the repository at this point in the history
* add intro transition

* added new phone removed old phone assets

* add controller support

* added weapon wheel
  • Loading branch information
TheGemDev authored Apr 22, 2024
1 parent 9368b7d commit 33a2a73
Show file tree
Hide file tree
Showing 43 changed files with 7,894 additions and 342 deletions.
Binary file added src/assets/weapons/icons/ammo_machinegun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/ammo_pistol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/ammo_rocket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/ammo_rocketModern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/ammo_shotgun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/ammo_sniper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/ammo_uzi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/flamethrower_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/flamethrower_short.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/grenade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/grenadeFlash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/grenadeSmoke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/grenadeVintage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/knifeRound_sharp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/knifeRound_smooth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/knife_sharp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/knife_smooth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/machinegun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/machinegunLauncher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/pistol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/pistolSilencer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/rocketlauncher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/weapons/icons/shotgun.png
Binary file added src/assets/weapons/icons/shotgunShort.png
Binary file added src/assets/weapons/icons/sniper.png
Binary file added src/assets/weapons/icons/uzi.png
Binary file added src/assets/weapons/icons/uziLong.png
Binary file added src/assets/weapons/icons/uziLongSilencer.png
Binary file added src/assets/weapons/icons/uziSilencer.png
1,225 changes: 1,225 additions & 0 deletions src/eventsFunctionsExtensions/extendedvariables.json

Large diffs are not rendered by default.

3,551 changes: 3,551 additions & 0 deletions src/eventsFunctionsExtensions/gamepads.json

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions src/eventsFunctionsExtensions/references.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"author": "Arthur Pacaud (arthuro555)",
"category": "",
"extensionNamespace": "",
"fullName": "Variables/References",
"helpPath": "",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXZhcmlhYmxlLWJveCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOSAzSDVDMy45IDMgMyAzLjkgMyA1VjE5QzMgMjAuMSAzLjkgMjEgNSAyMUgxOUMyMC4xIDIxIDIxIDIwLjEgMjEgMTlWNUMyMSAzLjkgMjAuMSAzIDE5IDNNNy40IDE4QzUuOSAxNi41IDUgMTQuMyA1IDEyUzUuOSA3LjUgNy40IDZMOSA2LjdDNy43IDcuOSA3IDkuOSA3IDEyUzcuNyAxNi4xIDkgMTcuM0w3LjQgMThNMTIuNyAxNUwxMS45IDEzTDEwLjUgMTVIOUwxMS4zIDExLjlMMTAgOUgxMS4zTDEyLjEgMTFMMTMuNSA5SDE1TDEyLjggMTJMMTQuMSAxNUgxMi43TTE2LjYgMThMMTUgMTcuM0MxNi4zIDE2IDE3IDE0LjEgMTcgMTJTMTYuMyA3LjkgMTUgNi43TDE2LjYgNkMxOC4xIDcuNSAxOSA5LjcgMTkgMTJTMTguMSAxNi41IDE2LjYgMThaIiAvPjwvc3ZnPg==",
"name": "References",
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/variable-box.svg",
"shortDescription": "Adds references and pointers for variables.",
"version": "1.0.0",
"description": "Adds actions to use references (variable that redirect any read/write to another variable) and pointers (unique numbers identifying a variable that can be resolved to a reference). Some usages are for callback variables in events based functions (getting a variable with a fixed name referring to a variable with a name passed as parameter), pointers to make advanced data structures like linked lists, and getting a top level variable dynamically.",
"origin": {
"identifier": "References",
"name": "gdevelop-extension-store"
},
"tags": [
"advanced",
"variables",
"reference",
"pointer",
"ref",
"memory",
"callback"
],
"authorIds": [
"ZgrsWuRTAkXgeuPV9bo0zuEcA2w1"
],
"dependencies": [],
"eventsFunctions": [
{
"description": "Transforms a scene variable into a reference to another scene variable.",
"fullName": "Create reference to scene variable",
"functionType": "Action",
"name": "CreateReference",
"sentence": "Make variable _PARAM1_ a reference to _PARAM2_",
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": [
"const reference = eventsFunctionContext.getArgument(\"reference\");",
"const source = eventsFunctionContext.getArgument(\"source\");",
"",
"// Override each method ",
"for (let func of Object.getOwnPropertyNames(gdjs.Variable.prototype))",
" reference[func] = gdjs.Variable.prototype[func].bind(source);",
""
],
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": false
}
],
"parameters": [
{
"description": "The scene variable to turn into a reference",
"name": "reference",
"type": "scenevar"
},
{
"description": "The scene variable the reference will refer to",
"name": "source",
"type": "scenevar"
}
],
"objectGroups": []
},
{
"description": "Transforms a scene variable into a reference to a global variable.",
"fullName": "Create reference to global variable",
"functionType": "Action",
"name": "CreateGlobalReference",
"sentence": "Make variable _PARAM1_ a reference to _PARAM2_",
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": [
"const reference = eventsFunctionContext.getArgument(\"reference\");",
"const source = eventsFunctionContext.getArgument(\"source\");",
"",
"// Override each method ",
"for (let func of Object.getOwnPropertyNames(gdjs.Variable.prototype))",
" reference[func] = gdjs.Variable.prototype[func].bind(source);",
""
],
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": false
}
],
"parameters": [
{
"description": "The scene variable to turn into a reference",
"name": "reference",
"type": "scenevar"
},
{
"description": "The global variable the reference will refer to",
"name": "source",
"type": "globalvar"
}
],
"objectGroups": []
},
{
"description": "Transforms a scene variable into a reference to an object's variable.",
"fullName": "Create reference to object variable",
"functionType": "Action",
"name": "CreateObjectReference",
"sentence": "Make variable _PARAM2_ a reference to variable _PARAM3_ of _PARAM1_",
"events": [
{
"type": "BuiltinCommonInstructions::JsCode",
"inlineCode": [
"const reference = eventsFunctionContext.getArgument(\"reference\");",
"const source = eventsFunctionContext.getArgument(\"source\");",
"",
"console.log(reference, source)",
"",
"// Override each method ",
"for (let func of Object.getOwnPropertyNames(gdjs.Variable.prototype))",
" reference[func] = gdjs.Variable.prototype[func].bind(source);",
""
],
"parameterObjects": "",
"useStrict": true,
"eventsSheetExpanded": false
}
],
"parameters": [
{
"description": "The object that possesses the variable to refer to",
"name": "Object",
"type": "objectList"
},
{
"description": "The scene variable to turn into a reference",
"name": "reference",
"type": "scenevar"
},
{
"description": "The object variable the reference will refer to",
"name": "source",
"type": "objectvar"
}
],
"objectGroups": []
}
],
"eventsBasedBehaviors": [],
"eventsBasedObjects": []
}
7 changes: 7 additions & 0 deletions src/externalEvents/game.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
"source": "",
"type": "BuiltinCommonInstructions::Group",
"events": [
{
"type": "BuiltinCommonInstructions::Link",
"include": {
"includeConfig": 0
},
"target": "WeaponWheel"
},
{
"type": "BuiltinCommonInstructions::Link",
"include": {
Expand Down
112 changes: 96 additions & 16 deletions src/externalEvents/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -1719,11 +1719,31 @@
"conditions": [
{
"type": {
"value": "KeyPressed"
"value": "BuiltinCommonInstructions::Or"
},
"parameters": [
"",
"a"
"parameters": [],
"subInstructions": [
{
"type": {
"value": "KeyPressed"
},
"parameters": [
"",
"a"
]
},
{
"type": {
"value": "Gamepads::C_Axis_pushed"
},
"parameters": [
"",
"1",
"\"Left\"",
"\"Left\"",
""
]
}
]
}
],
Expand All @@ -1747,11 +1767,31 @@
"conditions": [
{
"type": {
"value": "KeyPressed"
"value": "BuiltinCommonInstructions::Or"
},
"parameters": [
"",
"d"
"parameters": [],
"subInstructions": [
{
"type": {
"value": "KeyPressed"
},
"parameters": [
"",
"d"
]
},
{
"type": {
"value": "Gamepads::C_Axis_pushed"
},
"parameters": [
"",
"1",
"\"Left\"",
"\"Right\"",
""
]
}
]
}
],
Expand All @@ -1775,11 +1815,31 @@
"conditions": [
{
"type": {
"value": "KeyPressed"
"value": "BuiltinCommonInstructions::Or"
},
"parameters": [
"",
"w"
"parameters": [],
"subInstructions": [
{
"type": {
"value": "KeyPressed"
},
"parameters": [
"",
"w"
]
},
{
"type": {
"value": "Gamepads::C_Axis_pushed"
},
"parameters": [
"",
"1",
"\"Left\"",
"\"Up\"",
""
]
}
]
}
],
Expand All @@ -1803,11 +1863,31 @@
"conditions": [
{
"type": {
"value": "KeyPressed"
"value": "BuiltinCommonInstructions::Or"
},
"parameters": [
"",
"s"
"parameters": [],
"subInstructions": [
{
"type": {
"value": "KeyPressed"
},
"parameters": [
"",
"s"
]
},
{
"type": {
"value": "Gamepads::C_Axis_pushed"
},
"parameters": [
"",
"1",
"\"Left\"",
"\"Down\"",
""
]
}
]
}
],
Expand Down
Loading

0 comments on commit 33a2a73

Please sign in to comment.