fix post-proto
* ajout d'un fondu de musique au changement de phase * résolution de bugs en tout genre
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends SubViewportContainer
|
||||
extends MarginContainer
|
||||
class_name CardVisualiser
|
||||
|
||||
signal clicked(c: CardVisualiser)
|
||||
@@ -7,6 +7,8 @@ signal clicked(c: CardVisualiser)
|
||||
const MAX_ROT = 15
|
||||
const ZOOM_SCALE = 1.2
|
||||
|
||||
const MARGIN = 25
|
||||
|
||||
var wanted_rot : Vector2 = Vector2.ZERO
|
||||
var real_rot : Vector2 = Vector2.ZERO
|
||||
|
||||
@@ -51,7 +53,7 @@ func _input(event):
|
||||
clicked.emit(self)
|
||||
|
||||
func _ready():
|
||||
material = material.duplicate()
|
||||
%SubViewportContainer.material = %SubViewportContainer.material.duplicate()
|
||||
update()
|
||||
is_ready = true
|
||||
|
||||
@@ -69,13 +71,14 @@ func _process(_d):
|
||||
|
||||
real_rot = real_rot.lerp(wanted_rot, 0.1)
|
||||
|
||||
material.set_shader_parameter("y_rot", - real_rot.x)
|
||||
material.set_shader_parameter("x_rot", real_rot.y)
|
||||
%SubViewportContainer.material.set_shader_parameter("y_rot", - real_rot.x)
|
||||
%SubViewportContainer.material.set_shader_parameter("x_rot", real_rot.y)
|
||||
|
||||
%Card.custom_minimum_size.x = card_width
|
||||
%CardContainer.size.y = 0
|
||||
%CardContainer.size = Vector2.ZERO
|
||||
%SubViewport.size = %CardContainer.size
|
||||
size = %SubViewport.size
|
||||
%SubViewportContainer.size = %SubViewport.size
|
||||
size = %SubViewportContainer.size - (Vector2.ONE * MARGIN * 2)
|
||||
|
||||
|
||||
func is_mouse_over() -> bool:
|
||||
|
||||
Reference in New Issue
Block a user