more ui tweaks and started on enemy health bar

This commit is contained in:
derek
2025-03-19 17:00:08 -05:00
parent 573a20cfa8
commit b85014c48b
13 changed files with 87 additions and 1 deletions

Binary file not shown.

View File

@@ -0,0 +1,53 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cuay53oecttal"
path="res://.godot/imported/RailYard1.blend-a493b8419dd53d2b283ef76110b9b05a.scn"
[deps]
source_file="res://assets/LevelBlockouts/RailYard1.blend"
dest_files=["res://.godot/imported/RailYard1.blend-a493b8419dd53d2b283ef76110b9b05a.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

Binary file not shown.

View File

@@ -1,10 +1,11 @@
[gd_scene load_steps=96 format=4 uid="uid://djr7vnr1hcx82"]
[gd_scene load_steps=97 format=4 uid="uid://djr7vnr1hcx82"]
[ext_resource type="Script" uid="uid://cdofgtwevbray" path="res://scripts/spider.gd" id="1_7e7fe"]
[ext_resource type="PackedScene" uid="uid://h5ojldugfyyu" path="res://assets/bullet_enemy.tscn" id="2_aew5r"]
[ext_resource type="PackedScene" uid="uid://5jhwtkdggfle" path="res://assets/Enemy_casing.tscn" id="3_e5ft5"]
[ext_resource type="AudioStream" uid="uid://cx016r7bsnadg" path="res://assets/Audio/quartz-crystal-singing-bowl-13-inch-a-rub-rim-suede-mallet-SBA-300114282.wav" id="4_pyp22"]
[ext_resource type="Script" uid="uid://dxkkrhlk2crqm" path="res://scripts/EnemyTarget.gd" id="7_8vkma"]
[ext_resource type="Script" uid="uid://dfc80ru6aro15" path="res://scripts/3D Health Bar.gd" id="7_87l3v"]
[ext_resource type="Material" uid="uid://bjx8uqmdo7d3j" path="res://assets/spider2.turret.tres" id="7_d5oc0"]
[ext_resource type="PackedScene" uid="uid://b0rkkp07y3fnu" path="res://assets/die_particles.tscn" id="7_w22oa"]
[ext_resource type="Texture2D" uid="uid://ed2omoi280jl" path="res://assets/Models/SubstancePainterTest/spider-LOW_spider1.gunbarrel_BaseColor.png" id="8_87l3v"]
@@ -1173,6 +1174,18 @@ die_particles = ExtResource("7_w22oa")
damage_number = ExtResource("9_rmegy")
taunts = Array[String](["did i do that?", "you've been on my shitlist", "you like that?? you want more??", "you should try dodging", "schwing!", "hows your gut now you big cup of dumdum juice?!"])
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.02607, 0)
[node name="SubViewport" type="SubViewport" parent="Sprite3D"]
[node name="Control" type="Control" parent="Sprite3D/SubViewport"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("7_87l3v")
[node name="TurretLook" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00161432, 1.62046, 0.00134204)
target_position = Vector3(0, 0, -50)

View File

@@ -0,0 +1,3 @@
[gd_scene format=3 uid="uid://ir5l53ubcnpa"]
[node name="WeaponPickup" type="Node3D"]

View File

@@ -19,6 +19,7 @@ fov_zoom_amt = 0.98
crosshair_radius = 50
ads = false
recoil_amount = Vector3(0.05, 0.05, 0.05)
crosshair_jump_amount = 10
kick_amount = 0.1
max_ammo = 20
start_mags = 3

View File

@@ -15,6 +15,7 @@ fov_zoom_amt = 0.98
crosshair_radius = 100
ads = false
recoil_amount = Vector3(0, 0.05, 0.05)
crosshair_jump_amount = 10
kick_amount = 0.1
max_ammo = 0
start_mags = 0

View File

@@ -19,6 +19,7 @@ fov_zoom_amt = 0.98
crosshair_radius = 25
ads = false
recoil_amount = Vector3(0.05, 0.05, 0.05)
crosshair_jump_amount = 10
kick_amount = 0.1
max_ammo = 15
start_mags = 3

View File

@@ -18,6 +18,7 @@ fov_zoom_amt = 0.85
crosshair_radius = 25
ads = false
recoil_amount = Vector3(0.2, 0.05, 0.05)
crosshair_jump_amount = 10
kick_amount = 0.1
max_ammo = 6
start_mags = 1

7
scripts/3D Health Bar.gd Normal file
View File

@@ -0,0 +1,7 @@
extends Control
func _process(delta: float) -> void:
queue_redraw()
func _draw() -> void:
draw_circle(Vector2.ZERO,0,Color(1,1,1,1),true,10,true)

View File

@@ -0,0 +1 @@
uid://dfc80ru6aro15

View File

@@ -27,6 +27,7 @@ var crosshair_target
@onready var pickup_item_indicator = preload("res://assets/pickup_item_indicator.tscn")
@onready var wobble_items: Control = $WobbleItems
const STAM_BAR_MAX_OPACITY = 1.0
const CROSSHAIR_SIZE = Vector2(40,40)
@@ -58,6 +59,7 @@ func _ready() -> void:
func _process(delta: float) -> void:
player = level_control.player
if player != null:
#HEALTH
@@ -82,6 +84,7 @@ func _process(delta: float) -> void:
money.text = "$" + str(money_count)
if player.gun != null and player.gun.weapon_info.weapon_type == 0:
if GameGlobals.gun_ammo.has(player.gun.weapon_info.gun_name) and GameGlobals.gun_ammo[player.gun.weapon_info.gun_name] != null:
ammo_counter.visible = true

View File

@@ -280,6 +280,8 @@ func bullet_fire():
func can_fire():
if anim_player.is_playing() and anim_player.current_animation == "reload":
return false
elif weapon_info.weapon_type == 0 and GameGlobals.gun_ammo[weapon_info.gun_name] <= 0:
return false
else:
return true