PirateTreasureHunt/scenes/water.gd

15 lines
305 B
GDScript

tool
extends Sprite
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func calculate_aspect_ratio():
material.set_shader_param("aspect_ratio", scale.y / scale.x)