My first 3D game with Godot 4.4
This commit is contained in:
10
mob/bat_model.gd
Normal file
10
mob/bat_model.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends Node3D
|
||||
|
||||
@onready var animation_tree: AnimationTree = %AnimationTree
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
func hurt() -> void:
|
||||
animation_tree.set("parameters/OneShot/request", true)
|
||||
|
||||
func die() -> void:
|
||||
animation_player.pause()
|
||||
Reference in New Issue
Block a user