Win, lose screen. Game version info. Matador a lot more aggressive/wins easier (tweaks needed). No more score/combo/waves

This commit is contained in:
2026-07-30 12:39:51 +03:00
parent ebb6ec6335
commit bf7a454ad0
28 changed files with 1229 additions and 451 deletions
+30 -3
View File
@@ -16,6 +16,12 @@ var _shake_amount: float = 0.0
var _shake_decay: float = 0.0
var _user_fov: float = 0.0
# Trailing-camera state: _focus is the smoothed point the camera frames (it lags
# the bull), _drag_offset is the velocity-driven trail that slides it behind.
var _focus: Vector3 = Vector3.ZERO
var _drag_offset: Vector3 = Vector3.ZERO
var _focus_init: bool = false
func _ready() -> void:
set_as_top_level(true)
@@ -48,11 +54,12 @@ func _process(delta: float) -> void:
)
var target := get_parent() as Node3D
var focus := _drag_focus(target, delta)
global_position = target.global_position + offset
look_at(target.global_position, Vector3.UP)
global_position = focus + offset
look_at(focus, Vector3.UP)
_update_dof(target.global_position)
_update_dof(focus)
if _shake_amount > 0.005:
global_position += Vector3(
@@ -64,6 +71,26 @@ func _process(delta: float) -> void:
_shake_amount = move_toward(_shake_amount, 0.0, _shake_decay * delta)
# Smoothed follow point that drags behind the bull. The target trail sits opposite
# the bull's flat velocity (cam_drag metres per m/s); the offset and the focus both
# ease toward their targets so the camera lags and settles rather than snapping.
func _drag_focus(target: Node3D, delta: float) -> Vector3:
var pos := target.global_position
if not _focus_init:
_focus = pos
_focus_init = true
var vel := Vector3.ZERO
if target is CharacterBody3D:
vel = (target as CharacterBody3D).velocity
vel.y = 0.0
var drag_target := -vel * DP.f("cam_drag")
_drag_offset = _drag_offset.lerp(drag_target, clampf(DP.f("cam_drag_speed") * delta, 0.0, 1.0))
_focus = _focus.lerp(pos + _drag_offset, clampf(DP.f("cam_follow_lerp") * delta, 0.0, 1.0))
return _focus
func trigger_hit(strength: float) -> void:
_shake_amount = strength * 0.5
_shake_decay = _shake_amount / 0.4