A game where you get to play as a slime, made with Godot.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

13 lines
341 B

@tool
extends Button
@export var on_texture : Texture2D
@export var off_texture : Texture2D
@export var modifier_key : Key
func _toggled(on: bool) -> void:
icon = on_texture if on else off_texture
func _input(event: InputEvent) -> void:
if event is InputEventKey and event.keycode == modifier_key:
button_pressed = !button_pressed