martes, 4 de junio de 2024

instanciando con godot 4.2 al soltar el boton del mouse;

 extends MeshInstance3D


var Bullet = preload("res://INMUEBLES/ARMAS/espada_2.tscn")

# Called when the node enters the scene tree for the first time.

func _ready():


pass # Replace with function body.



# Called every frame. 'delta' is the elapsed time since the previous frame.

func _process(delta):


$AnimationPlayer.play("ESPADAENALTO")

pass

func _input(event):


if event is InputEventMouseButton:


if event.button_index == 1 and not event.pressed :

#aparece = false

var bullet = Bullet.instantiate()



add_child(bullet)




#queue_free()



#func _input(event):


#if event is InputEventMouseButton:


#if event.button_index == 1 and not event.pressed :

#aparece = true

#queue_free()

No hay comentarios:

Publicar un comentario