Added object pool, event system collision system

This commit is contained in:
Martin
2022-11-08 11:42:14 +01:00
parent f250c24f90
commit 5b098af31d
21 changed files with 757 additions and 243 deletions

View File

@@ -20,10 +20,12 @@
],
"_active": true,
"_components": [],
"_prefab": null,
"_prefab": {
"__id__": 44
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 39
"__id__": 45
},
"_id": "cffa5b19-2043-4cef-8221-1a10ab7a2c1f"
},
@@ -42,25 +44,28 @@
"__id__": 5
},
{
"__id__": 9
"__id__": 13
},
{
"__id__": 22
},
{
"__id__": 27
}
],
"_active": true,
"_components": [
{
"__id__": 35
"__id__": 40
},
{
"__id__": 36
"__id__": 41
},
{
"__id__": 37
"__id__": 42
},
{
"__id__": 38
"__id__": 43
}
],
"_prefab": null,
@@ -180,159 +185,126 @@
},
{
"__type__": "cc.Node",
"_name": "Enemy",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
},
{
"__id__": 7
},
"_prefab": {
"__id__": 6
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 5
},
"asset": {
"__uuid__": "fc9a455d-1b5f-460e-96eb-7c0ebf07d3d0",
"__expectedType__": "cc.Prefab"
},
"fileId": "b3GFrfkl5AR4Q9jndybzln",
"instance": {
"__id__": 7
}
},
{
"__type__": "cc.PrefabInstance",
"fileId": "6eLx/bqYlD4q9xuucUXxZQ",
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 8
},
{
"__id__": 10
},
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_lpos": {
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"propertyPath": [
"_name"
],
"value": "Enemy"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"b3GFrfkl5AR4Q9jndybzln"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"_lrot": {
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 9
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "b3GFrfkl5AR4Q9jndybzln"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "a1j/F0wxNK1auaa7mfDSMc"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "833OTmgwBFcZXshtGw0Nj0"
},
{
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"__prefab": null,
"tag": 0,
"_group": 1,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_id": "81JtKAqqlEkYmvk8K2eLPy"
}
},
{
"__type__": "cc.Node",
"_name": "Player",
"_name": "Weapon",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 10
"__id__": 14
}
],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 20
},
{
"__id__": 21
}
@@ -364,24 +336,27 @@
"y": 0,
"z": 0
},
"_id": "fbcM/H31RNxK0HvQrwpElL"
"_id": "36M1oczB9EsY/fO80ilIoc"
},
{
"__type__": "cc.Node",
"_name": "Weapon",
"_name": "AnimatedWeapon",
"_objFlags": 0,
"_parent": {
"__id__": 9
"__id__": 13
},
"_children": [
{
"__id__": 11
"__id__": 15
}
],
"_active": true,
"_components": [
{
"__id__": 18
"__id__": 19
},
{
"__id__": 20
}
],
"_prefab": null,
@@ -411,20 +386,16 @@
"y": 0,
"z": 0
},
"_id": "36M1oczB9EsY/fO80ilIoc"
"_id": "9dFcDHQYpKPLaHRfcVfzbw"
},
{
"__type__": "cc.Node",
"_name": "AnimatedWeapon",
"_name": "WeaponCollider",
"_objFlags": 0,
"_parent": {
"__id__": 10
"__id__": 14
},
"_children": [
{
"__id__": 12
}
],
"_children": [],
"_active": true,
"_components": [
{
@@ -432,55 +403,9 @@
},
{
"__id__": 17
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "9dFcDHQYpKPLaHRfcVfzbw"
},
{
"__type__": "cc.Node",
"_name": "Sprite",
"_objFlags": 0,
"_parent": {
"__id__": 11
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
},
{
"__id__": 15
"__id__": 18
}
],
"_prefab": null,
@@ -517,7 +442,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
"__id__": 15
},
"_enabled": true,
"__prefab": null,
@@ -538,7 +463,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
"__id__": 15
},
"_enabled": true,
"__prefab": null,
@@ -576,7 +501,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
"__id__": 15
},
"_enabled": true,
"__prefab": null,
@@ -603,7 +528,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 14
},
"_enabled": true,
"__prefab": null,
@@ -624,7 +549,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
"__id__": 14
},
"_enabled": true,
"__prefab": null,
@@ -646,24 +571,76 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
"__id__": 13
},
"_enabled": true,
"__prefab": null,
"weaponAnimation": {
"__id__": 17
"__id__": 20
},
"weaponCollider": {
"__id__": 15
"collider": {
"__id__": 18
},
"_id": "femtdMmA5Ax5K78hjELCcD"
},
{
"__type__": "cc.Node",
"_name": "Player",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 24
},
{
"__id__": 25
},
{
"__id__": 26
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": -78,
"y": -42,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": "fbcM/H31RNxK0HvQrwpElL"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
"__id__": 22
},
"_enabled": true,
"__prefab": null,
@@ -684,7 +661,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
"__id__": 22
},
"_enabled": true,
"__prefab": null,
@@ -722,16 +699,43 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
"__id__": 22
},
"_enabled": true,
"__prefab": null,
"speed": 100,
"weapon": {
"__id__": 18
"collider": {
"__id__": 26
},
"_id": "5aDEGDNWpIaL+U2iIxK4vA"
},
{
"__type__": "cc.BoxCollider2D",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
},
"_enabled": true,
"__prefab": null,
"tag": 0,
"_group": 1,
"_density": 1,
"_sensor": false,
"_friction": 0.2,
"_restitution": 0,
"_offset": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_size": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_id": "15Y+yVn0FL9ahaUAsSVwM8"
},
{
"__type__": "cc.Node",
"_name": "UI",
@@ -741,19 +745,19 @@
},
"_children": [
{
"__id__": 23
"__id__": 28
},
{
"__id__": 30
"__id__": 35
}
],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 38
},
{
"__id__": 34
"__id__": 39
}
],
"_prefab": null,
@@ -790,23 +794,23 @@
"_name": "VirtualJoystic",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 27
},
"_children": [
{
"__id__": 24
"__id__": 29
}
],
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 32
},
{
"__id__": 28
"__id__": 33
},
{
"__id__": 29
"__id__": 34
}
],
"_prefab": null,
@@ -843,16 +847,16 @@
"_name": "Knob",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 30
},
{
"__id__": 26
"__id__": 31
}
],
"_prefab": null,
@@ -889,7 +893,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 29
},
"_enabled": true,
"__prefab": null,
@@ -910,7 +914,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 29
},
"_enabled": true,
"__prefab": null,
@@ -948,7 +952,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 28
},
"_enabled": true,
"__prefab": null,
@@ -969,7 +973,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 28
},
"_enabled": true,
"__prefab": null,
@@ -1007,13 +1011,13 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 28
},
"_enabled": true,
"__prefab": null,
"maxDistance": 50,
"knob": {
"__id__": 24
"__id__": 29
},
"_id": "50ceZG62tGlYXvZWEvSDKl"
},
@@ -1022,16 +1026,16 @@
"_name": "BottomRight",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 27
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 36
},
{
"__id__": 32
"__id__": 37
}
],
"_prefab": null,
@@ -1068,7 +1072,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 35
},
"_enabled": true,
"__prefab": null,
@@ -1089,7 +1093,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 35
},
"_enabled": true,
"__prefab": null,
@@ -1118,7 +1122,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 27
},
"_enabled": true,
"__prefab": null,
@@ -1139,7 +1143,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 27
},
"_enabled": true,
"__prefab": null,
@@ -1238,30 +1242,46 @@
"_enabled": true,
"__prefab": null,
"virtualJoystic": {
"__id__": 29
"__id__": 34
},
"player": {
"__id__": 25
},
"weapon": {
"__id__": 21
},
"enemy": {
"__uuid__": "fc9a455d-1b5f-460e-96eb-7c0ebf07d3d0",
"__expectedType__": "cc.Prefab"
},
"strikeDelay": 2,
"_id": "81HHJkTWZDO60EyXTSS38c"
},
{
"__type__": "cc.PrefabInfo",
"fileId": "cffa5b19-2043-4cef-8221-1a10ab7a2c1f",
"nestedPrefabInstanceRoots": [
{
"__id__": 5
}
]
},
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 40
"__id__": 46
},
"shadows": {
"__id__": 41
"__id__": 47
},
"_skybox": {
"__id__": 42
"__id__": 48
},
"fog": {
"__id__": 43
"__id__": 49
},
"octree": {
"__id__": 44
"__id__": 50
}
},
{