Example #1
0
        public static InventoryItem FromMetadata(MetadataLoader.Metadata resource)
        {
            var item = new InventoryItem();

            item.Icon = resource.Icon;
            item.Id   = resource.Id;
            return(item);
        }
Example #2
0
        public static void Transition(MetadataLoader.Metadata toZoneData)
        {
            if (!IsInstanceValid(_instance))
            {
                Logger.Error("ZoneTransitioner instance was not valid.");
                return;
            }

            foreach (var child in _instance._viewport.GetChildren <Node>())
            {
                child.GetParent().RemoveChild(child);
                child.QueueFree();
            }

            _instance.CallDeferred(nameof(SwapZone), toZoneData.ResourcePath);
        }
Example #3
0
 private static void ShowZone(MetadataLoader.Metadata metadata)
 {
     _nameLabel.Text = "To " + metadata.DisplayName;
     ShowTooltip();
 }
Example #4
0
 private static void ShowEntity(MetadataLoader.Metadata metadata)
 {
     _nameLabel.Text = metadata.DisplayName;
     _talkLabel.Show();
     ShowTooltip();
 }
Example #5
0
 private static void ShowItem(MetadataLoader.Metadata metadata)
 {
     _nameLabel.Text = metadata.DisplayName;
     _pickupLabel.Show();
     ShowTooltip();
 }
Example #6
0
 public static void TransitionToArea(MetadataLoader.Metadata toZoneData, int zoneTransitionAreaIndex)
 {
     _instance._zoneTransitionAreaIndex = zoneTransitionAreaIndex;
     Transition(toZoneData);
 }