Various upgrades, mainly combat related ones, codebase cleanup
This commit is contained in:
parent
83119f7b7b
commit
956b5ef2d0
30 changed files with 422 additions and 48 deletions
BIN
fonts/Handwritingg3.ttf
Normal file
BIN
fonts/Handwritingg3.ttf
Normal file
Binary file not shown.
36
fonts/Handwritingg3.ttf.import
Normal file
36
fonts/Handwritingg3.ttf.import
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://dkc6bfd6b4ibs"
|
||||
path="res://.godot/imported/Handwritingg3.ttf-11dfe316705da4dc23e8d7f8914b04ba.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fonts/Handwritingg3.ttf"
|
||||
dest_files=["res://.godot/imported/Handwritingg3.ttf-11dfe316705da4dc23e8d7f8914b04ba.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
fonts/PlaypenSans.ttf
Normal file
BIN
fonts/PlaypenSans.ttf
Normal file
Binary file not shown.
36
fonts/PlaypenSans.ttf.import
Normal file
36
fonts/PlaypenSans.ttf.import
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://b3o8fv6dxeoh2"
|
||||
path="res://.godot/imported/PlaypenSans.ttf-e19140ed34da710b84471ebc40667813.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://fonts/PlaypenSans.ttf"
|
||||
dest_files=["res://.godot/imported/PlaypenSans.ttf-e19140ed34da710b84471ebc40667813.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
11
materials/brightshroom.tres
Normal file
11
materials/brightshroom.tres
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://2s8nf0t402xt"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ln2b0h7jurye" path="res://textures/brightshroom.png" id="1_wk7lx"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_wk7lx")
|
||||
emission_enabled = true
|
||||
emission_energy_multiplier = 0.66
|
||||
emission_texture = ExtResource("1_wk7lx")
|
||||
texture_filter = 0
|
||||
disable_receive_shadows = true
|
||||
11
materials/brightshroom_orange.tres
Normal file
11
materials/brightshroom_orange.tres
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dkx2w75felif2"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://gotb5lmbe8ve" path="res://textures/brightshroom_orange.png" id="1_k7ca7"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_k7ca7")
|
||||
emission_enabled = true
|
||||
emission_energy_multiplier = 0.66
|
||||
emission_texture = ExtResource("1_k7ca7")
|
||||
texture_filter = 0
|
||||
disable_receive_shadows = true
|
||||
9
materials/tile/stone_floor.tres
Normal file
9
materials/tile/stone_floor.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://bivt02tm06osv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dfcoremq6wxa" path="res://textures/tile/stone_floor.png" id="1_433wp"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_433wp")
|
||||
uv1_scale = Vector3(0.5, 0.5, 0.5)
|
||||
uv1_triplanar = true
|
||||
texture_filter = 0
|
||||
1
models/brightshroom.bbmodel
Normal file
1
models/brightshroom.bbmodel
Normal file
File diff suppressed because one or more lines are too long
1
models/brightshroom.gltf
Normal file
1
models/brightshroom.gltf
Normal file
File diff suppressed because one or more lines are too long
64
models/brightshroom.gltf.import
Normal file
64
models/brightshroom.gltf.import
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cj2yeoom4w7d1"
|
||||
path="res://.godot/imported/brightshroom.gltf-1328ddefd135ad00fef34fa526def2f2.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://models/brightshroom.gltf"
|
||||
dest_files=["res://.godot/imported/brightshroom.gltf-1328ddefd135ad00fef34fa526def2f2.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
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=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={
|
||||
"materials": {
|
||||
"material_0": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://materials/brightshroom.tres",
|
||||
"use_external/path": "uid://2s8nf0t402xt"
|
||||
}
|
||||
},
|
||||
"nodes": {
|
||||
"PATH:mesh": {
|
||||
"generate/physics": true,
|
||||
"mesh_instance/cast_shadow": 0,
|
||||
"physics/layer": 255,
|
||||
"physics/mask": 255
|
||||
},
|
||||
"PATH:mesh2": {
|
||||
"generate/physics": true,
|
||||
"mesh_instance/cast_shadow": 0,
|
||||
"physics/layer": 255,
|
||||
"physics/mask": 255
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
|
|
@ -89,9 +89,9 @@ limbo_console_search_history={
|
|||
|
||||
textures/canvas_textures/default_texture_filter=0
|
||||
rendering_device/driver.windows="d3d12"
|
||||
renderer/rendering_method="mobile"
|
||||
lights_and_shadows/directional_shadow/size=2048
|
||||
lights_and_shadows/directional_shadow/size.mobile=1024
|
||||
lights_and_shadows/directional_shadow/soft_shadow_filter_quality=0
|
||||
textures/decals/filter=0
|
||||
textures/light_projectors/filter=0
|
||||
environment/defaults/default_clear_color=Color(0, 0, 0, 1)
|
||||
|
|
|
|||
20
scenes/effects/damage_text.tscn
Normal file
20
scenes/effects/damage_text.tscn
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
[gd_scene format=3 uid="uid://b2w6hcvr8mimm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dwcbey8lgg1p2" path="res://scripts/effects/damage_text.gd" id="1_2aaxa"]
|
||||
[ext_resource type="FontFile" uid="uid://dkc6bfd6b4ibs" path="res://fonts/Handwritingg3.ttf" id="1_24n7w"]
|
||||
|
||||
[node name="DamageText" type="RigidBody3D" unique_id=670799148]
|
||||
mass = 0.001
|
||||
script = ExtResource("1_2aaxa")
|
||||
|
||||
[node name="Label" type="Label3D" parent="." unique_id=1717375385]
|
||||
pixel_size = 0.001
|
||||
billboard = 1
|
||||
no_depth_test = true
|
||||
fixed_size = true
|
||||
render_priority = 100
|
||||
outline_render_priority = 99
|
||||
modulate = Color(1, 0, 0, 1)
|
||||
text = "96"
|
||||
font = ExtResource("1_24n7w")
|
||||
font_size = 48
|
||||
|
|
@ -47,11 +47,9 @@ animations = [{
|
|||
}]
|
||||
|
||||
[node name="Slash" type="AnimatedSprite3D" unique_id=1787289120]
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, -8.742278e-08, -4.371139e-08, 1, -3.821371e-15, 1, 4.371139e-08, 0, 0, 0)
|
||||
pixel_size = 0.04
|
||||
no_depth_test = true
|
||||
texture_filter = 0
|
||||
render_priority = 99
|
||||
sprite_frames = SubResource("SpriteFrames_ir15t")
|
||||
frame = 4
|
||||
frame_progress = 1.0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene format=3 uid="uid://dkiydumtthgk7"]
|
||||
[gd_scene format=3 uid="uid://co5p7h3exggvh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7gns73bldktx" path="res://scripts/slime.gd" id="1_4h4y0"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6krbvbco0jt6" path="res://textures/shadow.png" id="2_b58ev"]
|
||||
|
|
@ -152,15 +152,9 @@ shape = SubResource("CapsuleShape3D_0tnpc")
|
|||
[node name="Floorcast" type="RayCast3D" parent="." unique_id=216872080]
|
||||
target_position = Vector3(0, -16, 0)
|
||||
|
||||
[node name="HealthLabel" type="Label3D" parent="." unique_id=933867608]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.8399999, 0)
|
||||
pixel_size = 0.01
|
||||
billboard = 1
|
||||
text = "hello!"
|
||||
|
||||
[node name="Body" type="Sprite3D" parent="." unique_id=1136011871]
|
||||
transform = Transform3D(0.7, 0, 0, 0, 1.3, 0, 0, 0, 1, 0, 0.05, 0)
|
||||
pixel_size = 0.03
|
||||
shaded = true
|
||||
texture_filter = 0
|
||||
texture = ExtResource("3_ankfk")
|
||||
|
||||
|
|
|
|||
|
|
@ -3,15 +3,14 @@
|
|||
[ext_resource type="Script" uid="uid://dhfun46prq3uk" path="res://scripts/game.gd" id="1_gee14"]
|
||||
[ext_resource type="Script" uid="uid://crf3d7dpjvlsl" path="res://scripts/player_camera.gd" id="1_lnu2h"]
|
||||
[ext_resource type="Script" uid="uid://66iq60cxqomg" path="res://scripts/player.gd" id="1_yqjtg"]
|
||||
[ext_resource type="Material" uid="uid://bivt02tm06osv" path="res://materials/tile/stone_floor.tres" id="2_gee14"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6krbvbco0jt6" path="res://textures/shadow.png" id="4_lbhrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnii80nh1mxr2" path="res://scenes/assets/dreamer_body.tscn" id="4_p57ef"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0kty7juk7rfo" path="res://models/stalagmite.gltf" id="5_iywne"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/enemies/slime.tscn" id="6_u5sy4"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lbhrr"]
|
||||
albedo_color = Color(0.61, 0.28791997, 0.17079999, 1)
|
||||
|
||||
[sub_resource type="Environment" id="Environment_uwrxv"]
|
||||
[ext_resource type="PackedScene" uid="uid://co5p7h3exggvh" path="res://scenes/enemies/slime.tscn" id="6_u5sy4"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6otq05jy7m6d" path="res://scenes/prefabs/brightshroom.tscn" id="9_vtaks"]
|
||||
[ext_resource type="PackedScene" uid="uid://boelsm35tk0k6" path="res://scenes/prefabs/brightshroom_orange.tscn" id="10_kvpfn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2w6hcvr8mimm" path="res://scenes/effects/damage_text.tscn" id="11_kvpfn"]
|
||||
|
||||
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_yqjtg"]
|
||||
|
||||
|
|
@ -22,6 +21,12 @@ size = Vector3(1.2, 1, 1.3)
|
|||
radius = 0.15
|
||||
height = 1.0
|
||||
|
||||
[sub_resource type="Environment" id="Environment_uwrxv"]
|
||||
background_mode = 1
|
||||
background_color = Color(0.21272367, 0.00026760699, 0.30778188, 1)
|
||||
tonemap_mode = 2
|
||||
volumetric_fog_enabled = true
|
||||
|
||||
[node name="Game" type="Node3D" unique_id=1358608749]
|
||||
script = ExtResource("1_gee14")
|
||||
|
||||
|
|
@ -31,11 +36,10 @@ use_collision = true
|
|||
collision_layer = 255
|
||||
collision_mask = 255
|
||||
size = Vector3(16, 1, 16)
|
||||
material = SubResource("StandardMaterial3D_lbhrr")
|
||||
material = ExtResource("2_gee14")
|
||||
|
||||
[node name="PlayerCamera" type="Camera3D" parent="." unique_id=1101523944]
|
||||
transform = Transform3D(0.7071067, -0.40557978, 0.5792279, 0, 0.819152, 0.5735764, -0.7071067, -0.40557978, 0.5792279, 4, 6.5, 4)
|
||||
environment = SubResource("Environment_uwrxv")
|
||||
attributes = SubResource("CameraAttributesPractical_yqjtg")
|
||||
fov = 65.0
|
||||
script = ExtResource("1_lnu2h")
|
||||
|
|
@ -72,9 +76,18 @@ target_position = Vector3(0, -16, 0)
|
|||
[node name="Slime" parent="." unique_id=393738189 instance=ExtResource("6_u5sy4")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 3, -3.81)
|
||||
|
||||
[node name="Sun" type="DirectionalLight3D" parent="." unique_id=1000747668]
|
||||
transform = Transform3D(5.337265e-08, 0.90171933, -0.4323222, -0.3453802, 0.40571806, 0.8462301, 0.93846303, 0.14931537, 0.31143594, 0, 0, 0)
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="Stalagmite" parent="." unique_id=39322424 instance=ExtResource("5_iywne")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.48141205, 3)
|
||||
|
||||
[node name="blockbench_export" parent="." unique_id=1509742770 instance=ExtResource("9_vtaks")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.4827318, 0.4921612, -1.048477)
|
||||
|
||||
[node name="blockbench_export2" parent="." unique_id=992880863 instance=ExtResource("10_kvpfn")]
|
||||
transform = Transform3D(0.34202015, 0, -0.9396926, 0, 1, 0, 0.9396926, 0, 0.34202015, 2.7356708, 0.49367946, 3.0695834)
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1956400862]
|
||||
environment = SubResource("Environment_uwrxv")
|
||||
|
||||
[node name="DamageText" parent="." unique_id=670799148 instance=ExtResource("11_kvpfn")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.23, 0)
|
||||
gravity_scale = 2.5
|
||||
|
|
|
|||
11
scenes/prefabs/brightshroom.tscn
Normal file
11
scenes/prefabs/brightshroom.tscn
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[gd_scene format=3 uid="uid://b6otq05jy7m6d"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cj2yeoom4w7d1" path="res://models/brightshroom.gltf" id="1_pvbcs"]
|
||||
|
||||
[node name="blockbench_export" unique_id=1509742770 instance=ExtResource("1_pvbcs")]
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="." index="2" unique_id=1156755560]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||
light_color = Color(0.26707304, 0.71508616, 0.9999997, 1)
|
||||
light_energy = 1.265
|
||||
shadow_enabled = true
|
||||
18
scenes/prefabs/brightshroom_orange.tscn
Normal file
18
scenes/prefabs/brightshroom_orange.tscn
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[gd_scene format=3 uid="uid://boelsm35tk0k6"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cj2yeoom4w7d1" path="res://models/brightshroom.gltf" id="1_jlgeb"]
|
||||
[ext_resource type="Material" uid="uid://dkx2w75felif2" path="res://materials/brightshroom_orange.tres" id="2_8mb4p"]
|
||||
|
||||
[node name="blockbench_export" unique_id=1509742770 instance=ExtResource("1_jlgeb")]
|
||||
|
||||
[node name="mesh" parent="." index="0" unique_id=360524914]
|
||||
surface_material_override/0 = ExtResource("2_8mb4p")
|
||||
|
||||
[node name="mesh2" parent="." index="1" unique_id=978628742]
|
||||
surface_material_override/0 = ExtResource("2_8mb4p")
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="." index="2" unique_id=474035198]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||
light_color = Color(1, 0.51865834, 0.3416382, 1)
|
||||
light_energy = 1.265
|
||||
shadow_enabled = true
|
||||
15
scripts/effects/damage_text.gd
Normal file
15
scripts/effects/damage_text.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends RigidBody3D
|
||||
|
||||
func _ready() -> void:
|
||||
linear_velocity = Vector3(
|
||||
randf_range(-1.5, 1.5),
|
||||
randf_range(4, 6),
|
||||
randf_range(-1.5, 1.5)
|
||||
)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
$Label.modulate.a -= delta * 0.8
|
||||
$Label.outline_modulate.a -= delta * 0.8
|
||||
|
||||
if $Label.modulate.a <= 0:
|
||||
queue_free()
|
||||
1
scripts/effects/damage_text.gd.uid
Normal file
1
scripts/effects/damage_text.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dwcbey8lgg1p2
|
||||
|
|
@ -11,7 +11,7 @@ const weapons = {
|
|||
"damage_mid_combo": 10,
|
||||
|
||||
"knockback": 3.5,
|
||||
"knockback_mid_combo": 0.25,
|
||||
"knockback_mid_combo": 0.75,
|
||||
"stun_time": 0.4,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,8 +137,7 @@ func _physics_process(delta: float) -> void:
|
|||
var slash = load("res://scenes/effects/slash.tscn").instantiate()
|
||||
game.add_child(slash)
|
||||
slash.global_position = global_position
|
||||
slash.rotation.x = face_rotation
|
||||
slash.rotation.z = -mouse_point_angle + deg_to_rad(180)
|
||||
slash.global_rotation.y = $HitCollision.global_rotation.y + deg_to_rad(180)
|
||||
slash.play_effect()
|
||||
|
||||
var hits = $HitCollision.get_overlapping_bodies()
|
||||
|
|
@ -183,6 +182,11 @@ func _physics_process(delta: float) -> void:
|
|||
if "on_knockback" in body:
|
||||
body.on_knockback()
|
||||
|
||||
var damage_text = preload("res://scenes/effects/damage_text.tscn").instantiate()
|
||||
game.add_child(damage_text)
|
||||
damage_text.global_position = body.global_position
|
||||
damage_text.get_node("Label").text = str(floor(damage))
|
||||
|
||||
var direction = (camera.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if direction and (knockback_time <= 0):
|
||||
velocity.x = direction.x * SPEED
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ const JUMP_VELOCITY = 4.5
|
|||
var face_rotation = null
|
||||
var face_left = false
|
||||
|
||||
var combatable = false
|
||||
var health = 40
|
||||
var health = 35
|
||||
var mid_knockback = false
|
||||
|
||||
@onready var player = get_parent().get_node("Player")
|
||||
|
|
@ -17,6 +16,7 @@ enum {
|
|||
STATE_JUMP,
|
||||
STATE_LEAP,
|
||||
STATE_HIT,
|
||||
STATE_DEATH
|
||||
}
|
||||
|
||||
var state = STATE_IDLE
|
||||
|
|
@ -40,9 +40,10 @@ func _ready() -> void:
|
|||
$Body/Animator.play("idle")
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if health <= 0:
|
||||
queue_free()
|
||||
return
|
||||
if (health <= 0) and (state != STATE_DEATH):
|
||||
state = STATE_DEATH
|
||||
state_timer = 0.75
|
||||
$Body/Animator.play("jump")
|
||||
|
||||
state_timer -= delta
|
||||
|
||||
|
|
@ -59,6 +60,9 @@ func _physics_process(delta: float) -> void:
|
|||
velocity = global_position.direction_to(player.global_position) * 3
|
||||
velocity.y = 3
|
||||
|
||||
elif state == STATE_DEATH:
|
||||
queue_free()
|
||||
|
||||
elif (state == STATE_LEAP) and is_on_floor():
|
||||
state = STATE_IDLE
|
||||
state_timer = randf_range(0.8, 1.5)
|
||||
|
|
@ -69,6 +73,8 @@ func _physics_process(delta: float) -> void:
|
|||
state_timer = 0.5
|
||||
|
||||
$Body/Animator.play("idle")
|
||||
elif (state == STATE_DEATH):
|
||||
pass
|
||||
|
||||
if iframes > 0:
|
||||
iframes -= delta
|
||||
|
|
@ -76,7 +82,7 @@ func _physics_process(delta: float) -> void:
|
|||
else:
|
||||
$Body.modulate.a = 1
|
||||
|
||||
$HealthLabel.text = str(health)
|
||||
#wa$HealthLabel.text = str(health)
|
||||
|
||||
if not is_on_floor():
|
||||
velocity += get_gravity() * delta
|
||||
|
|
@ -89,20 +95,7 @@ func _physics_process(delta: float) -> void:
|
|||
else:
|
||||
$Body.rotation.y = face_rotation
|
||||
|
||||
|
||||
var input_dir := Vector2.ZERO
|
||||
if not combatable:
|
||||
if input_dir.x > 0:
|
||||
face_left = false
|
||||
if input_dir.x < 0:
|
||||
face_left = true
|
||||
|
||||
var direction = (camera.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if is_on_floor() and not mid_knockback:
|
||||
if direction:
|
||||
velocity.x = direction.x * SPEED
|
||||
velocity.z = direction.z * SPEED
|
||||
else:
|
||||
velocity.x = move_toward(velocity.x, 0, delta * 16)
|
||||
velocity.z = move_toward(velocity.z, 0, delta * 16)
|
||||
|
||||
|
|
|
|||
14
shaders/groundtest.gdshader
Normal file
14
shaders/groundtest.gdshader
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
shader_type spatial;
|
||||
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Called for every pixel the material is visible on.
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the material.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
1
shaders/groundtest.gdshader.uid
Normal file
1
shaders/groundtest.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://fqithquavabo
|
||||
BIN
textures/brightshroom.png
Normal file
BIN
textures/brightshroom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
41
textures/brightshroom.png.import
Normal file
41
textures/brightshroom.png.import
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ln2b0h7jurye"
|
||||
path.s3tc="res://.godot/imported/brightshroom.png-ff1df663a97bff5daeebf3c65af42c56.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://textures/brightshroom.png"
|
||||
dest_files=["res://.godot/imported/brightshroom.png-ff1df663a97bff5daeebf3c65af42c56.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
textures/brightshroom_orange.png
Normal file
BIN
textures/brightshroom_orange.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
41
textures/brightshroom_orange.png.import
Normal file
41
textures/brightshroom_orange.png.import
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://gotb5lmbe8ve"
|
||||
path.s3tc="res://.godot/imported/brightshroom_orange.png-e0054b8f0907ffc7d2760c8c0dbf722d.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://textures/brightshroom_orange.png"
|
||||
dest_files=["res://.godot/imported/brightshroom_orange.png-e0054b8f0907ffc7d2760c8c0dbf722d.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
textures/tile/stone_floor.png
Normal file
BIN
textures/tile/stone_floor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 500 B |
41
textures/tile/stone_floor.png.import
Normal file
41
textures/tile/stone_floor.png.import
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dfcoremq6wxa"
|
||||
path.s3tc="res://.godot/imported/stone_floor.png-a60dbfe12b4382aa7bd47bad794f7b31.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://textures/tile/stone_floor.png"
|
||||
dest_files=["res://.godot/imported/stone_floor.png-a60dbfe12b4382aa7bd47bad794f7b31.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
Loading…
Reference in a new issue