using Godot; namespace Newlon.Components.GUI.Seedpackets; public partial class Seedpacket : TextureButton { public static AudioStream TapStream; public static AudioStream UntapStream; public static AudioStream LiftStream; private const string PATH_TO_PACKED_SCENE = "res://scenes/gui/seedpacket.tscn"; private DisplayResource _resource; private Label _cost; private TextureRect _icon; private Timer _timer; private SeedpacketHandler _handler; public bool disablePacket = false; public static PackedScene Prefab { get; private set; } // Node overrides public override void _Ready() { if (TapStream == null) { TapStream = ResourceLoader.Load("res://assets/audio/gui/tap.mp3"); UntapStream = ResourceLoader.Load("res://assets/audio/gui/tap2.mp3"); LiftStream = ResourceLoader.Load("res://assets/audio/gui/seedlift.mp3"); } if (_resource != null) UpdateContents(); if (Prefab == null) { Prefab = ResourceLoader.Load(PATH_TO_PACKED_SCENE); } _cost = GetNode