feat: final bits
This commit is contained in:
parent
d64c8d2b61
commit
cebae80b5c
678
materials/wall_cracked.ptex
Normal file
678
materials/wall_cracked.ptex
Normal file
|
@ -0,0 +1,678 @@
|
||||||
|
{
|
||||||
|
"connections": [
|
||||||
|
{
|
||||||
|
"from": "skewed_bricks",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "perlin",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_2",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "normal_map2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "Material",
|
||||||
|
"to_port": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "invert",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_3",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_3",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "Material",
|
||||||
|
"to_port": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "fbm2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_4",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_4",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_5",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "tones_map",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_5",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "tones_map",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "colorize_2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "polycurve",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "colorize_2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "polycurve_2",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "polycurve",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_6",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "polycurve_2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_6",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_5",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "colorize",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "blend2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "Material",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "colorize",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "blend2",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "colorize_3",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "blend2",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_7",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "normal_map2",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_7",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "invert",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "gradient",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "polycurve",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "gradient",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "polycurve_2",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_5",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_7",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "buffer_2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "colorize_3",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "buffer_2",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "math_7",
|
||||||
|
"to_port": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "math_6",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "scale",
|
||||||
|
"to_port": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "scale",
|
||||||
|
"from_port": 0,
|
||||||
|
"to": "buffer_2",
|
||||||
|
"to_port": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"label": "Graph",
|
||||||
|
"longdesc": "",
|
||||||
|
"name": "369",
|
||||||
|
"node_position": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"export_last_target": "Blender",
|
||||||
|
"export_paths": {
|
||||||
|
"Blender": "/home/sara/Documents/gd-projects/going/project/materials/cracked_wall"
|
||||||
|
},
|
||||||
|
"name": "Material",
|
||||||
|
"node_position": {
|
||||||
|
"x": -146.102829,
|
||||||
|
"y": 42.309204
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"albedo_color": {
|
||||||
|
"a": 1,
|
||||||
|
"b": 1,
|
||||||
|
"g": 1,
|
||||||
|
"r": 1,
|
||||||
|
"type": "Color"
|
||||||
|
},
|
||||||
|
"ao": 1,
|
||||||
|
"depth_scale": 0.5,
|
||||||
|
"emission_energy": 1,
|
||||||
|
"flags_transparent": true,
|
||||||
|
"metallic": 0,
|
||||||
|
"normal": 1,
|
||||||
|
"roughness": 1,
|
||||||
|
"size": 11,
|
||||||
|
"sss": 1
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "material"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "skewed_bricks",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1759.029297,
|
||||||
|
"y": 50.21196
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"bevel": 0.34,
|
||||||
|
"columns": 4,
|
||||||
|
"corner": 0.3,
|
||||||
|
"mortar": -0.14,
|
||||||
|
"offset": 0.27,
|
||||||
|
"randomness": 0.55,
|
||||||
|
"round": 0.22,
|
||||||
|
"rows": 7
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "skewed_bricks"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "perlin",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1979.029297,
|
||||||
|
"y": 310.212006
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"iterations": 3,
|
||||||
|
"persistence": 0.5,
|
||||||
|
"scale_x": 18,
|
||||||
|
"scale_y": 19
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "perlin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1445.029419,
|
||||||
|
"y": 50.771965
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": true,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0,
|
||||||
|
"op": 0
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math_2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1719.029297,
|
||||||
|
"y": 310.212006
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": true,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0.46,
|
||||||
|
"op": 2
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "colorize",
|
||||||
|
"node_position": {
|
||||||
|
"x": -661.391602,
|
||||||
|
"y": 42.80661
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"gradient": {
|
||||||
|
"interpolation": 1,
|
||||||
|
"points": [
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0.394531,
|
||||||
|
"g": 0.379794,
|
||||||
|
"pos": 0.131665,
|
||||||
|
"r": 0.342133
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0.324219,
|
||||||
|
"g": 0.284859,
|
||||||
|
"pos": 0.267572,
|
||||||
|
"r": 0.281158
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0.160156,
|
||||||
|
"g": 0.143265,
|
||||||
|
"pos": 1,
|
||||||
|
"r": 0.140137
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Gradient"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "colorize"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "invert",
|
||||||
|
"node_position": {
|
||||||
|
"x": -581.97876,
|
||||||
|
"y": 313.998749
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "invert"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "normal_map2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -365.424042,
|
||||||
|
"y": 164.531174
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"buffer": 1,
|
||||||
|
"param2": 0,
|
||||||
|
"size": 10,
|
||||||
|
"strength": 1
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "normal_map2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math_3",
|
||||||
|
"node_position": {
|
||||||
|
"x": -404.945587,
|
||||||
|
"y": 306.498688
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": false,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0.14,
|
||||||
|
"op": 2
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math_5",
|
||||||
|
"node_position": {
|
||||||
|
"x": -932.800049,
|
||||||
|
"y": 46.600006
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": true,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0,
|
||||||
|
"op": 1
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fbm2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1460.920044,
|
||||||
|
"y": 204.559998
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"folds": 0,
|
||||||
|
"iterations": 5,
|
||||||
|
"noise": 0,
|
||||||
|
"offset": 0,
|
||||||
|
"persistence": 0.5,
|
||||||
|
"scale_x": 12,
|
||||||
|
"scale_y": 12
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "fbm2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math_4",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1179.920166,
|
||||||
|
"y": 202.559998
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": false,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0.5,
|
||||||
|
"op": 2
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tones_map",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1211.549927,
|
||||||
|
"y": 49.410656
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"in_max": 1,
|
||||||
|
"in_min": 0.49,
|
||||||
|
"out_max": 1,
|
||||||
|
"out_min": 0
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "tones_map"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "polycurve",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1712.229248,
|
||||||
|
"y": 465.021027
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"curve": {
|
||||||
|
"points": [
|
||||||
|
{
|
||||||
|
"x": 0.455725,
|
||||||
|
"y": 0.754025
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0.449463,
|
||||||
|
"y": 0.619857
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0.5077,
|
||||||
|
"y": 0.411285
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0.449544,
|
||||||
|
"y": 0.23048
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Polygon"
|
||||||
|
},
|
||||||
|
"ends": true,
|
||||||
|
"repeat": 1,
|
||||||
|
"width": 0.04
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "polycurve"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "colorize_2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1954.787964,
|
||||||
|
"y": 594.426819
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"gradient": {
|
||||||
|
"interpolation": 1,
|
||||||
|
"points": [
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 0,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 1,
|
||||||
|
"g": 1,
|
||||||
|
"pos": 0.503371,
|
||||||
|
"r": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 1,
|
||||||
|
"r": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Gradient"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "colorize"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "polycurve_2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1710.247192,
|
||||||
|
"y": 611.003174
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"curve": {
|
||||||
|
"points": [
|
||||||
|
{
|
||||||
|
"x": 0.584526,
|
||||||
|
"y": 0.389087
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0.504025,
|
||||||
|
"y": 0.4678
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0.466458,
|
||||||
|
"y": 0.583185
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 0.592657,
|
||||||
|
"y": 0.539068
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Polygon"
|
||||||
|
},
|
||||||
|
"ends": true,
|
||||||
|
"repeat": 1,
|
||||||
|
"width": 0.04
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "polycurve"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math_6",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1428.65625,
|
||||||
|
"y": 432.046021
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": true,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0,
|
||||||
|
"op": 14
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "colorize_3",
|
||||||
|
"node_position": {
|
||||||
|
"x": -658.671265,
|
||||||
|
"y": 110.307076
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"gradient": {
|
||||||
|
"interpolation": 1,
|
||||||
|
"points": [
|
||||||
|
{
|
||||||
|
"a": 0,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 0,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 0.520137,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 1,
|
||||||
|
"r": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Gradient"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "colorize"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"generic_size": 1,
|
||||||
|
"name": "blend2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -436.170044,
|
||||||
|
"y": 42.545734
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"amount1": 1,
|
||||||
|
"blend_type1": 0
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "blend2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math_7",
|
||||||
|
"node_position": {
|
||||||
|
"x": -666.455933,
|
||||||
|
"y": 173.593826
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"clamp": true,
|
||||||
|
"default_in1": 0,
|
||||||
|
"default_in2": 0,
|
||||||
|
"op": 1
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "math"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gradient",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1960.904297,
|
||||||
|
"y": 468.407867
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"gradient": {
|
||||||
|
"interpolation": 1,
|
||||||
|
"points": [
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 0,
|
||||||
|
"r": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 1,
|
||||||
|
"g": 1,
|
||||||
|
"pos": 0.496677,
|
||||||
|
"r": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"a": 1,
|
||||||
|
"b": 0,
|
||||||
|
"g": 0,
|
||||||
|
"pos": 1,
|
||||||
|
"r": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Gradient"
|
||||||
|
},
|
||||||
|
"repeat": 1,
|
||||||
|
"rotate": 90
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "gradient"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "buffer_2",
|
||||||
|
"node_position": {
|
||||||
|
"x": -930.487305,
|
||||||
|
"y": 223.583221
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"size": 11
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "buffer",
|
||||||
|
"version": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"generic_size": 1,
|
||||||
|
"name": "scale",
|
||||||
|
"node_position": {
|
||||||
|
"x": -1189.246582,
|
||||||
|
"y": 363.38324
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"cx": 0,
|
||||||
|
"cy": 0,
|
||||||
|
"scale_x": 2.37,
|
||||||
|
"scale_y": 1.5
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"type": "scale"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parameters": {
|
||||||
|
|
||||||
|
},
|
||||||
|
"seed_int": 0,
|
||||||
|
"shortdesc": "",
|
||||||
|
"type": "graph"
|
||||||
|
}
|
|
@ -29,11 +29,14 @@ void PlayerBody::_bind_methods() {
|
||||||
BIND_PROPERTY(Variant::FLOAT, target_speed);
|
BIND_PROPERTY(Variant::FLOAT, target_speed);
|
||||||
BIND_PROPERTY(Variant::FLOAT, split_step_time);
|
BIND_PROPERTY(Variant::FLOAT, split_step_time);
|
||||||
BIND_PROPERTY(Variant::FLOAT, split_step_stop_time);
|
BIND_PROPERTY(Variant::FLOAT, split_step_stop_time);
|
||||||
|
BIND_PROPERTY(Variant::FLOAT, bash_speed);
|
||||||
|
BIND_PROPERTY(Variant::FLOAT, bash_time);
|
||||||
BIND_PROPERTY(Variant::VECTOR2, jump_impulse);
|
BIND_PROPERTY(Variant::VECTOR2, jump_impulse);
|
||||||
BIND_PROPERTY(Variant::FLOAT, model_lean);
|
BIND_PROPERTY(Variant::FLOAT, model_lean);
|
||||||
BIND_PROPERTY(Variant::FLOAT, model_lean_speed);
|
BIND_PROPERTY(Variant::FLOAT, model_lean_speed);
|
||||||
BIND_PROPERTY(Variant::FLOAT, game_over_speed);
|
BIND_PROPERTY(Variant::FLOAT, game_over_speed);
|
||||||
BIND_PROPERTY(Variant::BOOL, can_jump);
|
BIND_PROPERTY(Variant::BOOL, can_jump);
|
||||||
|
BIND_PROPERTY(Variant::BOOL, can_bash);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerBody::_notification(int what) {
|
void PlayerBody::_notification(int what) {
|
||||||
|
@ -191,6 +194,22 @@ double PlayerBody::get_split_step_stop_time() const {
|
||||||
return this->split_step_stop_time;
|
return this->split_step_stop_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerBody::set_bash_speed(float value) {
|
||||||
|
this->bash_speed = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float PlayerBody::get_bash_speed() const {
|
||||||
|
return this->bash_speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PlayerBody::set_bash_time(double value) {
|
||||||
|
this->bash_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
double PlayerBody::get_bash_time() const {
|
||||||
|
return this->bash_time;
|
||||||
|
}
|
||||||
|
|
||||||
void PlayerBody::set_jump_impulse(Vector2 value) {
|
void PlayerBody::set_jump_impulse(Vector2 value) {
|
||||||
this->jump_impulse = value;
|
this->jump_impulse = value;
|
||||||
}
|
}
|
||||||
|
@ -230,3 +249,11 @@ void PlayerBody::set_can_jump(bool value) {
|
||||||
bool PlayerBody::get_can_jump() const {
|
bool PlayerBody::get_can_jump() const {
|
||||||
return this->can_jump;
|
return this->can_jump;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerBody::set_can_bash(bool value) {
|
||||||
|
this->can_bash = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PlayerBody::get_can_bash() const {
|
||||||
|
return this->can_bash;
|
||||||
|
}
|
||||||
|
|
|
@ -43,6 +43,10 @@ public:
|
||||||
double get_split_step_time() const;
|
double get_split_step_time() const;
|
||||||
void set_split_step_stop_time(double value);
|
void set_split_step_stop_time(double value);
|
||||||
double get_split_step_stop_time() const;
|
double get_split_step_stop_time() const;
|
||||||
|
void set_bash_speed(float value);
|
||||||
|
float get_bash_speed() const;
|
||||||
|
void set_bash_time(double value);
|
||||||
|
double get_bash_time() const;
|
||||||
void set_jump_impulse(Vector2 value);
|
void set_jump_impulse(Vector2 value);
|
||||||
Vector2 get_jump_impulse() const;
|
Vector2 get_jump_impulse() const;
|
||||||
void set_model_lean(float value);
|
void set_model_lean(float value);
|
||||||
|
@ -53,6 +57,8 @@ public:
|
||||||
float get_game_over_speed() const;
|
float get_game_over_speed() const;
|
||||||
void set_can_jump(bool value);
|
void set_can_jump(bool value);
|
||||||
bool get_can_jump() const;
|
bool get_can_jump() const;
|
||||||
|
void set_can_bash(bool value);
|
||||||
|
bool get_can_bash() const;
|
||||||
private:
|
private:
|
||||||
Vector2 movement{0.f, 0.f};
|
Vector2 movement{0.f, 0.f};
|
||||||
|
|
||||||
|
@ -68,6 +74,8 @@ private:
|
||||||
float target_speed{30.f};
|
float target_speed{30.f};
|
||||||
double split_step_time{0.5};
|
double split_step_time{0.5};
|
||||||
double split_step_stop_time{0.5};
|
double split_step_stop_time{0.5};
|
||||||
|
float bash_speed{100.f};
|
||||||
|
double bash_time{0.25};
|
||||||
Vector2 jump_impulse{5.f, 5.f};
|
Vector2 jump_impulse{5.f, 5.f};
|
||||||
float max_speed_fov{100.f};
|
float max_speed_fov{100.f};
|
||||||
float min_fov{80.f};
|
float min_fov{80.f};
|
||||||
|
@ -75,6 +83,7 @@ private:
|
||||||
float model_lean{0.25f};
|
float model_lean{0.25f};
|
||||||
float model_lean_speed{0.25f};
|
float model_lean_speed{0.25f};
|
||||||
double game_over_speed{1.0/4.0};
|
double game_over_speed{1.0/4.0};
|
||||||
|
bool can_bash{false};
|
||||||
bool can_jump{false};
|
bool can_jump{false};
|
||||||
Ref<Checkpoint> last_checkpoint{nullptr};
|
Ref<Checkpoint> last_checkpoint{nullptr};
|
||||||
PlayerStateMachine *state{nullptr};
|
PlayerStateMachine *state{nullptr};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "player_states.h"
|
#include "player_states.h"
|
||||||
#include "core/config/engine.h"
|
#include "core/config/engine.h"
|
||||||
#include "core/math/math_funcs.h"
|
#include "core/math/math_funcs.h"
|
||||||
|
#include "core/object/class_db.h"
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
#include "going/player_body.h"
|
#include "going/player_body.h"
|
||||||
#include "scene/main/scene_tree.h"
|
#include "scene/main/scene_tree.h"
|
||||||
|
@ -109,9 +110,10 @@ void RunningState::state_exited() {
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerState::StateID SplitStepState::get_next_state() const {
|
PlayerState::StateID SplitStepState::get_next_state() const {
|
||||||
bool const jump_input{this->get_body()->get_can_jump() && this->jump};
|
if(this->next == Jump && (this->timer <= 0.0 || !this->get_body()->is_on_floor())) {
|
||||||
if(jump_input && (this->timer <= 0.0 || !this->get_body()->is_on_floor())) {
|
|
||||||
return JumpingState::get_class_static();
|
return JumpingState::get_class_static();
|
||||||
|
} else if(this->next == Bash && (this->timer <= 0.0 || !this->get_body()->is_on_floor())) {
|
||||||
|
return BashState::get_class_static();
|
||||||
} else if(!this->get_body()->is_on_floor()) {
|
} else if(!this->get_body()->is_on_floor()) {
|
||||||
return FallingState::get_class_static();
|
return FallingState::get_class_static();
|
||||||
} else if(this->timer <= 0.0) {
|
} else if(this->timer <= 0.0) {
|
||||||
|
@ -122,7 +124,7 @@ PlayerState::StateID SplitStepState::get_next_state() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SplitStepState::state_entered() {
|
void SplitStepState::state_entered() {
|
||||||
this->jump = false;
|
this->next = Run;
|
||||||
this->last_velocity = this->get_body()->get_velocity();
|
this->last_velocity = this->get_body()->get_velocity();
|
||||||
this->timer = this->get_body()->get_split_step_time();
|
this->timer = this->get_body()->get_split_step_time();
|
||||||
this->get_body()->set_velocity(last_velocity.normalized() * this->get_body()->get_target_speed() * 0.75f);
|
this->get_body()->set_velocity(last_velocity.normalized() * this->get_body()->get_target_speed() * 0.75f);
|
||||||
|
@ -131,7 +133,12 @@ void SplitStepState::state_entered() {
|
||||||
|
|
||||||
void SplitStepState::process(double delta) {
|
void SplitStepState::process(double delta) {
|
||||||
this->timer -= delta;
|
this->timer -= delta;
|
||||||
this->jump |= Input::get_singleton()->is_action_pressed("jump");
|
if(this->get_body()->get_can_jump() && Input::get_singleton()->is_action_pressed("jump")) {
|
||||||
|
this->next = Jump;
|
||||||
|
}
|
||||||
|
if(this->get_body()->get_can_bash() && Input::get_singleton()->is_action_pressed("bash")) {
|
||||||
|
this->next = Bash;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SplitStepState::physics_process(double delta) {
|
void SplitStepState::physics_process(double delta) {
|
||||||
|
@ -141,12 +148,21 @@ void SplitStepState::physics_process(double delta) {
|
||||||
|
|
||||||
void SplitStepState::state_exited() {
|
void SplitStepState::state_exited() {
|
||||||
Vector3 desired_direction{0.f, 0.f, 0.f};
|
Vector3 desired_direction{0.f, 0.f, 0.f};
|
||||||
if(this->jump) {
|
switch(this->next) {
|
||||||
|
case Jump:
|
||||||
desired_direction = Vector3{last_velocity.x, 0.f, last_velocity.z}.normalized();
|
desired_direction = Vector3{last_velocity.x, 0.f, last_velocity.z}.normalized();
|
||||||
} else if(this->get_body()->is_on_floor()) {
|
break;
|
||||||
desired_direction = this->get_body()->get_desired_direction();
|
case Bash:
|
||||||
|
default:
|
||||||
|
if(this->get_body()->is_on_floor()) {
|
||||||
|
desired_direction = this->get_body()->get_desired_direction();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
float const dot{this->last_velocity.normalized().dot(desired_direction)};
|
float const dot{this->last_velocity
|
||||||
|
.normalized()
|
||||||
|
.dot(desired_direction)
|
||||||
|
};
|
||||||
this->get_body()->set_velocity(dot > -0.8f
|
this->get_body()->set_velocity(dot > -0.8f
|
||||||
? desired_direction * MAX(last_velocity.length(), this->get_body()->get_step_boost())
|
? desired_direction * MAX(last_velocity.length(), this->get_body()->get_step_boost())
|
||||||
: Vector3()
|
: Vector3()
|
||||||
|
@ -162,7 +178,7 @@ PlayerState::StateID FallingState::get_next_state() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FallingState::state_entered() {
|
void FallingState::state_entered() {
|
||||||
this->get_body()->get_anim()->play("falling", 0.1);
|
this->get_body()->get_anim()->play("falling", 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FallingState::physics_process(double delta) {
|
void FallingState::physics_process(double delta) {
|
||||||
|
@ -194,7 +210,48 @@ void JumpingState::physics_process(double delta) {
|
||||||
this->get_body()->set_velocity((flattened - (flattened * 0.015f)) + Vector3{0.f, current.y - float(9.8 * delta), 0.f});
|
this->get_body()->set_velocity((flattened - (flattened * 0.015f)) + Vector3{0.f, current.y - float(9.8 * delta), 0.f});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PlayerState::StateID BashState::get_next_state() const {
|
||||||
|
if(!this->get_body()->is_on_floor()) {
|
||||||
|
return FallingState::get_class_static();
|
||||||
|
} else if (this->timer < 0.0) {
|
||||||
|
return StandingState::get_class_static();
|
||||||
|
}
|
||||||
|
return this->get_class();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BashState::state_entered() {
|
||||||
|
this->get_body()->get_anim()->play("bash");
|
||||||
|
this->timer = this->get_body()->get_bash_time();
|
||||||
|
this->speed = this->get_body()->get_bash_speed();
|
||||||
|
(this->vfx = Object::cast_to<Node3D>(this->get_body()->get_node(this->vfx_path)))->set_visible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BashState::process(double delta) {
|
||||||
|
this->timer -= delta;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BashState::physics_process(double delta) {
|
||||||
|
double const progress{1.0 - this->timer / this->get_body()->get_bash_time()};
|
||||||
|
this->get_body()->set_velocity(
|
||||||
|
Math::lerp(
|
||||||
|
this->get_body()->get_bash_speed(),
|
||||||
|
this->get_body()->get_target_speed(),
|
||||||
|
float(progress)
|
||||||
|
) * this->get_body()->get_model()->get_global_basis().get_column(2).normalized()
|
||||||
|
+ Vector3{0, float(-2.0 / delta), 0}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BashState::state_exited() {
|
||||||
|
this->vfx->set_visible(false);
|
||||||
|
if(!this->get_body()->is_on_floor()) {
|
||||||
|
this->get_body()->set_velocity(this->get_body()->get_velocity() / 2.f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PlayerStateMachine::_bind_methods() {
|
void PlayerStateMachine::_bind_methods() {
|
||||||
|
ClassDB::bind_method(D_METHOD("get_current_state"), &self_type::get_current_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerStateMachine::_notification(int what) {
|
void PlayerStateMachine::_notification(int what) {
|
||||||
|
@ -226,6 +283,7 @@ void PlayerStateMachine::ready() {
|
||||||
this->add_state<RunningState>();
|
this->add_state<RunningState>();
|
||||||
this->add_state<SplitStepState>();
|
this->add_state<SplitStepState>();
|
||||||
this->add_state<JumpingState>();
|
this->add_state<JumpingState>();
|
||||||
|
this->add_state<BashState>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerStateMachine::try_transition() {
|
void PlayerStateMachine::try_transition() {
|
||||||
|
@ -236,3 +294,7 @@ void PlayerStateMachine::try_transition() {
|
||||||
this->current_state->state_entered();
|
this->current_state->state_entered();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringName PlayerStateMachine::get_current_state() const {
|
||||||
|
return this->current_state->get_class();
|
||||||
|
}
|
||||||
|
|
|
@ -59,9 +59,12 @@ public:
|
||||||
virtual void physics_process(double delta) override;
|
virtual void physics_process(double delta) override;
|
||||||
virtual void state_exited() override;
|
virtual void state_exited() override;
|
||||||
private:
|
private:
|
||||||
|
enum NextAction {
|
||||||
|
Run, Bash, Jump
|
||||||
|
};
|
||||||
Vector3 last_velocity{0.f, 0.f, 0.f};
|
Vector3 last_velocity{0.f, 0.f, 0.f};
|
||||||
double timer{0.0};
|
double timer{0.0};
|
||||||
bool jump{false};
|
NextAction next{Run};
|
||||||
};
|
};
|
||||||
|
|
||||||
class FallingState : public PlayerState {
|
class FallingState : public PlayerState {
|
||||||
|
@ -80,6 +83,21 @@ public:
|
||||||
virtual void physics_process(double delta) override;
|
virtual void physics_process(double delta) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BashState : public PlayerState {
|
||||||
|
GDCLASS(BashState, PlayerState);
|
||||||
|
public:
|
||||||
|
virtual StateID get_next_state() const override;
|
||||||
|
virtual void state_entered() override;
|
||||||
|
virtual void process(double delta) override;
|
||||||
|
virtual void physics_process(double delta) override;
|
||||||
|
virtual void state_exited() override;
|
||||||
|
private:
|
||||||
|
NodePath vfx_path{"character/bash_attack"};
|
||||||
|
Node3D *vfx{nullptr};
|
||||||
|
double timer{0.0};
|
||||||
|
float speed{0.f};
|
||||||
|
};
|
||||||
|
|
||||||
class PlayerStateMachine : public Node {
|
class PlayerStateMachine : public Node {
|
||||||
GDCLASS(PlayerStateMachine, Node);
|
GDCLASS(PlayerStateMachine, Node);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
@ -89,6 +107,7 @@ class PlayerStateMachine : public Node {
|
||||||
template <class TState>
|
template <class TState>
|
||||||
void add_state();
|
void add_state();
|
||||||
public:
|
public:
|
||||||
|
StringName get_current_state() const;
|
||||||
template <class TState>
|
template <class TState>
|
||||||
void force_state();
|
void force_state();
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -17,6 +17,7 @@ void initialize_going_module(ModuleInitializationLevel p_level) {
|
||||||
ClassDB::register_class<SplitStepState>();
|
ClassDB::register_class<SplitStepState>();
|
||||||
ClassDB::register_class<FallingState>();
|
ClassDB::register_class<FallingState>();
|
||||||
ClassDB::register_class<JumpingState>();
|
ClassDB::register_class<JumpingState>();
|
||||||
|
ClassDB::register_class<BashState>();
|
||||||
ClassDB::register_class<PlayerStateMachine>();
|
ClassDB::register_class<PlayerStateMachine>();
|
||||||
ClassDB::register_class<GameUI>();
|
ClassDB::register_class<GameUI>();
|
||||||
ClassDB::register_class<Checkpoint>();
|
ClassDB::register_class<Checkpoint>();
|
||||||
|
|
BIN
project/materials/cracked_wall_albedo.png
Normal file
BIN
project/materials/cracked_wall_albedo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
35
project/materials/cracked_wall_albedo.png.import
Normal file
35
project/materials/cracked_wall_albedo.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cmalrvf32s8n5"
|
||||||
|
path.s3tc="res://.godot/imported/cracked_wall_albedo.png-767e5a5776c40beaadf0588718232b85.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://materials/cracked_wall_albedo.png"
|
||||||
|
dest_files=["res://.godot/imported/cracked_wall_albedo.png-767e5a5776c40beaadf0588718232b85.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
BIN
project/materials/cracked_wall_normal.png
Normal file
BIN
project/materials/cracked_wall_normal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 MiB |
35
project/materials/cracked_wall_normal.png.import
Normal file
35
project/materials/cracked_wall_normal.png.import
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cfqdvwgcjlc43"
|
||||||
|
path.s3tc="res://.godot/imported/cracked_wall_normal.png-3d5b7731e2017c2cef47b652c6b29709.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://materials/cracked_wall_normal.png"
|
||||||
|
dest_files=["res://.godot/imported/cracked_wall_normal.png-3d5b7731e2017c2cef47b652c6b29709.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=1
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=1
|
||||||
|
roughness/src_normal="res://materials/cracked_wall_normal.png"
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
BIN
project/models/pickups/pinecone.blend
Normal file
BIN
project/models/pickups/pinecone.blend
Normal file
Binary file not shown.
53
project/models/pickups/pinecone.blend.import
Normal file
53
project/models/pickups/pinecone.blend.import
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://bhccbn5c7dhf7"
|
||||||
|
path="res://.godot/imported/pinecone.blend-c2d0c29f160504a2dc411ce16440c4f1.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://models/pickups/pinecone.blend"
|
||||||
|
dest_files=["res://.godot/imported/pinecone.blend-c2d0c29f160504a2dc411ce16440c4f1.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
blender/nodes/visible=0
|
||||||
|
blender/nodes/active_collection_only=false
|
||||||
|
blender/nodes/punctual_lights=true
|
||||||
|
blender/nodes/cameras=true
|
||||||
|
blender/nodes/custom_properties=true
|
||||||
|
blender/nodes/modifiers=1
|
||||||
|
blender/meshes/colors=false
|
||||||
|
blender/meshes/uvs=true
|
||||||
|
blender/meshes/normals=true
|
||||||
|
blender/meshes/export_geometry_nodes_instances=false
|
||||||
|
blender/meshes/tangents=true
|
||||||
|
blender/meshes/skins=2
|
||||||
|
blender/meshes/export_bones_deforming_mesh_only=false
|
||||||
|
blender/materials/unpack_enabled=true
|
||||||
|
blender/materials/export_materials=1
|
||||||
|
blender/animation/limit_playback=true
|
||||||
|
blender/animation/always_sample=true
|
||||||
|
blender/animation/group_tracks=true
|
BIN
project/models/pickups/pinecone.blend1
Normal file
BIN
project/models/pickups/pinecone.blend1
Normal file
Binary file not shown.
BIN
project/models/player/bash_attack.blend
Normal file
BIN
project/models/player/bash_attack.blend
Normal file
Binary file not shown.
53
project/models/player/bash_attack.blend.import
Normal file
53
project/models/player/bash_attack.blend.import
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://clspx5suh5ywx"
|
||||||
|
path="res://.godot/imported/bash_attack.blend-90f832255602d0bdc2808179415d7da7.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://models/player/bash_attack.blend"
|
||||||
|
dest_files=["res://.godot/imported/bash_attack.blend-90f832255602d0bdc2808179415d7da7.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
blender/nodes/visible=0
|
||||||
|
blender/nodes/active_collection_only=false
|
||||||
|
blender/nodes/punctual_lights=true
|
||||||
|
blender/nodes/cameras=true
|
||||||
|
blender/nodes/custom_properties=true
|
||||||
|
blender/nodes/modifiers=1
|
||||||
|
blender/meshes/colors=false
|
||||||
|
blender/meshes/uvs=true
|
||||||
|
blender/meshes/normals=true
|
||||||
|
blender/meshes/export_geometry_nodes_instances=false
|
||||||
|
blender/meshes/tangents=true
|
||||||
|
blender/meshes/skins=2
|
||||||
|
blender/meshes/export_bones_deforming_mesh_only=false
|
||||||
|
blender/materials/unpack_enabled=true
|
||||||
|
blender/materials/export_materials=1
|
||||||
|
blender/animation/limit_playback=true
|
||||||
|
blender/animation/always_sample=true
|
||||||
|
blender/animation/group_tracks=true
|
BIN
project/models/player/bash_attack.blend1
Normal file
BIN
project/models/player/bash_attack.blend1
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
project/models/player/character.blend11
Normal file
BIN
project/models/player/character.blend11
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
project/models/props/rock.blend
Normal file
BIN
project/models/props/rock.blend
Normal file
Binary file not shown.
53
project/models/props/rock.blend.import
Normal file
53
project/models/props/rock.blend.import
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://2yqgpigg0wr8"
|
||||||
|
path="res://.godot/imported/rock.blend-663fa0dfee57652abb8a8e79b8f6c4e4.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://models/props/rock.blend"
|
||||||
|
dest_files=["res://.godot/imported/rock.blend-663fa0dfee57652abb8a8e79b8f6c4e4.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
blender/nodes/visible=0
|
||||||
|
blender/nodes/active_collection_only=false
|
||||||
|
blender/nodes/punctual_lights=true
|
||||||
|
blender/nodes/cameras=true
|
||||||
|
blender/nodes/custom_properties=true
|
||||||
|
blender/nodes/modifiers=1
|
||||||
|
blender/meshes/colors=false
|
||||||
|
blender/meshes/uvs=true
|
||||||
|
blender/meshes/normals=true
|
||||||
|
blender/meshes/export_geometry_nodes_instances=false
|
||||||
|
blender/meshes/tangents=true
|
||||||
|
blender/meshes/skins=2
|
||||||
|
blender/meshes/export_bones_deforming_mesh_only=false
|
||||||
|
blender/materials/unpack_enabled=true
|
||||||
|
blender/materials/export_materials=1
|
||||||
|
blender/animation/limit_playback=true
|
||||||
|
blender/animation/always_sample=true
|
||||||
|
blender/animation/group_tracks=true
|
BIN
project/models/props/rock.blend1
Normal file
BIN
project/models/props/rock.blend1
Normal file
Binary file not shown.
Binary file not shown.
|
@ -33,6 +33,12 @@ animation/remove_immutable_tracks=true
|
||||||
animation/import_rest_as_RESET=false
|
animation/import_rest_as_RESET=false
|
||||||
import_script/path=""
|
import_script/path=""
|
||||||
_subresources={
|
_subresources={
|
||||||
|
"materials": {
|
||||||
|
"leaf": {
|
||||||
|
"use_external/enabled": true,
|
||||||
|
"use_external/path": "uid://bx0x66slifwki"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"PATH:entrance": {
|
"PATH:entrance": {
|
||||||
"mesh_instance/cast_shadow": 2
|
"mesh_instance/cast_shadow": 2
|
||||||
|
|
Binary file not shown.
43
project/objects/bash_pickup.tscn
Normal file
43
project/objects/bash_pickup.tscn
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cxkk7sfkv3otl"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bhccbn5c7dhf7" path="res://models/pickups/pinecone.blend" id="1_f2ibw"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_f2ibw"]
|
||||||
|
script/source = "extends Area3D
|
||||||
|
|
||||||
|
func _on_body_entered(body: Node3D) -> void:
|
||||||
|
if body.is_class(\"PlayerBody\"):
|
||||||
|
body.can_bash = true
|
||||||
|
queue_free()
|
||||||
|
GameUI.get_singleton().display_message(\"Bash through obstacles by pressing (X) during a split-step\")
|
||||||
|
(body as PlayerBody).save_checkpoint()
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
$pinecone.rotate_y(delta * 2.0)
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_4fish"]
|
||||||
|
radius = 2.22562
|
||||||
|
|
||||||
|
[node name="BashPickup" type="Area3D"]
|
||||||
|
script = SubResource("GDScript_f2ibw")
|
||||||
|
|
||||||
|
[node name="pinecone" parent="." instance=ExtResource("1_f2ibw")]
|
||||||
|
transform = Transform3D(1.62103, 0, 0, 0, 1.62103, 0, 0, 0, 1.62103, 0, 0.235161, 0)
|
||||||
|
|
||||||
|
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.79643, 0)
|
||||||
|
light_color = Color(0.880355, 0.555272, 0, 1)
|
||||||
|
light_energy = 8.133
|
||||||
|
omni_range = 3.15575
|
||||||
|
|
||||||
|
[node name="OmniLight3D2" type="OmniLight3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.38918, 0)
|
||||||
|
light_color = Color(0.880355, 0.555272, 0, 1)
|
||||||
|
light_energy = 8.133
|
||||||
|
omni_range = 3.15575
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
shape = SubResource("SphereShape3D_4fish")
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
41
project/objects/breakable_boulder.tscn
Normal file
41
project/objects/breakable_boulder.tscn
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
[gd_scene load_steps=5 format=3 uid="uid://cbif1o8njtshs"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://2yqgpigg0wr8" path="res://models/props/rock.blend" id="1_mofqw"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_mofqw"]
|
||||||
|
script/source = "extends Node3D
|
||||||
|
|
||||||
|
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||||
|
print(\"Body entered \", body.get_path())
|
||||||
|
if body.is_class(\"PlayerBody\") and body.get_node(\"PlayerStateMachine\").get_current_state() == \"BashState\":
|
||||||
|
queue_free()
|
||||||
|
"
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_yqw6a"]
|
||||||
|
size = Vector3(6.69, 6.685, 5.35156)
|
||||||
|
|
||||||
|
[sub_resource type="BoxShape3D" id="BoxShape3D_mofqw"]
|
||||||
|
size = Vector3(6.69, 6.685, 5.05249)
|
||||||
|
|
||||||
|
[node name="BreakableBoulder" type="Node3D"]
|
||||||
|
script = SubResource("GDScript_mofqw")
|
||||||
|
|
||||||
|
[node name="Area3D" type="Area3D" parent="."]
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.00162, 0)
|
||||||
|
shape = SubResource("BoxShape3D_yqw6a")
|
||||||
|
debug_color = Color(0.09, 0.529833, 1, 0.835294)
|
||||||
|
|
||||||
|
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.00162, 0)
|
||||||
|
shape = SubResource("BoxShape3D_mofqw")
|
||||||
|
debug_color = Color(0.09, 0.529833, 1, 0.835294)
|
||||||
|
|
||||||
|
[node name="rock" parent="." instance=ExtResource("1_mofqw")]
|
||||||
|
|
||||||
|
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
|
29
project/objects/game_over_effect.tscn
Normal file
29
project/objects/game_over_effect.tscn
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://c6p8iu3mpsbwv"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dqjurq1nq1fle" path="res://objects/tre.tscn" id="1_g0g6w"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_g0g6w"]
|
||||||
|
script/source = "extends Node3D
|
||||||
|
|
||||||
|
@export var camera : Camera3D
|
||||||
|
@export var trees : Array[Node3D]
|
||||||
|
|
||||||
|
func _process(delta: float):
|
||||||
|
pass
|
||||||
|
"
|
||||||
|
|
||||||
|
[node name="GameOverEffect" type="Node3D" node_paths=PackedStringArray("trees")]
|
||||||
|
script = SubResource("GDScript_g0g6w")
|
||||||
|
trees = [NodePath("Tree"), NodePath("Tree3"), NodePath("Tree4"), NodePath("Tree2")]
|
||||||
|
|
||||||
|
[node name="Tree" parent="." instance=ExtResource("1_g0g6w")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.38125, 0, -6.61966)
|
||||||
|
|
||||||
|
[node name="Tree3" parent="." instance=ExtResource("1_g0g6w")]
|
||||||
|
transform = Transform3D(-0.398413, 0, -0.917206, 0, 1, 0, 0.917206, 0, -0.398413, 2.8449, 0, -4.31524)
|
||||||
|
|
||||||
|
[node name="Tree4" parent="." instance=ExtResource("1_g0g6w")]
|
||||||
|
transform = Transform3D(-0.00326398, 0, -0.999995, 0, 1, 0, 0.999995, 0, -0.00326398, 5.11824, 0, -1.29329)
|
||||||
|
|
||||||
|
[node name="Tree2" parent="." instance=ExtResource("1_g0g6w")]
|
||||||
|
transform = Transform3D(-0.487951, 0, 0.872871, 0, 1, 0, -0.872871, 0, -0.487951, -5.43739, 1.90735e-06, -2.48827)
|
|
@ -7,9 +7,9 @@ script/source = "extends Area3D
|
||||||
|
|
||||||
func _on_body_entered(body: Node3D) -> void:
|
func _on_body_entered(body: Node3D) -> void:
|
||||||
if body.is_class(\"PlayerBody\"):
|
if body.is_class(\"PlayerBody\"):
|
||||||
body.set_can_jump(true)
|
body.can_jump = true
|
||||||
queue_free()
|
queue_free()
|
||||||
GameUI.get_singleton().display_message(\"Jump by pressing F during a split-step\")
|
GameUI.get_singleton().display_message(\"Jump by pressing (A) during a split-step\")
|
||||||
(body as PlayerBody).save_checkpoint()
|
(body as PlayerBody).save_checkpoint()
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
|
@ -17,7 +17,7 @@ func _physics_process(delta):
|
||||||
"
|
"
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_a2vvy"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_a2vvy"]
|
||||||
radius = 1.61546
|
radius = 2.50626
|
||||||
|
|
||||||
[node name="JumpPickup" type="Area3D"]
|
[node name="JumpPickup" type="Area3D"]
|
||||||
script = SubResource("GDScript_a2vvy")
|
script = SubResource("GDScript_a2vvy")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://dcgsrdacswacl"]
|
[gd_scene load_steps=6 format=3 uid="uid://dcgsrdacswacl"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cl7a4q5m73vlw" path="res://models/player/character.blend" id="1_eqqp1"]
|
[ext_resource type="PackedScene" uid="uid://cl7a4q5m73vlw" path="res://models/player/character.blend" id="1_eqqp1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://clspx5suh5ywx" path="res://models/player/bash_attack.blend" id="2_uxov2"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dy4yl1paa8whs" path="res://ui/ui.tscn" id="2_ykyjo"]
|
[ext_resource type="PackedScene" uid="uid://dy4yl1paa8whs" path="res://ui/ui.tscn" id="2_ykyjo"]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
|
||||||
|
@ -27,12 +28,15 @@ func _physics_process(_delta):
|
||||||
|
|
||||||
[node name="Player" type="PlayerBody"]
|
[node name="Player" type="PlayerBody"]
|
||||||
physics_interpolation_mode = 1
|
physics_interpolation_mode = 1
|
||||||
|
collision_layer = 2
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
wall_min_slide_angle = 0.785398
|
wall_min_slide_angle = 0.785398
|
||||||
floor_max_angle = 0.460767
|
floor_max_angle = 0.460767
|
||||||
floor_snap_length = 0.35
|
floor_snap_length = 0.35
|
||||||
acceleration = 15.0
|
acceleration = 15.0
|
||||||
target_speed = 25.0
|
target_speed = 25.0
|
||||||
|
split_step_time = 0.35
|
||||||
|
split_step_stop_time = 0.34
|
||||||
jump_impulse = Vector2(0.9, 5)
|
jump_impulse = Vector2(0.9, 5)
|
||||||
|
|
||||||
[node name="PlayerStateMachine" type="PlayerStateMachine" parent="."]
|
[node name="PlayerStateMachine" type="PlayerStateMachine" parent="."]
|
||||||
|
@ -53,6 +57,10 @@ look_target_height = 1.5
|
||||||
[node name="character" parent="." instance=ExtResource("1_eqqp1")]
|
[node name="character" parent="." instance=ExtResource("1_eqqp1")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
|
[node name="bash_attack" parent="character" instance=ExtResource("2_uxov2")]
|
||||||
|
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 6.60846e-09, 1.19557, 0.0755919)
|
||||||
|
visible = false
|
||||||
|
|
||||||
[node name="CanvasLayer" parent="." instance=ExtResource("2_ykyjo")]
|
[node name="CanvasLayer" parent="." instance=ExtResource("2_ykyjo")]
|
||||||
|
|
||||||
[editable path="character"]
|
[editable path="character"]
|
||||||
|
|
|
@ -17,8 +17,8 @@ config/icon="res://icon.svg"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/viewport_width=1920
|
window/size/viewport_width=1440
|
||||||
window/size/viewport_height=1080
|
window/size/viewport_height=810
|
||||||
window/size/resizable=false
|
window/size/resizable=false
|
||||||
window/vsync/vsync_mode=0
|
window/vsync/vsync_mode=0
|
||||||
|
|
||||||
|
@ -60,6 +60,11 @@ jump={
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
bash={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue