Replace dasher-pack with unified animation-pack using original Blender bone names
This commit is contained in:
+24
-29
@@ -247,10 +247,7 @@ func _ready():
|
||||
# Visible to all human players. Green for local player, Red for others.
|
||||
var pointer = get_node_or_null("CharacterPointer")
|
||||
|
||||
# === Dasher animations are loaded statically via player.tscn ext_resource ===
|
||||
# The dasher-pack.tres AnimationLibrary is referenced on the AnimationPlayer
|
||||
# node as a second library ("dasher-pack"). See tools/convert_dasher_animations.gd
|
||||
# and tools/build_dasher_pack.gd to regenerate the .tres from the source .glb files.
|
||||
# === All animations loaded from animation-pack (built from animation-0.glb) ===
|
||||
if pointer:
|
||||
pointer.visible = true
|
||||
|
||||
@@ -376,9 +373,7 @@ func _init_floor_spawn_anchor():
|
||||
floor_spawn_top.reparent(floor_spawn_anchor, false)
|
||||
|
||||
func _load_dasher_animations():
|
||||
# Deprecated: dasher animations are now loaded statically via the
|
||||
# dasher-pack.tres AnimationLibrary referenced on the AnimationPlayer node
|
||||
# in player.tscn. Keep this stub for backward compatibility / no-op.
|
||||
# Deprecated: dasher animations merged into animation-pack.
|
||||
pass
|
||||
|
||||
@onready var floor_spawn_bot: AnimatedSprite3D = $floor_spawn_bot
|
||||
@@ -651,7 +646,7 @@ const ANIMATION_SPEED: float = 2.0
|
||||
|
||||
func play_walk_animation() -> void:
|
||||
"""Play walking animation at increased speed."""
|
||||
if is_carrying_tekton and anim_player and anim_player.has_animation("dasher-pack/dasher_hold"):
|
||||
if is_carrying_tekton and anim_player and anim_player.has_animation("animation-pack/holding_1"):
|
||||
return # Let dasher_hold keep playing
|
||||
if anim_player and anim_player.has_animation("animation-pack/walk_forward"):
|
||||
anim_player.play("animation-pack/walk_forward", -1, ANIMATION_SPEED)
|
||||
@@ -673,7 +668,7 @@ func play_special_animation() -> void:
|
||||
|
||||
func play_idle_animation() -> void:
|
||||
"""Play idle animation at normal speed."""
|
||||
if is_carrying_tekton and anim_player and anim_player.has_animation("dasher-pack/dasher_hold"):
|
||||
if is_carrying_tekton and anim_player and anim_player.has_animation("animation-pack/holding_1"):
|
||||
return # Let dasher_hold keep playing
|
||||
if anim_player and anim_player.has_animation("animation-pack/idle"):
|
||||
anim_player.play("animation-pack/idle")
|
||||
@@ -973,10 +968,10 @@ func apply_stagger(duration: float = 1.5):
|
||||
|
||||
# Play knock VFX sequence on the receiver
|
||||
_play_knock_vfx()
|
||||
if anim_player and anim_player.has_animation("dasher-pack/dasher_getting_hit"):
|
||||
anim_player.play("dasher-pack/dasher_getting_hit")
|
||||
if anim_player.has_animation("dasher-pack/dasher_stun"):
|
||||
anim_player.queue("dasher-pack/dasher_stun")
|
||||
if anim_player and anim_player.has_animation("animation-pack/getting_hit_1"):
|
||||
anim_player.play("animation-pack/getting_hit_1")
|
||||
if anim_player.has_animation("animation-pack/stun_1"):
|
||||
anim_player.queue("animation-pack/stun_1")
|
||||
|
||||
# Set immunity (3 seconds as requested)
|
||||
immunity_timer = 3.0
|
||||
@@ -2415,10 +2410,10 @@ func sync_snatch_tekton(carrier_path: NodePath, tekton_path: NodePath):
|
||||
is_charged_strike = false
|
||||
|
||||
SfxManager.play("pick_up_tekton_roaming")
|
||||
if anim_player and anim_player.has_animation("dasher-pack/dasher_take"):
|
||||
anim_player.play("dasher-pack/dasher_take")
|
||||
if anim_player.has_animation("dasher-pack/dasher_hold"):
|
||||
anim_player.queue("dasher-pack/dasher_hold")
|
||||
if anim_player and anim_player.has_animation("animation-pack/pickup_1"):
|
||||
anim_player.play("animation-pack/pickup_1")
|
||||
if anim_player.has_animation("animation-pack/holding_1"):
|
||||
anim_player.queue("animation-pack/holding_1")
|
||||
|
||||
# Visual feedback for the victim
|
||||
if carrier.has_method("sync_bump"):
|
||||
@@ -2431,10 +2426,10 @@ func sync_snatch_tekton(carrier_path: NodePath, tekton_path: NodePath):
|
||||
func sync_grab_tekton(tekton_path: NodePath):
|
||||
var tekton = get_node_or_null(tekton_path)
|
||||
if tekton:
|
||||
if anim_player and anim_player.has_animation("dasher-pack/dasher_take"):
|
||||
anim_player.play("dasher-pack/dasher_take")
|
||||
if anim_player.has_animation("dasher-pack/dasher_hold"):
|
||||
anim_player.queue("dasher-pack/dasher_hold")
|
||||
if anim_player and anim_player.has_animation("animation-pack/pickup_1"):
|
||||
anim_player.play("animation-pack/pickup_1")
|
||||
if anim_player.has_animation("animation-pack/holding_1"):
|
||||
anim_player.queue("animation-pack/holding_1")
|
||||
|
||||
carried_tekton = tekton
|
||||
self.is_carrying_tekton = true
|
||||
@@ -2482,8 +2477,8 @@ func throw_tekton():
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func sync_throw_tekton(target_pos: Vector2i):
|
||||
if anim_player and anim_player.has_animation("dasher-pack/dasher_put"):
|
||||
anim_player.play("dasher-pack/dasher_put")
|
||||
if anim_player and anim_player.has_animation("animation-pack/put_1"):
|
||||
anim_player.play("animation-pack/put_1")
|
||||
if carried_tekton:
|
||||
var tekton = carried_tekton
|
||||
carried_tekton = null
|
||||
@@ -2567,8 +2562,8 @@ func drop_tekton():
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func sync_drop_tekton():
|
||||
if anim_player and anim_player.has_animation("dasher-pack/dasher_put"):
|
||||
anim_player.play("dasher-pack/dasher_put")
|
||||
if anim_player and anim_player.has_animation("animation-pack/put_1"):
|
||||
anim_player.play("animation-pack/put_1")
|
||||
if carried_tekton:
|
||||
var tekton = carried_tekton
|
||||
carried_tekton = null
|
||||
@@ -2606,8 +2601,8 @@ func update_active_player_indicator():
|
||||
@rpc("any_peer", "call_local", "unreliable")
|
||||
func sync_bump(target_pos: Vector2i, is_soft: bool = false):
|
||||
"""Visual attack 'bump' or collision animation."""
|
||||
if not is_soft and anim_player and anim_player.has_animation("dasher-pack/dasher_hit"):
|
||||
anim_player.play("dasher-pack/dasher_hit")
|
||||
if not is_soft and anim_player and anim_player.has_animation("animation-pack/hit_1"):
|
||||
anim_player.play("animation-pack/hit_1")
|
||||
# Always return to LOGICAL position to prevent character drift!
|
||||
var original_pos = grid_to_world(current_position)
|
||||
var target_world = grid_to_world(target_pos)
|
||||
@@ -2654,8 +2649,8 @@ func knock_tekton():
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func sync_knock_tekton(tekton_path: NodePath):
|
||||
if anim_player and anim_player.has_animation("dasher-pack/dasher_hit"):
|
||||
anim_player.play("dasher-pack/dasher_hit")
|
||||
if anim_player and anim_player.has_animation("animation-pack/hit_1"):
|
||||
anim_player.play("animation-pack/hit_1")
|
||||
var tekton = get_node_or_null(tekton_path)
|
||||
if tekton:
|
||||
# Intensity 2.0 for knock (drops 200% tiles) + Shrink/Recover
|
||||
|
||||
+5
-7
@@ -1,13 +1,12 @@
|
||||
[gd_scene format=3 uid="uid://1dbdbg3q5778"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c78jcadupsdro" path="res://scenes/player.gd" id="1_qecr4"]
|
||||
[ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="2_3e0d5"]
|
||||
[ext_resource type="PackedScene" uid="uid://5qdk1umx2rjf" path="res://assets/characters/Bob.glb" id="2_3e0d5"]
|
||||
[ext_resource type="Texture2D" uid="uid://b4y41h16q6m34" path="res://assets/textures/bub.png" id="2_5w327"]
|
||||
[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="2_mjsl8"]
|
||||
[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_3tlf6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="5_alfd1"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://nsko4grplr5m" path="res://assets/characters/animations/dasher-pack.res" id="6a_dashp"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="6_5oq5w"]
|
||||
[ext_resource type="PackedScene" uid="uid://cfjx66gthp1c5" path="res://assets/characters/Masbro.glb" id="2_mjsl8"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfujakntxa0v6" path="res://assets/characters/Gatot.glb" id="4_3tlf6"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxvbrdybeglt5" path="res://assets/characters/Oldpop.glb" id="5_alfd1"]
|
||||
[ext_resource type="AnimationLibrary" path="res://assets/characters/animations/animation-pack.res" id="6_5oq5w"]
|
||||
[ext_resource type="Script" uid="uid://cwwwixc07jc86" path="res://scripts/bot_controller.gd" id="7_botctrl"]
|
||||
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="8_y4r1p"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://7r0qbbm88vfy" path="res://assets/graphics/vfx/effects/animation-head.tres" id="10_y4r1p"]
|
||||
@@ -53,7 +52,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1085499957]
|
||||
root_node = NodePath("../Oldpop")
|
||||
libraries/animation-pack = ExtResource("6_5oq5w")
|
||||
libraries/dasher-pack = ExtResource("6a_dashp")
|
||||
|
||||
[node name="CharacterPointer" type="MeshInstance3D" parent="." unique_id=1262762501]
|
||||
transform = Transform3D(0.3535534, 0, 0.35355335, 0, 0.5, 0, -0.35355335, 0, 0.3535534, 0, -0.468462, 0)
|
||||
|
||||
@@ -186,7 +186,7 @@ _data = {
|
||||
}
|
||||
|
||||
[node name="ted_mesh" type="Node3D" unique_id=1849786869]
|
||||
transform = Transform3D(0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 0, 0, 0)
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0)
|
||||
|
||||
[node name="Throwing Tiles" type="Node3D" parent="." unique_id=1204344089]
|
||||
transform = Transform3D(0.9161078, 0, -0.032035157, 0, 0.91666764, 0, 0.032035157, 0, 0.9161078, -0.046623886, 0, 0.19667524)
|
||||
|
||||
Reference in New Issue
Block a user