benitier
This commit is contained in:
@@ -13,6 +13,7 @@ extends CharacterBody3D
|
||||
@export var head: Node3D
|
||||
@export var anim: AnimationPlayer
|
||||
@export var particules: GPUParticles3D
|
||||
@export var canvas: CanvasLayer
|
||||
|
||||
var time_hand: float= 0
|
||||
var nbr_particules = 1000
|
||||
@@ -21,12 +22,11 @@ func _ready() -> void:
|
||||
time_hand = cooldown
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
add_to_group("player")
|
||||
canvas.call("display_song_name", "Clic gauche pour se repérer.")
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseMotion:
|
||||
#head.rotate_x(-event.relative.y * SENSI)
|
||||
rotate_y(-event.relative.x * SENSI)
|
||||
#head.rotation.x = clamp(head.rotation.x, -PI/2, PI/2)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
time_hand += delta
|
||||
@@ -47,7 +47,7 @@ func _physics_process(delta: float) -> void:
|
||||
particules.amount = nbr_particules
|
||||
nbr_particules /= 2
|
||||
nbr_particules = clamp(nbr_particules, MIN_PARTICULES, MAX_PARTICULES)
|
||||
print(nbr_particules)
|
||||
|
||||
particules.process_material.set("gravity", vect)
|
||||
anim.play("finger")
|
||||
|
||||
@@ -64,3 +64,5 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
func drink() -> void:
|
||||
nbr_particules = MAX_PARTICULES
|
||||
func display_drink()->void:
|
||||
canvas.call("display_song_name", "E pour boire.")
|
||||
|
||||
Reference in New Issue
Block a user