PirateTreasureHunt/scenes/water.gd

15 lines
305 B
GDScript
Raw Normal View History

2021-08-09 00:27:53 +02:00
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)