extends Area3D
var Bullet = preload("res://EL PROTAGONISTA/BALA PROYECTIL/PROYECTIL.tscn")
#var Bullet2 = preload("res://EL PROTAGONISTA/FOGONAZO PISTOLA/cpu_particles_3dfogonazo.tscn")
func _ready() -> void:
pass # Replace with function body.
func _input(event):
if event is InputEventMouseButton:
if event.button_index == 1 and event.pressed :
#event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
var bullet = Bullet.instantiate()
#var bullet2 = Bullet2.instantiate()
add_child(bullet)
#add_child(bullet2)
func _unhandled_input(event):
if event is InputEventKey and event.pressed:
if event.keycode == KEY_W:
translate(Vector3(0, 0, 0) * get_process_delta_time()) # Temporary movement (consider physics)
#if event.keycode == KEY_
#apply_impulse(Vector3(0,40,4))#ORIGINAL
if event.keycode == KEY_Z:
rotate_x(0.02)
pass
if event.keycode == KEY_X:
rotate_x(-0.02)
pass
if event is InputEventMouseButton:
if event.pressed and event.is_action("mouse_rueda_arriba"):
#if event.action == "mouse_rueda_arriba":
rotate_x(-0.02)
elif event.pressed and event.is_action("mouse_rueda_avajo"):
#elif event.action == "mouse_rueda_avajo":
rotate_x(0.02)
pass
No hay comentarios:
Publicar un comentario