bear fx v2

This commit is contained in:
2026-08-28 21:43:59 +03:00
parent 6b6a926715
commit 41f18cb5d6
16 changed files with 3483 additions and 294 deletions
+9 -6
View File
@@ -3,30 +3,33 @@ extends Node3D
# Get a reference to the Bear_FX AnimationPlayer node
@onready var fx_player: AnimationPlayer = $Bear_FX/AnimationPlayer
# Preloads the material into memory before the scene even instantiates
@onready var claw_fx_material: StandardMaterial3D = preload("res://Materials/M_bear_claw_fx.tres")
func _ready() -> void:
# Apply it instantly to a mesh as soon as the level starts
$Bear_FX/Bear_fx_claw_attack_L.material_override = claw_fx_material
$Bear_FX/Bear_fx_claw_attack_R.material_override = claw_fx_material
func bear_fx_jump_smash():
$Bear_FX/Bear_fx_jump_smash.visible = true
# Play the jump smash animation when the mesh turns on
fx_player.play("Bear_fx_jump_smash")
func bear_fx_claw_attack_R():
$Bear_FX/Bear_fx_claw_attack_R.visible = true
# Play the jump smash animation when the mesh turns on
fx_player.play("Bear_fx_claw_attack_R")
func bear_fx_claw_attack_L():
$Bear_FX/Bear_fx_claw_attack_L.visible = true
# Play the jump smash animation when the mesh turns on
fx_player.play("Bear_fx_claw_attack_L")
func bear_fx_smash_hit():
$Bear_FX/Bear_fx_smash_hit.visible = true
# Play the jump smash animation when the mesh turns on
fx_player.play("Bear_fx_smash_hit")
func mesh_off():
$Bear_FX/Bear_fx_smash_hit.visible = false
$Bear_FX/Bear_fx_claw_attack_L.visible = false
$Bear_FX/Bear_fx_claw_attack_R.visible = false
$Bear_FX/Bear_fx_jump_smash.visible = false