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