├── GDS ├── Core │ ├── Resources │ │ ├── Shared │ │ │ ├── Themes │ │ │ │ ├── DefaultRuntimeTheme.tss │ │ │ │ └── DefaultRuntimeTheme.tss.meta │ │ │ ├── Sfx │ │ │ │ ├── drop.mp3 │ │ │ │ ├── pick.mp3 │ │ │ │ ├── place.mp3 │ │ │ │ ├── anvil-strikes.mp3 │ │ │ │ ├── coin-drop-buy.mp3 │ │ │ │ ├── negative-blip.wav │ │ │ │ ├── coin-drop-sell.mp3 │ │ │ │ ├── drop.mp3.meta │ │ │ │ ├── pick.mp3.meta │ │ │ │ ├── place.mp3.meta │ │ │ │ ├── anvil-strikes.mp3.meta │ │ │ │ ├── coin-drop-buy.mp3.meta │ │ │ │ ├── negative-blip.wav.meta │ │ │ │ └── coin-drop-sell.mp3.meta │ │ │ ├── Images │ │ │ │ ├── items │ │ │ │ │ ├── axe.png │ │ │ │ │ ├── gem.png │ │ │ │ │ ├── mana.png │ │ │ │ │ ├── ring.PNG │ │ │ │ │ ├── wood.png │ │ │ │ │ ├── apple.png │ │ │ │ │ ├── armor.png │ │ │ │ │ ├── boots.png │ │ │ │ │ ├── cloak.png │ │ │ │ │ ├── gloves.PNG │ │ │ │ │ ├── helmet.png │ │ │ │ │ ├── potion.png │ │ │ │ │ ├── silver.png │ │ │ │ │ ├── sword.png │ │ │ │ │ ├── mushroom.png │ │ │ │ │ ├── necklace.png │ │ │ │ │ ├── sword-blue.png │ │ │ │ │ ├── wood.png.meta │ │ │ │ │ ├── mushroom.png.meta │ │ │ │ │ └── sword-blue.png.meta │ │ │ │ ├── ui │ │ │ │ │ ├── icon_coin.png │ │ │ │ │ ├── icon_clear.png │ │ │ │ │ ├── icon_coins.png │ │ │ │ │ ├── icon_piggy.png │ │ │ │ │ ├── icon_refresh.png │ │ │ │ │ └── icon-trash-can.png │ │ │ │ ├── Equipment │ │ │ │ │ ├── 64 │ │ │ │ │ │ ├── boots.png │ │ │ │ │ │ ├── gloves.png │ │ │ │ │ │ ├── helmet.png │ │ │ │ │ │ ├── pants.png │ │ │ │ │ │ ├── weapon.png │ │ │ │ │ │ ├── weapon2.png │ │ │ │ │ │ ├── body-armor.png │ │ │ │ │ │ ├── ranged-weapon.png │ │ │ │ │ │ ├── boots.png.meta │ │ │ │ │ │ ├── helmet.png.meta │ │ │ │ │ │ ├── weapon.png.meta │ │ │ │ │ │ └── body-armor.png.meta │ │ │ │ │ ├── 128 │ │ │ │ │ │ ├── bolts.png │ │ │ │ │ │ ├── boots.png │ │ │ │ │ │ ├── gloves.png │ │ │ │ │ │ ├── helmet.png │ │ │ │ │ │ ├── pants.png │ │ │ │ │ │ ├── weapon.png │ │ │ │ │ │ ├── weapon2.png │ │ │ │ │ │ ├── body-armor.png │ │ │ │ │ │ └── ranged-weapon.png │ │ │ │ │ ├── Transp │ │ │ │ │ │ ├── bolts.png │ │ │ │ │ │ ├── boots.png │ │ │ │ │ │ ├── pants.png │ │ │ │ │ │ ├── gloves.png │ │ │ │ │ │ ├── helmet.png │ │ │ │ │ │ ├── weapon.png │ │ │ │ │ │ ├── weapon2.png │ │ │ │ │ │ ├── body-armor.png │ │ │ │ │ │ └── ranged-weapon.png │ │ │ │ │ ├── 128.meta │ │ │ │ │ ├── 64.meta │ │ │ │ │ └── Transp.meta │ │ │ │ ├── backgrounds │ │ │ │ │ ├── bg-slot.png │ │ │ │ │ ├── bg-window.png │ │ │ │ │ ├── grunge-blue-64-64.png │ │ │ │ │ ├── grunge-brown-64-64.png │ │ │ │ │ ├── grunge-gray-64-64.png │ │ │ │ │ └── grunge-yellow-64-64.png │ │ │ │ ├── Art Credit.meta │ │ │ │ ├── items.meta │ │ │ │ ├── ui.meta │ │ │ │ ├── Equipment.meta │ │ │ │ ├── backgrounds.meta │ │ │ │ └── Art Credit │ │ │ ├── Sfx.meta │ │ │ ├── Images.meta │ │ │ ├── Styles.meta │ │ │ ├── Themes.meta │ │ │ └── Styles │ │ │ │ ├── Utility.uss.meta │ │ │ │ ├── UnityControls.uss.meta │ │ │ │ ├── Utility.uss │ │ │ │ └── UnityControls.uss │ │ └── Shared.meta │ ├── Dom.meta │ ├── GDS.Core.asmdef.meta │ ├── Utils.meta │ ├── Views.meta │ ├── Behaviors.meta │ ├── Editor.meta │ ├── Events.meta │ ├── Inventory.meta │ ├── Resources.meta │ ├── Views │ │ ├── Bag.meta │ │ ├── Item.meta │ │ ├── Slot.meta │ │ ├── Component.meta │ │ ├── Tooltip.meta │ │ ├── DropTarget.meta │ │ ├── Item │ │ │ ├── Renderer.meta │ │ │ ├── ItemView.cs.meta │ │ │ ├── Renderer │ │ │ │ ├── GhostItemRender.cs.meta │ │ │ │ └── GhostItemRender.cs │ │ │ └── ItemView.cs │ │ ├── LogMessage.meta │ │ ├── Bag │ │ │ ├── ListBagView.cs.meta │ │ │ └── ListBagView.cs │ │ ├── Slot │ │ │ ├── SlotView.cs.meta │ │ │ └── SlotView.cs │ │ ├── Component │ │ │ ├── Component.cs.meta │ │ │ └── Component.cs │ │ ├── Tooltip │ │ │ ├── TooltipView.cs.meta │ │ │ └── TooltipView.cs │ │ ├── DropTarget │ │ │ ├── DropTargetView.cs.meta │ │ │ └── DropTargetView.cs │ │ └── LogMessage │ │ │ ├── LogMessageView.cs.meta │ │ │ └── LogMessageView.cs │ ├── Editor │ │ ├── Core.Editor.asmdef.meta │ │ ├── PlayModeStateChanged.cs.meta │ │ ├── Core.Editor.asmdef │ │ └── PlayModeStateChanged.cs │ ├── Inventory │ │ ├── Types.meta │ │ ├── Constants.meta │ │ ├── Extensions.meta │ │ ├── Factory.meta │ │ ├── Observable.meta │ │ ├── Constants │ │ │ ├── Filters.cs │ │ │ ├── Filters.cs.meta │ │ │ ├── Sizes.cs.meta │ │ │ └── Sizes.cs │ │ ├── Types │ │ │ ├── Types.cs.meta │ │ │ └── Types.cs │ │ ├── __IsExternalInit.cs.meta │ │ ├── Observable │ │ │ ├── Observable.cs.meta │ │ │ └── Observable.cs │ │ ├── Factory │ │ │ ├── InventoryFactory.cs.meta │ │ │ └── InventoryFactory.cs │ │ ├── Extensions │ │ │ └── InventoryExtensions.cs.meta │ │ └── __IsExternalInit.cs │ ├── Dom │ │ ├── DomFactory.cs.meta │ │ └── DomFactory.cs │ ├── Events │ │ ├── EventBus.cs.meta │ │ ├── Events.cs.meta │ │ ├── EventBus.cs │ │ └── Events.cs │ ├── Utils │ │ ├── ColorUtil.cs.meta │ │ ├── DebugUtil.cs.meta │ │ ├── DomUtil.cs.meta │ │ ├── EnumUtil.cs.meta │ │ ├── ImageUtil.cs.meta │ │ ├── LogUtil.cs.meta │ │ ├── EnumUtil.cs │ │ ├── ImageUtil.cs │ │ ├── ColorUtil.cs │ │ ├── LogUtil.cs │ │ └── DebugUtil.cs │ ├── Behaviors │ │ └── Behaviors.cs.meta │ └── GDS.Core.asmdef ├── Demos │ ├── Minimal │ │ ├── Resources │ │ │ ├── Minimal │ │ │ │ ├── MinimalTheme.tss │ │ │ │ ├── MinimalTheme.tss.meta │ │ │ │ ├── MinimalStyles.uss.meta │ │ │ │ └── MinimalStyles.uss │ │ │ └── Minimal.meta │ │ ├── Minimal.unity.meta │ │ ├── Editor.meta │ │ ├── Minimal.asmdef.meta │ │ ├── Store.meta │ │ ├── Views.meta │ │ ├── Resources.meta │ │ ├── Editor │ │ │ ├── Minimal.Editor.asmdef.meta │ │ │ ├── Debug.cs.meta │ │ │ ├── MainWindow.cs.meta │ │ │ ├── Minimal.Editor.asmdef │ │ │ ├── MainWindow.cs │ │ │ └── Debug.cs │ │ ├── MinimalPanelSettings.asset.meta │ │ ├── Root.uxml │ │ ├── Store │ │ │ └── Store.cs.meta │ │ ├── Views │ │ │ ├── RootLayer.cs.meta │ │ │ └── RootLayer.cs │ │ ├── Root.uxml.meta │ │ ├── Minimal.asmdef │ │ └── MinimalPanelSettings.asset │ ├── Basic │ │ ├── Scene │ │ │ ├── Materials │ │ │ │ ├── textures │ │ │ │ │ ├── prototype_512x512_blue2.png │ │ │ │ │ ├── prototype_512x512_grey1.png │ │ │ │ │ ├── prototype_512x512_grey3.png │ │ │ │ │ ├── prototype_512x512_orange.png │ │ │ │ │ ├── prototype_512x512_purple.png │ │ │ │ │ ├── prototype_512x512_magenta.png │ │ │ │ │ └── prototype_512x512_magenta.png.meta │ │ │ │ ├── urp.meta │ │ │ │ ├── built-in.meta │ │ │ │ ├── textures.meta │ │ │ │ ├── built-in │ │ │ │ │ ├── mat-blue.mat.meta │ │ │ │ │ ├── mat-item.mat.meta │ │ │ │ │ ├── mat-magenta.mat.meta │ │ │ │ │ ├── mat-orange.mat.meta │ │ │ │ │ ├── mat-purple.mat.meta │ │ │ │ │ ├── mat-white.mat.meta │ │ │ │ │ ├── unlit-blue.mat.meta │ │ │ │ │ ├── unlit-white.mat.meta │ │ │ │ │ ├── mat-gray-built-in.mat.meta │ │ │ │ │ ├── mat-green-highlight.mat.meta │ │ │ │ │ ├── mat-green-highlight.mat │ │ │ │ │ ├── mat-white.mat │ │ │ │ │ ├── mat-magenta.mat │ │ │ │ │ └── mat-item.mat │ │ │ │ └── urp │ │ │ │ │ ├── mat-blue-urp.mat.meta │ │ │ │ │ ├── mat-gray-urp.mat.meta │ │ │ │ │ ├── mat-item-urp.mat.meta │ │ │ │ │ ├── mat-white-urp.mat.meta │ │ │ │ │ ├── mat-magenta-urp.mat.meta │ │ │ │ │ ├── mat-orange-urp.mat.meta │ │ │ │ │ ├── mat-purple-urp.mat.meta │ │ │ │ │ └── mat-green-highlight-urp.mat.meta │ │ │ ├── Prefabs │ │ │ │ ├── Item.prefab.meta │ │ │ │ ├── Player.prefab.meta │ │ │ │ ├── Interactible.prefab.meta │ │ │ │ ├── vfx │ │ │ │ │ ├── ConsumeVFX.prefab.meta │ │ │ │ │ └── PickupVFX.prefab.meta │ │ │ │ └── vfx.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Materials.meta │ │ │ ├── BagId.cs │ │ │ ├── ItemInfo.cs │ │ │ ├── Billboard.cs │ │ │ ├── BagData.cs.meta │ │ │ ├── BagId.cs.meta │ │ │ ├── Billboard.cs.meta │ │ │ ├── ItemInfo.cs.meta │ │ │ ├── GameManager.cs.meta │ │ │ ├── InputManager.cs.meta │ │ │ ├── InteractPrefab.cs.meta │ │ │ ├── ItemPrefab.cs.meta │ │ │ ├── SfxManager.cs.meta │ │ │ ├── PlayerController.cs.meta │ │ │ ├── ItemPrefab.cs │ │ │ ├── InteractPrefab.cs │ │ │ ├── InputManager.cs │ │ │ ├── BagData.cs │ │ │ └── SfxManager.cs │ │ ├── Basic (URP).unity.meta │ │ ├── Basic (Built-In).unity.meta │ │ ├── Basic.asmdef.meta │ │ ├── Editor │ │ │ ├── ItemInfoDrawer.uss │ │ │ ├── Basic.Editor.asmdef.meta │ │ │ ├── Debug.cs.meta │ │ │ ├── MainWindow.cs.meta │ │ │ ├── ItemInfoDrawer.cs.meta │ │ │ ├── ItemInfoDrawer.uss.meta │ │ │ ├── Basic.Editor.asmdef │ │ │ ├── MainWindow.cs │ │ │ └── Debug.cs │ │ ├── Editor.meta │ │ ├── Events.meta │ │ ├── Scene.meta │ │ ├── Store.meta │ │ ├── Views.meta │ │ ├── Inventory.meta │ │ ├── Resources.meta │ │ ├── Resources │ │ │ ├── Basic.meta │ │ │ └── Basic │ │ │ │ ├── BasicStyles.uss.meta │ │ │ │ ├── BasicTheme.tss.meta │ │ │ │ ├── BasicTooltip.uss.meta │ │ │ │ ├── BasicGammaCorrect.uss.meta │ │ │ │ ├── BasicGammaCorrect.uss │ │ │ │ ├── BasicTheme.tss │ │ │ │ └── BasicTooltip.uss │ │ ├── Views │ │ │ ├── Components.meta │ │ │ ├── BasicSlotView.cs │ │ │ ├── RootLayer.cs.meta │ │ │ ├── BasicItemView.cs.meta │ │ │ ├── BasicSlotView.cs.meta │ │ │ ├── ChestWindow.cs.meta │ │ │ ├── EquipmentView.cs.meta │ │ │ ├── InventoryView.cs.meta │ │ │ ├── ShopWindow.cs.meta │ │ │ ├── StashWindow.cs.meta │ │ │ ├── Components │ │ │ │ ├── Tooltip.cs.meta │ │ │ │ ├── Components.cs.meta │ │ │ │ ├── Components.cs │ │ │ │ └── Tooltip.cs │ │ │ ├── CraftingBenchView.cs.meta │ │ │ ├── InfiniteShopWindow.cs.meta │ │ │ ├── CharacterSheetWindow.cs.meta │ │ │ ├── StashWindow.cs │ │ │ ├── InfiniteShopWindow.cs │ │ │ ├── ShopWindow.cs │ │ │ ├── InventoryView.cs │ │ │ ├── ChestWindow.cs │ │ │ ├── EquipmentView.cs │ │ │ ├── BasicItemView.cs │ │ │ ├── CharacterSheetWindow.cs │ │ │ └── CraftingBenchView.cs │ │ ├── BasicPanelSettings.asset.meta │ │ ├── Root.uxml │ │ ├── Events │ │ │ ├── Events.cs.meta │ │ │ └── Events.cs │ │ ├── Inventory │ │ │ ├── Bases.cs.meta │ │ │ ├── Types.cs.meta │ │ │ ├── Extensions.cs.meta │ │ │ ├── Factory.cs.meta │ │ │ ├── Filters.cs.meta │ │ │ ├── Recipes.cs.meta │ │ │ ├── CharacterSheet.cs.meta │ │ │ ├── __IsExternalInit.cs.meta │ │ │ ├── __IsExternalInit.cs │ │ │ ├── Recipes.cs │ │ │ ├── CharacterSheet.cs │ │ │ ├── Filters.cs │ │ │ ├── Types.cs │ │ │ ├── Factory.cs │ │ │ └── Bases.cs │ │ ├── Store │ │ │ └── Store.cs.meta │ │ ├── Root.uxml.meta │ │ ├── Basic.asmdef │ │ └── BasicPanelSettings.asset │ ├── Basic.meta │ └── Minimal.meta ├── Core.meta └── Demos.meta ├── README.md.meta └── GDS.meta /GDS/Core/Resources/Shared/Themes/DefaultRuntimeTheme.tss: -------------------------------------------------------------------------------- 1 | @import url("unity-theme://default"); 2 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/drop.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/drop.mp3 -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/pick.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/pick.mp3 -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/place.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/place.mp3 -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/axe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/axe.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/gem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/gem.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/mana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/mana.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/ring.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/ring.PNG -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/wood.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/anvil-strikes.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/anvil-strikes.mp3 -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/coin-drop-buy.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/coin-drop-buy.mp3 -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/negative-blip.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/negative-blip.wav -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/apple.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/armor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/armor.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/boots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/boots.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/cloak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/cloak.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/gloves.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/gloves.PNG -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/helmet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/helmet.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/potion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/potion.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/silver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/silver.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/sword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/sword.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui/icon_coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/ui/icon_coin.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/coin-drop-sell.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Sfx/coin-drop-sell.mp3 -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/mushroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/mushroom.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/necklace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/necklace.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui/icon_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/ui/icon_clear.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui/icon_coins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/ui/icon_coins.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui/icon_piggy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/ui/icon_piggy.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui/icon_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/ui/icon_refresh.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/sword-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/items/sword-blue.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui/icon-trash-can.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/ui/icon-trash-can.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/bolts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/bolts.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/boots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/boots.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/gloves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/gloves.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/helmet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/helmet.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/pants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/pants.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/weapon.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/boots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/boots.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/gloves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/gloves.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/helmet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/helmet.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/pants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/pants.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/weapon.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/weapon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/weapon2.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds/bg-slot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/backgrounds/bg-slot.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/weapon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/weapon2.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/bolts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/bolts.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/boots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/boots.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/pants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/pants.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds/bg-window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/backgrounds/bg-window.png -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Resources/Minimal/MinimalTheme.tss: -------------------------------------------------------------------------------- 1 | @import url("/Assets/InventorySystem/GDS/Core/Resources/Shared/Themes/DefaultRuntimeTheme.tss"); 2 | @import url("MinimalStyles.uss"); 3 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/body-armor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/body-armor.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/body-armor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/body-armor.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/gloves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/gloves.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/helmet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/helmet.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/weapon.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/weapon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/weapon2.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128/ranged-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/128/ranged-weapon.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/ranged-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/64/ranged-weapon.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/body-armor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/body-armor.png -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 396c428dec487ec46a3304edca50afd8 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp/ranged-weapon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/Equipment/Transp/ranged-weapon.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds/grunge-blue-64-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/backgrounds/grunge-blue-64-64.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds/grunge-brown-64-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/backgrounds/grunge-brown-64-64.png -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds/grunge-gray-64-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/backgrounds/grunge-gray-64-64.png -------------------------------------------------------------------------------- /GDS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 355fffc38be50474196cfdb95bd1f848 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds/grunge-yellow-64-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Core/Resources/Shared/Images/backgrounds/grunge-yellow-64-64.png -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_blue2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_blue2.png -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_grey1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_grey1.png -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_grey3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_grey3.png -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_orange.png -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_purple.png -------------------------------------------------------------------------------- /GDS/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f1c4e2ad4e1edf41befb45539545dc1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ab843f4de037e742a322d2da64a97a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_magenta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dcroitoru/basic-inventory-system-unity/HEAD/GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_magenta.png -------------------------------------------------------------------------------- /GDS/Core/Dom.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0ba8b06c5cf86f4ba53545e7721df29 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/GDS.Core.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c62381d40559dd64baa33e668cefc56e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Core/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dbdbc9b891f545469359711a0dc5e99 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d736a5a0c8670a42b05cf289060cc17 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Basic (URP).unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbd137d2c69d35b4d92e1e8546dd0d6d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Minimal.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4276f3ebeeac5cf4ca09807aca28a572 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Core/Behaviors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b231758a5a95cb7418675b1a6a748da5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dddb8c7ab959ec846a1736c92b1c1144 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Events.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db129404f39758d4aa7244e297d53a2a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Inventory.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7aafb583bff20a74e80dd68455e2718e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0e5270757f56a54e8bea0bbaf6535d4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/Bag.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d2cef2ae227e2e478ac87814a3f4b22 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/Item.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e776fca9a799f24db62adaad1695bb5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/Slot.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27730d294fb1b1d4f8bcfda50db0a224 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c71e4d2e3cb430b47a07432286c4bfc1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Basic (Built-In).unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5379c74833dae3b40be35f3e86f227e8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Basic.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff9bf2d567161c345a53abf8da297551 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/ItemInfoDrawer.uss: -------------------------------------------------------------------------------- 1 | :root { 2 | padding: 8px; 3 | } 4 | .row { 5 | flex-direction: row; 6 | } 7 | .flex-grow-1 { 8 | flex-grow: 1; 9 | } 10 | .my-item { 11 | min-width: 50px; 12 | } 13 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs/Item.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03f3f023d0d55f146ba75769efc8d4a5 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfce32e8a310b2d4980d4f40e72b5d01 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Editor/Core.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c5027e8f64e7d5458244a7ba13da899 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Types.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77fff25885804734fbad8709a8c3fbf5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Art Credit.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 821dd53c6809e304f935983b3f6cff0b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Core/Views/Component.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 896c50ef242d2954fa47ec0227eeacf4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/Tooltip.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e94a61382b5d0bf40a545573dc6783b0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26d8d89e67d367e42ac61bf9e4bc121f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Events.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c48c2e1a63762e498e033420b8abf62 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c3be2c0c7d86f14e9046f294179726f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cf7ddffd82cd64448157d281a0b2f73 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Store.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bb38def719159e43be626529fc19083 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 178e929e9dd32e046adf61586564a889 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6d74b864115a8544a4fbacf3296949d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Minimal.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c50d7996509871842ba2dc2a442b1438 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Store.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c75c2f773a43efe49bd9e33dfd87b9c3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Views.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a44e60bee12bc9c48b10c75c88e9ce39 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Constants.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0804d994a3fef643b1ec994df3f1355 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0a53f4c22fa0984aa7d4ee080e95de5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Factory.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b7705d0874e26543a93b7162fa79d73 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Observable.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00ef4e97faa158d49b94ef30dafa6ac9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e97ccad3cdd91a49a1f3f96f5b13848 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5c49e5ffca33c645ad994d44c7ab6ac 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/DropTarget.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dbc3935e025b8a49af7dba3ced56f06 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/Item/Renderer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d8b5860f97f1044e9d416999f7fc64e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Views/LogMessage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28ab4bbc345e96546ae0215e3fd4f693 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a6dfea78c1314f438f1973deab3d3c2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b23cfb0d53678a54eba738fe3b3914ca 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4b8189c9b98eee4196849873f9f4069 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs/Interactible.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6588c45d5407a19408bbfdda196661a4 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs/vfx/ConsumeVFX.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e700c17aae3141f45a2f4f5b589f35db 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs/vfx/PickupVFX.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d2d3d2d4222ee542ae3318c55a86510 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f74c9e108306794c8536d66a0dcec7d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6df25e4b8d85e164f9295f1526f4b63a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Styles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c9c42cdc9b39c24cb280be279159b01 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Themes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d4eefc65b9a5334e8b532fe9370dabc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/Basic.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 526e9cc2b68181648857bc31e397ccde 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d74a2858e6aacab4291882884c6e0e80 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d31d47726a5db2149bedaa67d890234d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Prefabs/vfx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6584bd6dd907f154c8e23f769b908a11 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07d8c6d93ddf7cd4a91bf21d1028d9a9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00ac0752cfcd6b541897fffe6a64968b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/ui.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3b3cced033e3904c8ccc649d6d767c0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/BagId.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | namespace GDS.Basic { 3 | public class BagId : MonoBehaviour { 4 | 5 | [Header("This should match a 'Bag' Id from the 'Store'")] 6 | public string Id; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d830b9986ca266c44868350be63974d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor/Minimal.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 673996e6bcdc37144b0fd2b7a959f5a6 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Resources/Minimal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 368aeb9ca07ea24439a29b91f5180806 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68ab2050fc0e6b747821fe093dd9522b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/backgrounds.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d3455e19bbb07049adec96798ed228d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/ItemInfo.cs: -------------------------------------------------------------------------------- 1 | namespace GDS.Basic { 2 | [System.Serializable] 3 | public class ItemInfo { 4 | public string BaseId; 5 | public Rarity Rarity = Rarity.NoRarity; 6 | public int Quant = 1; 7 | } 8 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 995d95e1fc5edfe41bf8fb4730802ca9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0682d555f6ef9544e9f56dd66710b582 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Constants/Filters.cs: -------------------------------------------------------------------------------- 1 | namespace GDS.Core { 2 | 3 | public static class Filters { 4 | public static readonly FilterFn Everything = (_) => true; 5 | public static readonly FilterFn Nothing = (_) => false; 6 | } 7 | } -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/128.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd73cdf619fd96d43afde9629bcf9e3f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45dfd946f1f34b647af054f1cdcc552e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/Transp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2ef957d935f64d4eb6509c877ff3833 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/BasicPanelSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7911ad09b6392ee41a488133a0470041 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Art Credit: -------------------------------------------------------------------------------- 1 | RPG inventory icons 2 | https://assetstore.unity.com/packages/2d/gui/icons/rpg-inventory-icons-56687 3 | 4 | RPG icons free starter pack 5 | https://assetstore.unity.com/packages/2d/gui/icons/rpg-icons-free-starter-pack-245521 -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/BasicSlotView.cs: -------------------------------------------------------------------------------- 1 | using GDS.Core; 2 | using GDS.Core.Views; 3 | using GDS.Basic.Views; 4 | 5 | namespace GDS.Basic { 6 | public class BasicSlotView : SlotView { public BasicSlotView(Slot slot, Bag bag) : base(slot, bag) { } } 7 | } -------------------------------------------------------------------------------- /GDS/Demos/Minimal/MinimalPanelSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6114dab43218ba14cab27fdf83edccca 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e148de6cdf2d164aa3e3f90ce8c852c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-item.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06db004585715634fa82ba52e93b4eff 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-blue-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac2c0472f4cb82f46a02dbe9f8e4e89f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-gray-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dff744667d2548b4094e6fca2dbda454 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-item-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 691295dc4d76d3d459dfb081df3ac9e3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-white-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3745c403e440e5e46bd3976ab6aba77c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-magenta.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e114d60e08090e448b2820080439a63f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-orange.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 652107f36a28e44479c0b827dee5852a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-purple.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36bce9ab6cae8ce43962938466458044 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-white.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84df6759cf008984bbbc84266ff0448c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/unlit-blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dec176cc47460844baf3019f63ac9258 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/unlit-white.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 732fd4af6a2137c45baa30e2fbe46b49 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-magenta-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af15db0e86a3b194e8041fd88fd55f8e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-orange-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3baa478208b21b44b84aa4e8e0d6c57d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-purple-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 610d2d56f1dc65b45bd4bf2465fe8cd4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-gray-built-in.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17c44fb3e5be9644586a0728a5f5a386 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/urp/mat-green-highlight-urp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef7fd527c7c91ef4ebf8204e21c714f9 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-green-highlight.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29f855c53c9b5b54490709e4676afe17 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Root.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Billboard.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace GDS.Basic { 4 | public class Billboard : MonoBehaviour { 5 | void LateUpdate() { 6 | // Make the label face the camera 7 | transform.forward = Camera.main.transform.forward; 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /GDS/Core/Dom/DomFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38c216f09d5346044a3ff275e8322047 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Events/EventBus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c8f540081e8bd14899d5a5ddf8a38fa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Events/Events.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b53741f7e776cd14f84eba8ceb34db54 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Utils/ColorUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b46b13a510111e24ba9791927d111492 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Utils/DebugUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ffd350c3d98d9341b4a156c33dc221e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Utils/DomUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e15409f161cbc5040a252e68d62a68ea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Utils/EnumUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a0ee960857ec3a44b82b6502b1d68fb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Utils/ImageUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6db32eb493900a4b9601ae7a704cf3a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Utils/LogUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1eecab0ab4d7dc94eb12137a46d0ce38 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Behaviors/Behaviors.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63bd8629c1c738145b905a6fd281edd2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Types/Types.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ed874ec931ef2e498d7a692f479505b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/Bag/ListBagView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc796d9d90fdff1498868472a9b4f36b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/Item/ItemView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58c4deaf8f271ac4fa718b3dab945898 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/Slot/SlotView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b7831f7ec9cac940802cb5ade2c3af8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/Debug.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a916cb5a25ac3a7488b03299a1b650eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Events/Events.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5ebd35b50569c14c90b16e2d80e711c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Bases.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45a9fc03e77cd4d429ebf31d9ff4782a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Types.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7460a655e32838f4eba6f21adbf47797 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/BagData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4115aba83d0641a489313933f04ea396 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/BagId.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebeb3b69861a4d64e88bf46479cd750c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Billboard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76038187579d8204396e84d61e19d8b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/ItemInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7e2bb53bf9108b4bb0f7c1c05ad7d9c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Store/Store.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e55d88def29db5842b40f4f5e3342cd2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/RootLayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1de050974e99f24484bd69a933ca38a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor/Debug.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64eb97e581769bb48a83d60b12b6bbd7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Root.uxml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Store/Store.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3b9e4f79283f5545b67c525eb1a4576 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Editor/PlayModeStateChanged.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56333e0239c69264aada4d1d01b0dc34 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Constants/Filters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5037d1d3479117f4c843b6ee38a24792 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Constants/Sizes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7acf497ce2ef2542afe78f1e17840ee 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/__IsExternalInit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87c8c2d9beddbf643b900377bca8295d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/Component/Component.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2ef781a30655234581e1205265a7e56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/Tooltip/TooltipView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb151e22a911dbd49ba50e70fa97b3a4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/MainWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01c621dabd29150489d2b02a83e74ce0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Extensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22a3502e99212084f9ce2211ac18ad01 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Factory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a76e292f1a61d2e4cb24a6ee29d65b8c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Filters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b900d682c9453be4ab955b8d2b7d056f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Recipes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6017902bf6114b4181be473e7838603 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/GameManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5bb908c55ceb2043acc18e6f6a23244 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/InputManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56f33df3e2dd90d478e91b337461c60a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/InteractPrefab.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 928373639a84c9349963164e4ca92768 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/ItemPrefab.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 183464027b4fadd4eaca78779443c7ab 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/SfxManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 769a0b44617e2224989872109a1b7db7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/BasicItemView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cba9eca57266ae24da4df9a6d45ddbe6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/BasicSlotView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70412e532bf97f5468bc006c42f7c6d5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/ChestWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94c0fcb15b2e71847a08a42ebaf90042 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/EquipmentView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17293464295716e4ca69b24cfe95e2e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/InventoryView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22b4a3a2fb4b1d64ab2e5a1c2da84abc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/ShopWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a366e6a6c6a0aa4ea62773e7bae24e9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/StashWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e828b266ee79ea2429489cf361b0511c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor/MainWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c02de47af7b5c304bb7b53c7b89bf306 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Views/RootLayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff3fdf7099d90ca4b8a625d6405c61b5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Observable/Observable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c327b859e9ab2064ea519325871884be 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/DropTarget/DropTargetView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7489755bdb458b4458073804d158686a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/LogMessage/LogMessageView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fa16b16d973fdb4b9d030f04292bf3a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/ItemInfoDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c597c28f410a8c4895f2782aa2642b4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/CharacterSheet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec164d4658be9eb49aedb19f2860b0f3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/PlayerController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9892799cbdd479f4aba11a71d502c751 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/Components/Tooltip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb64a85800ef3154282eaf6a9dfaf821 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/CraftingBenchView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71cdd92f0ac1ea4449a288d56e3216c6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/InfiniteShopWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 599146ec8c763a149a3b58de8aa66ba6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Factory/InventoryFactory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e53e814c3bf22c43ba986dcc3a7ca83 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Views/Item/Renderer/GhostItemRender.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3eada5c116f5fe24c8835dc6166b236f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/__IsExternalInit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd9481a56bdfa534d96b4b9ece654a83 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/CharacterSheetWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0480bbcab6fba854db98f382d0d5757c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/Components/Components.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff5f212d07b64e2489361241c5bb5af0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/Extensions/InventoryExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4d61d59b76a87742bb696c8583b10d6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /GDS/Core/Inventory/__IsExternalInit.cs: -------------------------------------------------------------------------------- 1 | // Workaround for a bug that throws compiler errors when using records in C# 9 2 | // https://stackoverflow.com/questions/62648189/testing-c-sharp-9-0-in-vs2019-cs0518-isexternalinit-is-not-defined-or-imported 3 | 4 | namespace System.Runtime.CompilerServices { 5 | internal static class IsExternalInit { } 6 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/__IsExternalInit.cs: -------------------------------------------------------------------------------- 1 | // Workaround for a bug that throws compiler errors when using records in C# 9 2 | // https://stackoverflow.com/questions/62648189/testing-c-sharp-9-0-in-vs2019-cs0518-isexternalinit-is-not-defined-or-imported 3 | 4 | namespace System.Runtime.CompilerServices { 5 | internal static class IsExternalInit { } 6 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Root.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 460ee8f096637fd4c9c11089ee4ef624 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Root.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efdd20f51a45ef245b3bfa2369b3880e 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/Components/Components.cs: -------------------------------------------------------------------------------- 1 | 2 | using GDS.Core; 3 | using GDS.Core.Events; 4 | using UnityEngine.UIElements; 5 | 6 | namespace GDS.Basic.Views { 7 | public static class Components { 8 | public static VisualElement CloseButton(Bag bag) => new Button(() => Store.Bus.Publish(new CloseWindowEvent(bag))).WithClass("close-button"); 9 | } 10 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Events/Events.cs: -------------------------------------------------------------------------------- 1 | using GDS.Core; 2 | using GDS.Core.Events; 3 | using UnityEngine; 4 | 5 | namespace GDS.Basic.Events { 6 | public record PlayerCollideEvent(Collider other) : CustomEvent; 7 | public record BuyRandomItem(Bag Bag) : CustomEvent; 8 | public record RerollShop(Bag Bag) : CustomEvent; 9 | public record ToggleCharacterSheet() : CustomEvent; 10 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/ItemInfoDrawer.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3bd60aadbe52d9e4f99ed4832deb8b75 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Styles/Utility.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f2146fbd7a7e8c459cb8be8903b38ce 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicStyles.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 156273562bfcf1e4c82f95873eb670bc 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicTheme.tss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 713406d6855c5cd4e9a68dfd7ec4d241 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Styles/UnityControls.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b26d14a39b31a3243bbd0b96496c9aab 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicTooltip.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 937bcacaf243e354cba6fd038ea7fccf 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Resources/Minimal/MinimalTheme.tss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4554af69dc277f4448d7917992291252 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Themes/DefaultRuntimeTheme.tss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 482835a826e66414b80bd4726d2441df 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicGammaCorrect.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 770117ffffd800645b4808bc900f592d 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Resources/Minimal/MinimalStyles.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc88436017553784a8ce8cd6adce2f0a 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /GDS/Core/GDS.Core.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GDS.Core", 3 | "rootNamespace": "GDS.Core", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /GDS/Core/Views/Tooltip/TooltipView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | 3 | namespace GDS.Core.Views { 4 | public class TooltipView : Component { 5 | public TooltipView() { 6 | this.Add("tooltip", ItemName.WithClass("tooltip__item-name")); 7 | } 8 | public Label ItemName = new(); 9 | override public void Render(Item item) { 10 | ItemName.text = item.Name(); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicGammaCorrect.uss: -------------------------------------------------------------------------------- 1 | /* Not actual gamma correction */ 2 | /* When in linear color space, adjust the transparency so that the colors are not that intense */ 3 | /* Approx function used is pow(a, 2.2) */ 4 | :root { 5 | --col-drop-target-border: rgba(247, 255, 174, 0.094); 6 | --col-illegal-action: rgba(247, 57, 57, 0.054); 7 | --col-legal-action: rgba(200, 255, 200, 0.054); 8 | --col-backdrop: rgba(0, 0, 0, 0.7); 9 | } 10 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/ItemPrefab.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using GDS.Core; 3 | namespace GDS.Basic { 4 | public class ItemPrefab : MonoBehaviour { 5 | public Item Item; 6 | public SpriteRenderer spriteRenderer; 7 | 8 | public void SetItem(Item item) { 9 | Item = item; 10 | var sprite = Resources.Load(item.ItemBase.IconPath); 11 | spriteRenderer.sprite = sprite; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /GDS/Core/Utils/EnumUtil.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace GDS.Core { 4 | 5 | public static class EnumUtil { 6 | public static T GetRandomEnumValue() where T : System.Enum { 7 | var values = System.Enum.GetValues(typeof(T)); 8 | return (T)values.GetValue(Random.Range(0, values.Length))!; 9 | } 10 | 11 | public static T[] GetAllEnumValues() where T : System.Enum => (T[])System.Enum.GetValues(typeof(T)); 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Basic.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Demos.Basic", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:c62381d40559dd64baa33e668cefc56e" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Minimal.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Minimal", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:c62381d40559dd64baa33e668cefc56e" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/StashWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core; 3 | using GDS.Basic.Views; 4 | using GDS.Core.Views; 5 | 6 | namespace GDS.Basic { 7 | public class StashWindow : VisualElement { 8 | public StashWindow(Stash bag) { 9 | this.Add("window", 10 | Components.CloseButton(bag), 11 | Dom.Title("Stash"), 12 | new ListBagView(bag) 13 | ); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /GDS/Core/Editor/Core.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Core.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:c62381d40559dd64baa33e668cefc56e" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicTheme.tss: -------------------------------------------------------------------------------- 1 | @import url("/Assets/InventorySystem/GDS/Core/Resources/Shared/Themes/DefaultRuntimeTheme.tss"); 2 | @import url("/Assets/InventorySystem/GDS/Core/Resources/Shared/Styles/UnityControls.uss"); 3 | @import url("BasicStyles.uss"); 4 | @import url("BasicTooltip.uss"); 5 | 6 | /* Note: We put `Utility` last so that its layout styles don't get overridden, */ 7 | /* in particular, margins, padding and gaps */ 8 | @import url("/Assets/InventorySystem/GDS/Core/Resources/Shared/Styles/Utility.uss"); 9 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/Basic.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Basic.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:ff9bf2d567161c345a53abf8da297551", 6 | "GUID:c62381d40559dd64baa33e668cefc56e" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor/Minimal.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Minimal.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:c50d7996509871842ba2dc2a442b1438", 6 | "GUID:c62381d40559dd64baa33e668cefc56e" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /GDS/Core/Editor/PlayModeStateChanged.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | using GDS.Core.Events; 4 | 5 | namespace GDS.Core.Editor { 6 | 7 | [InitializeOnLoadAttribute] 8 | public static class PlayModeStateChanged { 9 | 10 | static PlayModeStateChanged() { 11 | EditorApplication.playModeStateChanged += onPlayModeChange; 12 | } 13 | 14 | private static void onPlayModeChange(PlayModeStateChange state) { 15 | if (state == PlayModeStateChange.ExitingPlayMode) { 16 | EventBus.GlobalBus.Publish(new ResetEvent()); 17 | } 18 | 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/drop.mp3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9319d04c5ce39be499fe2c6cf06f0f6d 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/pick.mp3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4dba55d871f573b44b533ca55353b4d5 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/place.mp3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fe459f4cf576ea49acb33db95b0665f 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Core/Dom/DomFactory.cs: -------------------------------------------------------------------------------- 1 | using GDS.Core.Views; 2 | 3 | namespace GDS.Core { 4 | public static class DomFactory { 5 | public static BaseSlotView BaseSlotView(Slot slot, Bag bag) => new BaseSlotView(slot, bag); 6 | public static SlotView SlotView(Slot slot, Bag bag) => new SlotView(slot, bag); 7 | 8 | public static ListBagView> ListBagView(ListBag bag) => new ListBagView>(bag); 9 | public static ListBagView ListBagView(ListBag bag) where TSlotView : BaseSlotView => new ListBagView(bag); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/anvil-strikes.mp3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 455f2f151f35604489069e96383b6f75 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/coin-drop-buy.mp3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd9c185d3ed61b1438ee8f357dd47db7 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/negative-blip.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52e9c1aaba5d81543accce908a60ca91 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor/MainWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using GDS.Core; 4 | using UnityEngine.UIElements; 5 | 6 | namespace GDS.Minimal { 7 | 8 | public class MainWindow : EditorWindow { 9 | 10 | [MenuItem("Tools/Minimal/Main Window")] 11 | public static void Open() => GetWindow().titleContent = new GUIContent("Minimal::Main Window"); 12 | 13 | public void CreateGUI() { 14 | rootVisualElement.styleSheets.Add(Resources.Load("Minimal/MinimalTheme")); 15 | rootVisualElement.Div(new RootLayer()); 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Sfx/coin-drop-sell.mp3.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afcb317e84880914c8b52b2f86e30d10 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 7 6 | defaultSettings: 7 | serializedVersion: 2 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | preloadAudioData: 0 15 | platformSettingOverrides: {} 16 | forceToMono: 0 17 | normalize: 1 18 | loadInBackground: 0 19 | ambisonic: 0 20 | 3D: 1 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /GDS/Core/Utils/ImageUtil.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using GDS.Core; 3 | using UnityEngine; 4 | using UnityEngine.UIElements; 5 | 6 | namespace GDS.Core { 7 | 8 | public static class ImageUtil { 9 | public static Sprite Image(this Item item) => Resources.Load(item.ItemBase.IconPath); 10 | public static Image Image(Sprite sprite) => new Image(sprite); 11 | } 12 | 13 | // TODO: Do we need to use this or can we use the built-in Image? 14 | public class Image : VisualElement { 15 | public Image(Sprite sprite) { style.backgroundImage = new StyleBackground(sprite); } 16 | } 17 | } -------------------------------------------------------------------------------- /GDS/Core/Inventory/Observable/Observable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace GDS.Core { 4 | 5 | /// 6 | /// A class that wraps a value and allows subscribers to watch for value changes. 7 | /// 8 | public class Observable { 9 | public Observable(T initialValue) { Value = initialValue; } 10 | public T Value { get; private set; } 11 | public event Action OnChange = (_) => { }; 12 | public void SetValue(T value) { 13 | Value = value; 14 | Notify(); 15 | } 16 | public void Notify() { 17 | OnChange.Invoke(Value); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/MainWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using GDS.Core; 4 | using UnityEngine.UIElements; 5 | 6 | namespace GDS.Basic { 7 | 8 | public class BasicRootWindow : EditorWindow { 9 | [MenuItem("Tools/Basic/Main Window")] 10 | public static void Open() { 11 | var wnd = GetWindow(); 12 | wnd.titleContent = new GUIContent("Basic::Main Window"); 13 | } 14 | 15 | public void CreateGUI() { 16 | var root = rootVisualElement; 17 | root.Div(new RootLayer()); 18 | root.styleSheets.Add(Resources.Load("Basic/BasicTheme")); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /GDS/Core/Views/DropTarget/DropTargetView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine.UIElements; 3 | 4 | namespace GDS.Core { 5 | public class DropTargetView : VisualElement { 6 | public DropTargetView(Observable dragged, Action callback) { 7 | this.WithClass("drop-target").Hide(); 8 | this.Observe(dragged, item => { 9 | this.ToggleClass("drop-target-visible", item is not NoItem); 10 | this.SetVisible(item is not NoItem); 11 | }); 12 | RegisterCallback(e => { 13 | if (e.button != 0) return; 14 | if (dragged.Value is NoItem) return; 15 | callback(dragged.Value); 16 | }); 17 | 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GDS/Core/Views/Item/Renderer/GhostItemRender.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UIElements; 4 | 5 | namespace GDS.Core.Views 6 | { 7 | public class GhostItemRender : Component where T : Component 8 | { 9 | public GhostItemRender() 10 | { 11 | ItemRender = Activator.CreateInstance(); 12 | this.Add("", ItemRender).IgnorePickAll(); 13 | } 14 | 15 | T ItemRender; 16 | 17 | public override void Render(Item item) 18 | { 19 | ItemRender.Data = item; 20 | ItemRender.style.width = ItemRender.resolvedStyle.minWidth.value * item.Size().W; 21 | ItemRender.style.height = ItemRender.resolvedStyle.minHeight.value * item.Size().H; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Editor/Debug.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | using UnityEditor; 4 | using UnityEngine.UIElements; 5 | using GDS.Core; 6 | using static GDS.Core.DebugUtil; 7 | 8 | namespace GDS.Minimal { 9 | 10 | public class DebugWindow : EditorWindow { 11 | [MenuItem("Tools/Minimal/Debug")] 12 | public static void Open() => GetWindow().titleContent = new GUIContent("Minimal::Debug"); 13 | 14 | public void CreateGUI() { 15 | rootVisualElement.styleSheets.Add(Resources.Load("Minimal/MinimalStyles")); 16 | rootVisualElement.Add("debug-window", 17 | DraggedItemDebug(Store.Instance.DraggedItem), 18 | ListBagDebug(Store.Instance.MainInventory) 19 | ); 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Recipes.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace GDS.Basic { 4 | // Note: 5 | // Here we are using `null` instead of a `Core.NoItemBase` because `Core.NoItemBase` 6 | // cannot be auto upcasted to `Basic.ItemBase` and defaults to `null` 7 | // This will change when the type system will be further improved (not sure how yet) 8 | public static class Recipes { 9 | public static readonly Dictionary All = new() { 10 | {new (Bases.Wood, Bases.Wood, Bases.Steel), Bases.Axe}, 11 | {new (Bases.Wood, Bases.Steel, Bases.Steel), Bases.LongSword}, 12 | {new (Bases.Gem, Bases.Wood, Bases.Steel), Bases.ShortSword}, 13 | {new (Bases.Gem, Bases.Steel, null), Bases.BlueAmulet}, 14 | }; 15 | 16 | } 17 | } -------------------------------------------------------------------------------- /GDS/Core/Views/Component/Component.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | 3 | namespace GDS.Core.Views { 4 | /// 5 | /// A "dumb" component that re-renders itself when its `data` changes (from outside) 6 | /// Data (T) needs to be a value type for equality check to work 7 | /// 8 | abstract public class Component : VisualElement { 9 | 10 | bool _rendered = false; 11 | T _data; 12 | public T Data { 13 | get => _data; 14 | set { 15 | // Return early if `data` hasn't changed 16 | if (_rendered == true && _data.Equals(value)) return; 17 | _rendered = true; 18 | _data = value; 19 | Render(_data); 20 | } 21 | } 22 | 23 | public virtual void Render(T data) { } 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/CharacterSheet.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using GDS.Core; 3 | using UnityEngine; 4 | 5 | namespace GDS.Basic { 6 | public class CharacterSheet { 7 | public Observable Stats; 8 | public CharacterSheet(SetBag bag) { 9 | Stats = new(new(0, 0)); 10 | 11 | bag.Data.OnChange += (data) => { 12 | var defense = 0; 13 | var dps = 0f; 14 | for (var i = 0; i < data.Count; i++) { 15 | if (data.ElementAt(i).Value.Item.ItemBase is ArmorItemBase a) defense += a.Defense; 16 | if (data.ElementAt(i).Value.Item.ItemBase is WeaponItemBase b) dps += b.Attack * b.AttackSpeed; 17 | } 18 | Stats.SetValue(Stats.Value with { Defense = defense, Damage = dps }); 19 | }; 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/InteractPrefab.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace GDS.Basic { 5 | [RequireComponent(typeof(Collider))] 6 | [RequireComponent(typeof(Renderer))] 7 | public class InteractPrefab : MonoBehaviour { 8 | [NonSerialized] public Material InitialMaterial; 9 | [SerializeField] public Collider Collider; 10 | [SerializeField] Renderer Renderer; 11 | 12 | private void Awake() { 13 | InitialMaterial = GetComponent().material; 14 | Collider = GetComponent(); 15 | Renderer = GetComponent(); 16 | } 17 | 18 | public void Highlight(Material material) { 19 | Renderer.material = material; 20 | } 21 | 22 | public void Reset() { 23 | Renderer.material = InitialMaterial; 24 | } 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /GDS/Core/Views/Bag/ListBagView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine.UIElements; 4 | 5 | namespace GDS.Core.Views { 6 | /// 7 | /// A smart component that displays a list of slots 8 | /// 9 | public class ListBagView : VisualElement where T : BaseSlotView { 10 | public ListBagView(ListBag bag) { 11 | // createSlotFn ??= (Slot slot, Bag bag) => new SlotView(slot, bag); 12 | T createSlotFn(ListSlot slot) => (T)Activator.CreateInstance(typeof(T), slot, bag); 13 | var slotViews = bag.Slots.Select(slot => createSlotFn(slot)).ToArray(); 14 | this.Add("list-bag", Dom.Div("slot-container", slotViews)); 15 | this.Observe(bag.Data, (slots) => { 16 | for (var i = 0; i < slots.Count; i++) slotViews[i].Data = slots[i]; 17 | }); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Filters.cs: -------------------------------------------------------------------------------- 1 | using GDS.Core; 2 | 3 | namespace GDS.Basic { 4 | public static class Filters { 5 | public static readonly FilterFn Weapon = item => item.ItemBase is WeaponItemBase; 6 | public static readonly FilterFn Armor = item => item.ItemBase is WeaponItemBase; 7 | public static readonly FilterFn Consumable = item => item.Class() == ItemClass.Consumable; 8 | public static readonly FilterFn Material = item => item.Class() == ItemClass.Material; 9 | 10 | public static readonly FilterFn Helmet = item => item.Class() == ItemClass.Helmet; 11 | public static readonly FilterFn Gloves = item => item.Class() == ItemClass.Gloves; 12 | public static readonly FilterFn Boots = item => item.Class() == ItemClass.Boots; 13 | public static readonly FilterFn BodyArmor = item => item.Class() == ItemClass.BodyArmor; 14 | } 15 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/InfiniteShopWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Basic.Events; 3 | using GDS.Basic.Views; 4 | using GDS.Core; 5 | using GDS.Core.Events; 6 | using GDS.Core.Views; 7 | using static GDS.Core.Dom; 8 | 9 | namespace GDS.Basic { 10 | 11 | public class InfiniteShopWindow : VisualElement { 12 | 13 | public InfiniteShopWindow(Vendor bag) { 14 | 15 | void BuyRandom() => Store.Bus.Publish(new BuyRandomItem(bag)); 16 | 17 | void SellItem(Item item) => Store.Bus.Publish(new SellItemEvent(item)); 18 | 19 | this.Add("window vendor", 20 | Title("Shop (Infinite resources)"), 21 | new ListBagView>(bag), 22 | Button("Buy Random", BuyRandom), 23 | new DropTargetView(Store.Instance.DraggedItem, SellItem), 24 | Components.CloseButton(bag) 25 | ); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/ShopWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Basic.Events; 3 | using GDS.Basic.Views; 4 | using GDS.Core; 5 | using GDS.Core.Events; 6 | using GDS.Core.Views; 7 | using static GDS.Core.Dom; 8 | 9 | namespace GDS.Basic { 10 | 11 | public class ShopWindow : VisualElement { 12 | 13 | public ShopWindow(Vendor bag) { 14 | 15 | void BuyRandom() => Store.Bus.Publish(new BuyRandomItem(bag)); 16 | void Randomize() => Store.Bus.Publish(new RerollShop(bag)); 17 | void SellItem(Item item) => Store.Bus.Publish(new SellItemEvent(item)); 18 | 19 | this.Add("window vendor", 20 | Title("Shop"), 21 | new ListBagView>(bag), 22 | Div("row", Button("Buy Random", BuyRandom), Button("Reroll Shop", Randomize)), 23 | new DropTargetView(Store.Instance.DraggedItem, SellItem), 24 | Components.CloseButton(bag) 25 | ); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /GDS/Core/Views/Item/ItemView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | 3 | namespace GDS.Core.Views { 4 | 5 | /// 6 | /// A component that displays an item and it's quantity (if aplicable) 7 | /// Has pointer events disabled 8 | /// 9 | public class ItemView : Component { 10 | 11 | public ItemView() { 12 | this.Add("item", 13 | image.WithClass("item-image"), 14 | quant.WithClass("item-quant"), 15 | debug.WithClass("debug-label") 16 | ).IgnorePickChildren(); 17 | } 18 | 19 | VisualElement image = new(); 20 | Label quant = new(); 21 | Label debug = new(); 22 | 23 | override public void Render(Item item) { 24 | debug.text = $"[{item.Name()}]"; 25 | image.style.backgroundImage = new StyleBackground(item.Image()); 26 | quant.text = item.ItemData.Quant.ToString(); 27 | quant.SetVisible(item.ItemBase.Stackable); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /GDS/Core/Inventory/Constants/Sizes.cs: -------------------------------------------------------------------------------- 1 | namespace GDS.Core { 2 | 3 | public static class Sizes { 4 | public static readonly Size Size1x1 = new(1, 1); 5 | public static readonly Size Size1x2 = new(1, 2); 6 | public static readonly Size Size1x3 = new(1, 3); 7 | public static readonly Size Size1x4 = new(1, 4); 8 | public static readonly Size Size2x1 = new(2, 1); 9 | public static readonly Size Size2x2 = new(2, 2); 10 | public static readonly Size Size2x3 = new(2, 3); 11 | public static readonly Size Size3x1 = new(3, 1); 12 | public static readonly Size Size3x2 = new(3, 2); 13 | public static readonly Size Size3x3 = new(3, 3); 14 | public static readonly Size Size3x4 = new(3, 4); 15 | public static readonly Size Size3x5 = new(3, 5); 16 | public static readonly Size Size4x1 = new(4, 1); 17 | public static readonly Size Size4x2 = new(4, 2); 18 | public static readonly Size Size4x3 = new(4, 3); 19 | public static readonly Size Size5x3 = new(5, 3); 20 | }; 21 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/InputManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using GDS.Core.Events; 4 | using GDS.Basic.Events; 5 | 6 | namespace GDS.Basic { 7 | public class InputManager : MonoBehaviour { 8 | 9 | Action Publish = Store.Bus.Publish; 10 | 11 | private void Update() { 12 | if (Input.GetKeyDown(KeyCode.Alpha1)) Publish(new HotbarUseEvent(1)); 13 | if (Input.GetKeyDown(KeyCode.Alpha2)) Publish(new HotbarUseEvent(2)); 14 | if (Input.GetKeyDown(KeyCode.Alpha3)) Publish(new HotbarUseEvent(3)); 15 | if (Input.GetKeyDown(KeyCode.Alpha4)) Publish(new HotbarUseEvent(4)); 16 | if (Input.GetKeyDown(KeyCode.Alpha5)) Publish(new HotbarUseEvent(5)); 17 | 18 | if (Input.GetKeyDown(KeyCode.C)) Publish(new ToggleCharacterSheet()); 19 | if (Input.GetKeyDown(KeyCode.I)) Publish(new ToggleInventoryEvent()); 20 | if (Input.GetKeyDown(KeyCode.Tab)) Publish(new ToggleInventoryEvent()); 21 | if (Input.GetKeyDown(KeyCode.Escape)) Publish(new CloseInventoryEvent()); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Views/RootLayer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UIElements; 3 | using GDS.Core; 4 | using GDS.Core.Views; 5 | using static GDS.Core.DomFactory; 6 | namespace GDS.Minimal { 7 | /// 8 | /// The Root Layer is the top-most visual element 9 | /// 10 | public class RootLayer : VisualElement { 11 | public new class UxmlFactory : UxmlFactory { } 12 | public RootLayer() { 13 | var store = Store.Instance; 14 | // This declatative call creates the visual tree structure 15 | // adds the `root-layer` uss class to current element 16 | this.Add("root-layer", 17 | // adds a view that renders the `Main Inventory` 18 | ListBagView(store.MainInventory) 19 | ) 20 | // adds a view that displays the currently dragged item 21 | .WithGhostItemBehavior(store.DraggedItem) 22 | // adds a behavior that controls picking and placing items (default is pick and place on `MouseUp`) 23 | .WithDragToPickBehavior(store.DraggedItem, store.Bus); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Resources/Basic/BasicTooltip.uss: -------------------------------------------------------------------------------- 1 | /* TODO: extract colors to vars */ 2 | .tooltip { 3 | position: absolute; 4 | border-width: 2px; 5 | padding: 16px; 6 | min-width: 10px; 7 | background-color: #180e0a; 8 | border-color: #af5f1c; 9 | /* translate: -50% -100%; */ 10 | } 11 | 12 | .tooltip__item-name { 13 | -unity-text-align: middle-center; 14 | font-size: 20px; 15 | } 16 | 17 | .tooltip__item-cost { 18 | margin-top: 8px; 19 | padding-top: 8px; 20 | border-top-width: 1px; 21 | border-color: #888; 22 | font-size: 14px; 23 | color: #888; 24 | -unity-text-align: middle-center; 25 | } 26 | 27 | .tooltip__affix-text { 28 | font-size: 14px; 29 | color: #888; 30 | -unity-text-align: middle-center; 31 | } 32 | 33 | .Unique .tooltip__item-cost, 34 | .Unique { 35 | /* color: #af5f1c; */ 36 | background-color: #180e0a; 37 | border-color: #af5f1c; 38 | } 39 | 40 | .Rare .tooltip__item-cost, 41 | .Rare { 42 | /* color: #fefe76; */ 43 | background-color: #442e19; 44 | border-color: #ac8222; 45 | } 46 | 47 | .Magic .tooltip__item-cost, 48 | .Magic { 49 | /* color: #8787fe; */ 50 | background-color: #182224; 51 | border-color: #424a67; 52 | } 53 | 54 | .Common .tooltip__item-cost, 55 | .NoRarity .tooltip__item-cost, 56 | .NoRarity, 57 | .Common { 58 | /* color: #c8c8c8; */ 59 | background-color: #2e2e2e; 60 | border-color: #908380; 61 | } 62 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/InventoryView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core; 3 | using GDS.Core.Views; 4 | using GDS.Basic.Views; 5 | using static GDS.Core.Dom; 6 | 7 | 8 | namespace GDS.Basic { 9 | 10 | public class InventoryView : VisualElement { 11 | public new class UxmlFactory : UxmlFactory { } 12 | public InventoryView() { 13 | var store = Store.Instance; 14 | 15 | 16 | 17 | this.Add("window", 18 | Components.CloseButton(store.Main), 19 | Gold(), 20 | Div( 21 | Title("Equipment (Equipment only)"), 22 | new EquipmentView(store.Equipment)), 23 | Div( 24 | Title("Inventory (Unrestricted)"), 25 | new ListBagView(store.Main)), 26 | Div( 27 | Title("Hotbar (Consumables only)"), 28 | new ListBagView(store.Hotbar)) 29 | ).Gap(50); 30 | 31 | } 32 | 33 | VisualElement Gold() { 34 | var label = Label("player-gold-label", ""); 35 | var icon = Div("player-gold-icon"); 36 | var el = Div("player-gold", icon, label); 37 | el.Observe(Store.Instance.Gold, value => label.text = value.ToString()); 38 | return el; 39 | } 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /GDS/Core/Events/EventBus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace GDS.Core.Events { 5 | /// 6 | /// EventBus defines a channel on which events can be published and it allows subscribers be notified when 7 | /// an event of that type has been published on the channel 8 | /// 9 | public class EventBus { 10 | public static readonly EventBus GlobalBus = new(); 11 | 12 | public Dictionary>> subscribersByType = new(); 13 | 14 | public void Subscribe(Action eventHandler) where T : CustomEvent { 15 | var type = typeof(T); 16 | if (!subscribersByType.TryGetValue(type, out var subscribers)) subscribersByType.Add(type, new()); 17 | subscribersByType[type].Add(eventHandler); 18 | } 19 | 20 | public void Unsubscribe(Action eventHandler) where T : CustomEvent { 21 | if (subscribersByType.TryGetValue(typeof(T), out var subscribers)) subscribers.Remove(eventHandler); 22 | } 23 | 24 | // A `NoEvent` will never get published 25 | public void Publish(CustomEvent CustomEvent) { 26 | if (CustomEvent is NoEvent) return; 27 | if (subscribersByType.TryGetValue(CustomEvent.GetType(), out var subscribers)) subscribers.ForEach(s => s.Invoke(CustomEvent)); 28 | } 29 | 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/BasicPanelSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: BasicPanelSettings 14 | m_EditorClassIdentifier: 15 | themeUss: {fileID: -4733365628477956816, guid: 713406d6855c5cd4e9a68dfd7ec4d241, type: 3} 16 | m_TargetTexture: {fileID: 0} 17 | m_ScaleMode: 2 18 | m_ReferenceSpritePixelsPerUnit: 100 19 | m_Scale: 1 20 | m_ReferenceDpi: 96 21 | m_FallbackDpi: 96 22 | m_ReferenceResolution: {x: 1920, y: 1080} 23 | m_ScreenMatchMode: 0 24 | m_Match: 0 25 | m_SortingOrder: 0 26 | m_TargetDisplay: 0 27 | m_ClearDepthStencil: 1 28 | m_ClearColor: 0 29 | m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0} 30 | m_DynamicAtlasSettings: 31 | m_MinAtlasSize: 64 32 | m_MaxAtlasSize: 4096 33 | m_MaxSubTextureSize: 64 34 | m_ActiveFilters: -1 35 | m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} 36 | m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} 37 | m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} 38 | textSettings: {fileID: 0} 39 | -------------------------------------------------------------------------------- /GDS/Demos/Minimal/MinimalPanelSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: MinimalPanelSettings 14 | m_EditorClassIdentifier: 15 | themeUss: {fileID: -4733365628477956816, guid: 4554af69dc277f4448d7917992291252, type: 3} 16 | m_TargetTexture: {fileID: 0} 17 | m_ScaleMode: 1 18 | m_ReferenceSpritePixelsPerUnit: 100 19 | m_Scale: 1 20 | m_ReferenceDpi: 96 21 | m_FallbackDpi: 96 22 | m_ReferenceResolution: {x: 1200, y: 800} 23 | m_ScreenMatchMode: 0 24 | m_Match: 0 25 | m_SortingOrder: 0 26 | m_TargetDisplay: 0 27 | m_ClearDepthStencil: 1 28 | m_ClearColor: 0 29 | m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0} 30 | m_DynamicAtlasSettings: 31 | m_MinAtlasSize: 64 32 | m_MaxAtlasSize: 4096 33 | m_MaxSubTextureSize: 64 34 | m_ActiveFilters: -1 35 | m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} 36 | m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} 37 | m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} 38 | textSettings: {fileID: 0} 39 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/ChestWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine.UIElements; 4 | using GDS.Core.Views; 5 | using GDS.Core; 6 | using GDS.Core.Events; 7 | using GDS.Basic.Views; 8 | using static GDS.Core.Dom; 9 | namespace GDS.Basic { 10 | 11 | public class ChestWindow : VisualElement { 12 | 13 | public ChestWindow(ListBag chest, string titleText = "Chest (Remove Only)") { 14 | 15 | Action onCollectClick = () => { 16 | var items = chest.Slots.Select(slot => slot.Item).ToArray(); 17 | Store.Bus.Publish(new CollectAllEvent(chest, items)); 18 | }; 19 | 20 | 21 | var defaultState = Div("container", 22 | new ListBagView>(chest), 23 | Button("collect-button", "Collect all", onCollectClick) 24 | ); 25 | var emptyState = Label("empty-message", "[Empty]"); 26 | 27 | this.Add("window chest", 28 | Components.CloseButton(chest), 29 | Title(titleText), 30 | emptyState, 31 | defaultState 32 | ); 33 | 34 | this.Observe(chest.Data, (_) => { 35 | if (chest.IsEmpty()) { 36 | defaultState.Hide(); 37 | emptyState.Show(); 38 | return; 39 | } 40 | 41 | emptyState.Hide(); 42 | defaultState.Show(); 43 | }); 44 | 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/EquipmentView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core; 3 | 4 | namespace GDS.Basic { 5 | public class EquipmentView : VisualElement { 6 | public EquipmentView(SetBag equipment) { 7 | var helmet = CreateSlotView(SlotType.Helmet, equipment); 8 | var weapon = CreateSlotView(SlotType.Weapon, equipment); 9 | var gloves = CreateSlotView(SlotType.Gloves, equipment); 10 | var boots = CreateSlotView(SlotType.Boots, equipment); 11 | var bodyArmor = CreateSlotView(SlotType.BodyArmor, equipment); 12 | 13 | this.Add("equipment slot-container", 14 | helmet.WithClass("equipment-slot helmet"), 15 | bodyArmor.WithClass("equipment-slot body-armor"), 16 | gloves.WithClass("equipment-slot gloves"), 17 | boots.WithClass("equipment-slot boots"), 18 | weapon.WithClass("equipment-slot weapon")); 19 | 20 | this.Observe(equipment.Data, (data) => { 21 | helmet.Data = equipment.GetSlot(SlotType.Helmet); 22 | weapon.Data = equipment.GetSlot(SlotType.Weapon); 23 | gloves.Data = equipment.GetSlot(SlotType.Gloves); 24 | boots.Data = equipment.GetSlot(SlotType.Boots); 25 | bodyArmor.Data = equipment.GetSlot(SlotType.BodyArmor); 26 | }); 27 | } 28 | 29 | BasicSlotView CreateSlotView(SlotType slotType, SetBag bag) => new BasicSlotView(bag.GetSlot(slotType), bag); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/BasicItemView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core.Views; 3 | using GDS.Core; 4 | 5 | namespace GDS.Basic.Views { 6 | public class BasicItemView : Component { 7 | 8 | public BasicItemView() { 9 | 10 | this.Add("item", 11 | bg.WithClass("item-background"), 12 | image.WithClass("item-image"), 13 | quant.WithClass("item-quant"), 14 | debug.WithClass("debug-label") 15 | ).IgnorePickChildren(); 16 | } 17 | 18 | VisualElement bg = new(); 19 | VisualElement image = new(); 20 | Label quant = new(); 21 | Label debug = new(); 22 | 23 | override public void Render(Item item) { 24 | debug.text = $"[{item.Name()}]\n[{item.Rarity()}]"; 25 | var rarityClassname = RarityClassName(item.Rarity()); 26 | bg.ClearClassList(); 27 | bg.WithClass("item-background " + rarityClassname); 28 | image.style.backgroundImage = new StyleBackground(item.Image()); 29 | quant.text = item.ItemData.Quant.ToString(); 30 | quant.style.display = item.ItemBase.Stackable ? DisplayStyle.Flex : DisplayStyle.None; 31 | } 32 | 33 | public string RarityClassName(Rarity rarity) => rarity switch { 34 | Rarity.Unique => "item-rarity__unique", 35 | Rarity.Rare => "item-rarity__rare", 36 | Rarity.Magic => "item-rarity__magic", 37 | _ => "item-rarity__no-rarity" 38 | }; 39 | } 40 | } -------------------------------------------------------------------------------- /GDS/Core/Views/Slot/SlotView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine; 4 | using UnityEngine.UIElements; 5 | 6 | 7 | namespace GDS.Core.Views { 8 | 9 | public interface ISlotView { 10 | public Slot Data { get; } 11 | public Bag Bag { get; } 12 | public Rect Bounds { get; } 13 | public Rect GetBounds(); 14 | } 15 | 16 | public class BaseSlotView : Component, ISlotView { 17 | public BaseSlotView(Slot slot, Bag bag) { Data = slot; Bag = bag; Bounds = worldBound; } 18 | public Bag Bag { get; private set; } 19 | public Rect Bounds { get; private set; } 20 | public Rect GetBounds() { 21 | return new Rect(); 22 | } 23 | } 24 | 25 | /// 26 | /// A component that displays a slot in an inventory 27 | /// 28 | public class SlotView : BaseSlotView where T : Component { 29 | 30 | public SlotView(Slot slot, Bag bag) : base(slot, bag) { 31 | this.Add("slot", 32 | debug.WithClass("debug-label"), 33 | itemView, 34 | overlay.WithClass("cover overlay") 35 | ).IgnorePickChildren(); 36 | } 37 | 38 | Label debug = new(); 39 | VisualElement overlay = new(); 40 | T itemView = Activator.CreateInstance(); 41 | 42 | override public void Render(Slot slot) { 43 | debug.text = $"[{slot.Item.Name()}]"; 44 | itemView.Data = slot.Item; 45 | EnableInClassList("empty", slot.IsEmpty()); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/CharacterSheetWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core; 3 | using GDS.Core.Views; 4 | using GDS.Basic.Views; 5 | using static GDS.Core.Dom; 6 | using System.Linq; 7 | 8 | 9 | namespace GDS.Basic { 10 | 11 | public class CharacterSheetWindow : VisualElement { 12 | public new class UxmlFactory : UxmlFactory { } 13 | public CharacterSheetWindow() { 14 | var store = Store.Instance; 15 | 16 | var Defense = Label("character-line", "Defense"); 17 | var DPS = Label("character-line", "DPS"); 18 | this.Add("window character-sheet", 19 | Components.CloseButton(store.Main), 20 | Title("Character Sheet"), 21 | Div( 22 | Defense, 23 | DPS 24 | ) 25 | ).Gap(50); 26 | 27 | this.Observe(Store.Instance.CharacterSheet.Stats, (data) => { 28 | Defense.text = $"Defense: {DefenseStr(data.Defense)}"; 29 | DPS.text = $"Damage: {DamageStr(data.Damage)}" + "/s".DarkGray(); 30 | }); 31 | 32 | } 33 | 34 | string DefenseStr(int value) => value switch { 35 | <= 40 => value.ToString().Red(), 36 | <= 70 => value.ToString().Yellow(), 37 | _ => value.ToString().Blue() 38 | }; 39 | 40 | string DamageStr(float value) => value switch { 41 | <= 0 => value.ToString().Red(), 42 | _ => value.ToString().Green() 43 | }; 44 | 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /GDS/Core/Utils/ColorUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace GDS.Core { 4 | 5 | public static class Colors { 6 | 7 | public const string Red = "red"; 8 | public const string Yellow = "yellow"; 9 | public const string Green = "green"; 10 | public const string Orange = "orange"; 11 | public const string Brown = "brown"; 12 | public const string Black = "black"; 13 | public const string Blue = "#3881d4"; 14 | public const string Pink = "#e665df"; 15 | public const string Gray = "#999"; 16 | public const string DarkGray = "#555"; 17 | } 18 | 19 | public static class ColorUtil { 20 | public static Func ColorTag(string color) => (string text) => $"{text}"; 21 | public static string Red(this string str) => ColorTag(Colors.Red)(str); 22 | public static string Pink(this string str) => ColorTag(Colors.Pink)(str); 23 | public static string Green(this string str) => ColorTag(Colors.Green)(str); 24 | public static string Orange(this string str) => ColorTag(Colors.Orange)(str); 25 | public static string Yellow(this string str) => ColorTag(Colors.Yellow)(str); 26 | public static string Blue(this string str) => ColorTag(Colors.Blue)(str); 27 | public static string Brown(this string str) => ColorTag(Colors.Brown)(str); 28 | public static string Black(this string str) => ColorTag(Colors.Black)(str); 29 | public static string Gray(this string str) => ColorTag(Colors.Gray)(str); 30 | public static string DarkGray(this string str) => ColorTag(Colors.DarkGray)(str); 31 | } 32 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Editor/Debug.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEngine.UIElements; 4 | using GDS.Core; 5 | using static GDS.Core.Dom; 6 | using static GDS.Core.DebugUtil; 7 | 8 | namespace GDS.Basic { 9 | 10 | public class DebugWindow : EditorWindow { 11 | [MenuItem("Tools/Basic/Debug")] 12 | public static void Open() { 13 | var wnd = GetWindow(); 14 | wnd.titleContent = new GUIContent("Basic::Debug"); 15 | } 16 | 17 | public void CreateGUI() { 18 | var root = rootVisualElement; 19 | root.styleSheets.Add(Resources.Load("Basic/BasicTheme")); 20 | root.Add("debug-window", 21 | Div("gap-v-20", 22 | DraggedItemDebug(Store.Instance.DraggedItem, CustomItemText), 23 | new ScrollView().Add( 24 | SetBagDebug(Store.Instance.Equipment, CustomSetSlotText), 25 | ListBagDebug(Store.Instance.Main, CustomSlotText), 26 | ListBagDebug(Store.Instance.Hotbar, CustomSlotText), 27 | ListBagDebug(Store.Instance.Chest, CustomSlotText), 28 | ListBagDebug(Store.Instance.EquipmentShop, CustomSlotText) 29 | ) 30 | ) 31 | ); 32 | } 33 | 34 | string CustomItemText(Item item) => $"{item.Name()} ({item.ItemData.Quant}) [id: {item.Id}, {item.Rarity()}]"; 35 | string CustomSlotText(ListSlot slot) => $"{slot.Index}: {CustomItemText(slot.Item)}"; 36 | string CustomSetSlotText(SetSlot slot) => $"{slot.Key}: {CustomItemText(slot.Item)}"; 37 | 38 | 39 | 40 | 41 | 42 | } 43 | 44 | 45 | 46 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/BagData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using System.Linq; 5 | using GDS.Core; 6 | using GDS.Core.Events; 7 | using UnityEngine; 8 | 9 | 10 | 11 | namespace GDS.Basic { 12 | public enum BagType { Chest, Stash, Shop } 13 | public class BagData : MonoBehaviour { 14 | [Tooltip("Must be unique")] 15 | [SerializeField] string Id; 16 | [SerializeField] BagType BagType = BagType.Chest; 17 | [SerializeField][Range(1, 80)] int MaxSize = 10; 18 | [Space(10)] 19 | [SerializeReference] List Items; 20 | public Bag Bag { get; private set; } 21 | 22 | void OnEnable() { 23 | Store.Bus.Subscribe(OnReset); 24 | } 25 | void OnDisable() { 26 | Store.Bus.Unsubscribe(OnReset); 27 | } 28 | 29 | 30 | void Awake() { 31 | if (Id == "") Id = "Interactible" + UnityEngine.Random.Range(0, 10000); 32 | Bag = CreateBag(BagType, Id, MaxSize); 33 | var state = Items.Select(item => Factory.CreateItem(Bases.Get(item.BaseId), item.Rarity, item.Quant)); 34 | Bag.SetState(state.ToArray()); 35 | } 36 | 37 | void OnReset(CustomEvent e) { 38 | var state = Items.Select(item => Factory.CreateItem(Bases.Get(item.BaseId), item.Rarity, item.Quant)); 39 | Bag.SetState(state.ToArray()); 40 | } 41 | 42 | Bag CreateBag(BagType bagType, string id, int size) => bagType switch { 43 | BagType.Chest => Factory.CreateChest(id, size), 44 | BagType.Stash => Factory.CreateStash(id, size), 45 | BagType.Shop => Factory.CreateShop(id, size), 46 | _ => Bag.NoBag 47 | }; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Types.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using GDS.Core; 3 | 4 | namespace GDS.Basic { 5 | public record ItemData(Rarity Rarity, int Quant = 1) : Core.ItemData(Quant); 6 | public record ItemBase(string Id, string Name, string IconPath, bool Stackable, ItemClass Class) : Core.ItemBase(Id, Name, IconPath, Stackable, Sizes.Size1x1); 7 | public record ArmorItemBase(string Id, string Name, string IconPath, ItemClass Class, int Defense) : ItemBase(Id, Name, IconPath, false, Class); 8 | public record WeaponItemBase(string Id, string Name, string IconPath, ItemClass Class, int Attack, float AttackSpeed) : ItemBase(Id, Name, IconPath, false, Class); 9 | public record CraftingOutcomeSlot(Item Item) : Slot(Item); 10 | public record CraftingBench(string Id, int Size, Observable> Data, Observable OutcomeSlot) : ListBag(Id, Size, Data); 11 | public record Main(string Id, int Size, Observable> Data) : ListBag(Id, Size, Data); 12 | public record Stash(string Id, int Size, Observable> Data) : ListBag(Id, Size, Data); 13 | public record Vendor(string Id, int Size, Observable> Data) : DenseListBag(Id, Size, Data) { public bool Infinite = false; }; 14 | public record Chest(string Id, int Size, Observable> Data) : DenseListBag(Id, Size, Data); 15 | public record Recipe(Core.ItemBase Item1, Core.ItemBase Item2, Core.ItemBase Item3); 16 | public record CharacterStats(int Defense, float Damage); 17 | 18 | 19 | public enum ItemClass { NoItemClass, Helmet, Gloves, BodyArmor, Boots, Weapon1H, Weapon2H, Consumable, Material, Ring, Amulet, } 20 | public enum Rarity { NoRarity, Common, Magic, Rare, Unique, } 21 | public enum SlotType { Helmet, Gloves, BodyArmor, Boots, Weapon, } 22 | 23 | } -------------------------------------------------------------------------------- /GDS/Core/Views/LogMessage/LogMessageView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core.Events; 3 | 4 | namespace GDS.Core.Views { 5 | 6 | /// 7 | /// Displays a message queue in the bottom left corner 8 | /// Removes message after a delay (3 seconds) 9 | /// Hides itself when queue is empty 10 | /// 11 | public class LogMessageView : VisualElement { 12 | 13 | public LogMessageView(EventBus bus) { 14 | this.WithClass("message-container").Hide(); 15 | this.SubscribeTo(bus, e => AddMessage(CreateFailMessage((ActionFail)e))); 16 | this.SubscribeTo(bus, e => AddMessage("Crafted ".Green() + ((CraftItemSuccess)e).Item.Name())); 17 | this.SubscribeTo(bus, e => AddMessage("Destroyed ".Red() + ((DestroyItemSuccess)e).Item.Name() + "!")); 18 | this.SubscribeTo(bus, e => AddMessage("Consumed ".Green() + ((ConsumeItemSuccess)e).Item.Name())); 19 | this.SubscribeTo(bus, e => AddMessage("Bought ".Blue() + ((BuyItemSuccess)e).Item.Name())); 20 | this.SubscribeTo(bus, e => AddMessage("Sold ".Blue() + ((SellItemSuccess)e).Item.Name())); 21 | } 22 | 23 | string CreateFailMessage(ActionFail e) => e.Severity switch { 24 | Severity.Info => e.Reason.Blue(), 25 | Severity.Warning => e.Reason.Yellow(), 26 | Severity.Error => e.Reason.Red(), 27 | _ => e.Reason 28 | }; 29 | 30 | void AddMessage(string message) { 31 | this.Show(); 32 | var label = Dom.Label("message", message); 33 | Add(label); 34 | schedule.Execute(() => { 35 | Remove(label); 36 | if (childCount == 0) this.Hide(); 37 | }).ExecuteLater(3000); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Factory.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using GDS.Core; 3 | using GDS.Core.Events; 4 | using static GDS.Core.InventoryFactory; 5 | 6 | namespace GDS.Basic { 7 | public static class Factory { 8 | public static Item CreateItem(ItemBase itemBase, Rarity rarity, int quant = 1) => InventoryFactory.Create(itemBase, new ItemData(rarity, quant)); 9 | public static Item CreateRandom() => InventoryFactory.Create(Bases.RandomBase(), Core.ItemData.NoItemData); 10 | 11 | public static CraftingBench CreateCraftingBench(string id, int size) { 12 | var slots = Enumerable.Range(0, size).Select(InventoryFactory.CreateListSlot).ToList(); 13 | var outcome = new CraftingOutcomeSlot(Item.NoItem) { Accepts = Core.Filters.Nothing }; 14 | var bag = new CraftingBench(id, size, new(slots), new(outcome)); 15 | return bag; 16 | } 17 | 18 | public static Chest CreateChest(string id, int size) => CreateListBag(id, size) with { Accepts = Core.Filters.Nothing }; 19 | public static Stash CreateStash(string id, int size) => CreateListBag(id, size); 20 | public static Vendor CreateShop(string id, int size) => CreateListBag(id, size); 21 | 22 | public static SetSlot[] CreateEquipmentSlots() => new SetSlot[] { 23 | CreateSetSlot(SlotType.Helmet.ToString(), Filters.Helmet), 24 | CreateSetSlot(SlotType.BodyArmor.ToString(), Filters.BodyArmor), 25 | CreateSetSlot(SlotType.Gloves.ToString(), Filters.Gloves), 26 | CreateSetSlot(SlotType.Boots.ToString(), Filters.Boots), 27 | CreateSetSlot(SlotType.Weapon.ToString(), Filters.Weapon), 28 | }; 29 | 30 | public static MessageEvent CreateMessageEvent(string action, Item item, bool showQuant = true) { 31 | var quantText = (showQuant && item.ItemBase.Stackable) ? $" ({item.ItemData.Quant})" : ""; 32 | return new MessageEvent(action + " " + $"[{item.Name()}{quantText}]".Blue()); 33 | } 34 | 35 | 36 | } 37 | } -------------------------------------------------------------------------------- /GDS/Demos/Minimal/Resources/Minimal/MinimalStyles.uss: -------------------------------------------------------------------------------- 1 | :root { 2 | --bg-slice-size: 45; 3 | --cell-size: 64px; 4 | } 5 | 6 | .root-layer { 7 | position: absolute; 8 | width: 100%; 9 | height: 100%; 10 | align-items: center; 11 | justify-content: center; 12 | } 13 | 14 | .display-none { 15 | display: none; 16 | } 17 | 18 | .debug-label { 19 | display: none; 20 | position: absolute; 21 | color: #999; 22 | } 23 | 24 | .debug-window { 25 | padding: 10px 16px; 26 | } 27 | 28 | .list-bag { 29 | padding: 64px; 30 | background-image: resource("Shared/Images/backgrounds/bg-window"); 31 | -unity-slice-top: var(--bg-slice-size); 32 | -unity-slice-right: var(--bg-slice-size); 33 | -unity-slice-bottom: var(--bg-slice-size); 34 | -unity-slice-left: var(--bg-slice-size); 35 | } 36 | 37 | .list-bag .slot-container { 38 | flex-direction: row; 39 | flex-wrap: wrap; 40 | max-width: 1000px; 41 | width: 660px; 42 | } 43 | 44 | .slot { 45 | width: 64px; 46 | height: 64px; 47 | background-image: resource("Shared/Images/backgrounds/bg-slot"); 48 | margin: 0 1px 1px 0; 49 | border-width: 1px; 50 | border-color: #666; 51 | overflow: hidden; 52 | } 53 | 54 | .slot:hover { 55 | border-width: 1px; 56 | border-color: #b8abf5; 57 | } 58 | 59 | .item { 60 | min-width: var(--cell-size); 61 | min-height: var(--cell-size); 62 | } 63 | 64 | .item-image { 65 | width: 100%; 66 | height: 100%; 67 | background-size: contain; 68 | } 69 | 70 | .item-quant { 71 | position: absolute; 72 | right: 1px; 73 | bottom: 1px; 74 | background-color: rgba(31, 31, 31, 0.75); 75 | color: #d2d2d2; 76 | padding: 0px 4px; 77 | } 78 | 79 | .ghost-item { 80 | position: absolute; 81 | translate: -50% -50%; 82 | border-width: 1px; 83 | border-color: #555; 84 | } 85 | 86 | .overlay { 87 | position: absolute; 88 | width: 100%; 89 | height: 100%; 90 | } 91 | 92 | .legal-action .overlay { 93 | background-color: rgba(200, 255, 200, 0.25); 94 | } 95 | .illegal-action .overlay { 96 | background-color: rgba(247, 57, 57, 0.37); 97 | } 98 | 99 | .title { 100 | color: #aaa; 101 | font-size: 16px; 102 | margin: 4px 0; 103 | } 104 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/CraftingBenchView.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEngine.UIElements; 4 | using GDS.Core; 5 | using GDS.Basic.Views; 6 | using UnityEngine; 7 | 8 | namespace GDS.Basic { 9 | public class CraftingBenchView : VisualElement { 10 | 11 | public CraftingBenchView(CraftingBench bag) { 12 | var Slots = bag.Slots.Select(x => new BasicSlotView(x, bag)).ToArray(); 13 | var Result = new BasicSlotView(bag.OutcomeSlot.Value, bag); 14 | 15 | this.Add("window gap-v-20", 16 | Components.CloseButton(bag), 17 | Dom.Title("Crafting bench"), 18 | Result.WithClass("crafting-bench__result-slot"), 19 | Dom.Div("slot-container", Slots), 20 | Hints() 21 | ); 22 | 23 | this.Observe(bag.Data, (p) => { 24 | 25 | for (var i = 0; i < bag.Slots.Count; i++) Slots[i].Data = bag.Slots[i]; 26 | // TODO: move this to a dedicated inventory function - a view should only represent the state 27 | // Creating the result in the view prevents a debug view from seeing the result 28 | var input = bag.Slots.Select(slot => slot.Item.ItemBase()).ToList(); 29 | var recipe = new Recipe(input[0], input[1], input[2]); 30 | // Debug.Log($"recipe\n {recipe.one}\n {recipe.two}\n {recipe.three}"); 31 | if (!Recipes.All.ContainsKey(recipe)) { 32 | Result.Data = Result.Data.Clear(); 33 | return; 34 | } 35 | 36 | var output = Recipes.All.GetValueOrDefault(recipe); 37 | Result.Data = Result.Data with { Item = Factory.CreateItem(output, Rarity.Common) }; 38 | }); 39 | } 40 | 41 | VisualElement Hints() { 42 | var recipes = Recipes.All.Keys.ToArray(); 43 | System.Func hintStr = (Recipe r) => r.Item1?.Name + " - " + r.Item2?.Name + " - " + r.Item3?.Name; 44 | var el = Dom.Div(Dom.Label("Try:")); 45 | el.Add(Dom.Div("hints", recipes.Select(r => Dom.Label(hintStr(r))).ToArray())); 46 | return el; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /GDS/Core/Utils/LogUtil.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Text.RegularExpressions; 4 | using UnityEngine; 5 | 6 | namespace GDS.Core { 7 | /// 8 | /// Contains logging utility extension methods 9 | /// 10 | public static class LogUtil { 11 | 12 | public static void Log(IEnumerable obj) => Debug.Log(obj.Count() == 0 ? "[Collection is empty]" : string.Join("\n", obj).Colorize()); 13 | public static void Log(params object[] args) => Debug.Log(string.Join(" ", args)); 14 | public static void LogTodo(params object[] args) => Debug.Log("[TODO] ".Orange() + string.Join(" ", args)); 15 | public static void LogWarning(params object[] args) => Debug.LogWarning("[WARNING] ".Yellow() + string.Join(" ", args)); 16 | public static void LogError(params object[] args) => Debug.Log("[ERROR] ".Red() + string.Join(" ", args)); 17 | public static void LogEvent(object e) => Debug.Log($"[ON::{e.GetType().Name.Yellow()}] " + e.ToString().Colorize()); 18 | public static T LogAndReturn(this T value, string message) { Debug.Log(message); return value; } 19 | 20 | // string and collection 21 | public static string CommaJoin(this IEnumerable coll) => string.Join(", ", coll); 22 | public static string NewLineJoin(this IEnumerable coll) => "\n" + string.Join("\n", coll); 23 | public static string Colorize(this string input, string pattern = @"[{}=;,]") => Regex.Replace(input, pattern, match => match.Value switch { 24 | "," => match.Value.Blue(), 25 | ";" => match.Value.Blue(), 26 | "=" => match.Value.Yellow(), 27 | _ => match.Value.Pink() 28 | }); 29 | public static string AsString(this List list) => string.Join("\n", list); 30 | public static string AsString(this Dictionary list) => string.Join("\n", list); 31 | 32 | public static string ColorizeMatrixValues(this string input, string pattern = @"[0-9,|,_,.,-]|\bNoItem\b") => Regex.Replace(input, pattern, match => match.Value switch { 33 | "1" => match.Value.Green(), 34 | "2" => match.Value.Yellow(), 35 | "3" => match.Value.Red(), 36 | "4" => match.Value.Red(), 37 | _ => match.Value.DarkGray() 38 | }); 39 | 40 | } 41 | } -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Styles/Utility.uss: -------------------------------------------------------------------------------- 1 | /* These are some utility classes that allow for easier layout directly in the `template` */ 2 | /* It includes some predefined values for flex direction, positioning, margins, padding, gap, etc */ 3 | /* The concept is inpired by `Tailwind CSS` - https://tailwindcss.com/docs/styling-with-utility-classes*/ 4 | :root { 5 | } 6 | 7 | .display-none { 8 | display: none; 9 | } 10 | 11 | .display-flex { 12 | display: flex; 13 | } 14 | 15 | .absolute { 16 | position: absolute; 17 | } 18 | 19 | .cover, 20 | .absolute-fill { 21 | position: absolute; 22 | top: 0; 23 | right: 0; 24 | bottom: 0; 25 | left: 0; 26 | } 27 | 28 | /* Flex */ 29 | .row { 30 | flex-direction: row; 31 | } 32 | 33 | .column { 34 | flex-direction: column; 35 | } 36 | 37 | .stretch { 38 | align-self: stretch; 39 | } 40 | 41 | .flex-1 { 42 | flex-grow: 1; 43 | flex-shrink: 0; 44 | flex-basis: 0; 45 | } 46 | 47 | .flex-2 { 48 | flex-grow: 2; 49 | flex-shrink: 0; 50 | flex-basis: 0; 51 | } 52 | 53 | .flex-grow-1 { 54 | flex-grow: 1; 55 | } 56 | 57 | .flex-shrink-0 { 58 | flex-shrink: 0; 59 | } 60 | 61 | /* Flex align/justify */ 62 | .align-self-center { 63 | align-self: center; 64 | } 65 | 66 | .justify-center { 67 | justify-content: center; 68 | } 69 | 70 | .align-items-start { 71 | align-items: flex-start; 72 | } 73 | 74 | .align-items-end { 75 | align-items: flex-end; 76 | } 77 | 78 | .align-items-center { 79 | align-items: center; 80 | } 81 | 82 | /* Margins */ 83 | .mb-10 { 84 | margin-bottom: 10px; 85 | } 86 | 87 | .mb-20 { 88 | margin-bottom: 10px; 89 | } 90 | 91 | .m-50 { 92 | margin: 50px; 93 | } 94 | 95 | .mt-20 { 96 | margin-top: 20px; 97 | } 98 | 99 | .mt-50 { 100 | margin-top: 50px; 101 | } 102 | 103 | .mr-20 { 104 | margin-right: 20px; 105 | } 106 | 107 | .mr-50 { 108 | margin-right: 50px; 109 | } 110 | 111 | .mr-100 { 112 | margin-right: 100px; 113 | } 114 | 115 | /* Padding */ 116 | .p-20 { 117 | padding: 20px; 118 | } 119 | 120 | .p-50 { 121 | padding: 50px; 122 | } 123 | 124 | .w-half { 125 | width: 50%; 126 | } 127 | 128 | /* Gap Horizontal */ 129 | .gap-h-20 > * { 130 | margin-right: 20px; 131 | } 132 | 133 | /* Gap Vertical */ 134 | .gap-v-8 > * { 135 | margin-bottom: 8px; 136 | } 137 | .gap-v-20 > * { 138 | margin-bottom: 20px; 139 | } 140 | -------------------------------------------------------------------------------- /GDS/Core/Utils/DebugUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine.UIElements; 4 | using static GDS.Core.Dom; 5 | 6 | namespace GDS.Core { 7 | public static class DebugUtil { 8 | public static Func ColorFn(Slot slot) => slot.IsEmpty() ? ColorUtil.Gray : x => x; 9 | public static Func ColorFn(Item item) => item is NoItem ? ColorUtil.Gray : x => x; 10 | public static string SlotText(ListSlot slot) => $"{slot.Index}: {ItemText(slot.Item)}"; 11 | public static string SetSlotText(SetSlot slot) => $"[{slot.Key}]: {ItemText(slot.Item)}"; 12 | public static string ItemText(Item item) => $"{item.Name()} ({item.ItemData.Quant}) [id: {item.Id}]"; 13 | 14 | public static VisualElement ListBagDebug(ListBag bag) => ListBagDebug(bag, SlotText); 15 | public static VisualElement ListBagDebug(ListBag bag, Func SlotTextFn) { 16 | var el = Div(); 17 | return el.Observe(bag.Data, (_) => { 18 | el.Clear(); 19 | el.Add( 20 | Title(bag.Id), 21 | Div(bag.Slots 22 | .Select(slot => ColorFn(slot)(SlotTextFn(slot))) 23 | .Select(Label) 24 | .ToArray()) 25 | ); 26 | }); 27 | } 28 | 29 | public static VisualElement SetBagDebug(SetBag bag, Func SetSlotText) { 30 | var el = Div(); 31 | return el.Observe(bag.Data, (_) => { 32 | el.Clear(); 33 | el.Add( 34 | Title(bag.Id), 35 | Div(bag.Slots.Values 36 | .Select(slot => ColorFn(slot)(SetSlotText(slot))) 37 | .Select(Label) 38 | .ToArray()) 39 | ); 40 | }); 41 | } 42 | 43 | public static VisualElement DraggedItemDebug(Observable dragged) => DraggedItemDebug(dragged, ItemText); 44 | public static VisualElement DraggedItemDebug(Observable dragged, Func ItemTextFn) { 45 | var el = Div(); 46 | return el.Observe(dragged, item => { 47 | el.Clear(); 48 | el.Div( 49 | Title("Dragged item"), 50 | Label(ColorFn(item)(ItemTextFn(item))) 51 | ); 52 | }); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Styles/UnityControls.uss: -------------------------------------------------------------------------------- 1 | /********* 2 | * Label 3 | **********/ 4 | .unity-label { 5 | color: #d5d5d5; 6 | font-size: 12px; 7 | margin: 0; 8 | padding: 1px; 9 | } 10 | 11 | /********* 12 | * Button 13 | **********/ 14 | .unity-button { 15 | padding: 4px 8px; 16 | background-color: #353131; 17 | border-color: #534e4e; 18 | color: #bbb; 19 | border-width: 1px; 20 | font-size: 12px; 21 | border-radius: 4px; 22 | margin: 4px 8px 4px 0px; 23 | } 24 | 25 | .unity-button:hover:enabled, 26 | .unity-button:hover { 27 | border-color: #aaa; 28 | background-color: #353131; 29 | } 30 | 31 | .unity-button:active { 32 | translate: 0px 1px; 33 | } 34 | 35 | .unity-button:focus { 36 | border-color: #534e4e; 37 | } 38 | 39 | /********* 40 | * Scroller 41 | **********/ 42 | 43 | /* Container */ 44 | .unity-scroller.unity-scroller--vertical { 45 | width: 13px; 46 | } 47 | 48 | .unity-scroller.unity-scroller--horizontal { 49 | height: 13px; 50 | } 51 | /* Button */ 52 | #unity-high-button, 53 | #unity-low-button { 54 | width: 13px; 55 | height: 13px; 56 | background-color: rgba(0, 0, 0, 0); 57 | border-color: rgba(0, 0, 0, 0); 58 | -unity-background-image-tint-color: #888; 59 | } 60 | 61 | #unity-low-button:hover, 62 | #unity-high-button:hover { 63 | background-color: #484848; 64 | } 65 | 66 | /*scroller*/ 67 | .unity-scroller--vertical .unity-base-slider--vertical { 68 | width: 12px; 69 | min-width: 12px; 70 | margin-top: 16px; 71 | margin-bottom: 16px; 72 | background-color: rgba(100, 100, 100, 0.1); 73 | } 74 | 75 | .unity-scroller--horizontal .unity-base-slider--horizontal { 76 | height: 12px; 77 | min-height: 12px; 78 | margin-left: 16px; 79 | margin-right: 16px; 80 | background-color: rgba(100, 100, 100, 0.1); 81 | } 82 | /* tracker */ 83 | #unity-tracker { 84 | background-color: rgba(255, 0, 0, 0); 85 | border-color: rgba(255, 0, 0, 0); 86 | } 87 | /* dragger */ 88 | #unity-dragger { 89 | background-color: #5f5f5f; 90 | border-radius: 6px; 91 | border-color: #323232; 92 | border-width: 1px; 93 | position: relative; 94 | } 95 | 96 | #unity-dragger:hover { 97 | background-color: #686868; 98 | } 99 | 100 | .unity-scroller--vertical .unity-base-slider__dragger { 101 | width: 12px; 102 | min-width: 12px; 103 | left: 1px; 104 | } 105 | 106 | .unity-scroller--horizontal .unity-base-slider__dragger { 107 | height: 12px; 108 | min-height: 12px; 109 | top: 1px; 110 | } 111 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/wood.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65c59ccc59b5690458cb9e5324edc5dc 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 1 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 1 54 | spriteTessellationDetail: -1 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 5e97eb03825dee720800000000000000 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/mushroom.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6270d46c6c1104b448fb5bac5bede74d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 1 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 1 54 | spriteTessellationDetail: -1 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 5e97eb03825dee720800000000000000 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/items/sword-blue.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08d5ec2d201ece949a5e428ba3ea0e63 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 1 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 1 54 | spriteTessellationDetail: -1 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 5e97eb03825dee720800000000000000 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-green-highlight.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mat-green-highlight 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Ints: [] 63 | m_Floats: 64 | - _BumpScale: 1 65 | - _Cutoff: 0.5 66 | - _DetailNormalMapScale: 1 67 | - _DstBlend: 0 68 | - _GlossMapScale: 1 69 | - _Glossiness: 0.5 70 | - _GlossyReflections: 1 71 | - _Metallic: 0 72 | - _Mode: 0 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 0.31547883, g: 0.759, b: 0.290697, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-white.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mat-white 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 2800000, guid: dd29f35641da38647a1eeb1028211f1a, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Ints: [] 63 | m_Floats: 64 | - _BumpScale: 1 65 | - _Cutoff: 0.5 66 | - _DetailNormalMapScale: 1 67 | - _DstBlend: 0 68 | - _GlossMapScale: 1 69 | - _Glossiness: 0.5 70 | - _GlossyReflections: 1 71 | - _Metallic: 0 72 | - _Mode: 0 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 1, g: 1, b: 1, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-magenta.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mat-magenta 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 2800000, guid: 81c078e07a3828a42885510e3d5369a9, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Ints: [] 63 | m_Floats: 64 | - _BumpScale: 1 65 | - _Cutoff: 0.5 66 | - _DetailNormalMapScale: 1 67 | - _DstBlend: 0 68 | - _GlossMapScale: 1 69 | - _Glossiness: 0.5 70 | - _GlossyReflections: 1 71 | - _Metallic: 0 72 | - _Mode: 0 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 1, g: 1, b: 1, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | m_BuildTextureStacks: [] 84 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/built-in/mat-item.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: mat-item 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: 15 | - _ALPHAPREMULTIPLY_ON 16 | m_InvalidKeywords: [] 17 | m_LightmapFlags: 4 18 | m_EnableInstancingVariants: 0 19 | m_DoubleSidedGI: 0 20 | m_CustomRenderQueue: 3000 21 | stringTagMap: 22 | RenderType: Transparent 23 | disabledShaderPasses: [] 24 | m_LockedProperties: 25 | m_SavedProperties: 26 | serializedVersion: 3 27 | m_TexEnvs: 28 | - _BumpMap: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailAlbedoMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _DetailMask: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _DetailNormalMap: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _EmissionMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _MainTex: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _MetallicGlossMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _OcclusionMap: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - _ParallaxMap: 61 | m_Texture: {fileID: 0} 62 | m_Scale: {x: 1, y: 1} 63 | m_Offset: {x: 0, y: 0} 64 | m_Ints: [] 65 | m_Floats: 66 | - _BumpScale: 1 67 | - _Cutoff: 0.5 68 | - _DetailNormalMapScale: 1 69 | - _DstBlend: 10 70 | - _GlossMapScale: 0 71 | - _Glossiness: 0.794 72 | - _GlossyReflections: 1 73 | - _Metallic: 0 74 | - _Mode: 3 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _SmoothnessTextureChannel: 0 78 | - _SpecularHighlights: 1 79 | - _SrcBlend: 1 80 | - _UVSec: 0 81 | - _ZWrite: 0 82 | m_Colors: 83 | - _Color: {r: 0.7467515, g: 0.9150943, b: 0.77645904, a: 0.0627451} 84 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 85 | m_BuildTextureStacks: [] 86 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Views/Components/Tooltip.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.UIElements; 2 | using GDS.Core; 3 | using GDS.Core.Views; 4 | using static GDS.Core.Dom; 5 | 6 | namespace GDS.Basic.Views { 7 | 8 | public class Tooltip : Component { 9 | public Tooltip() { } 10 | 11 | public override void Render(BagItem data) { 12 | Clear(); 13 | ClearClassList(); 14 | this.Add("tooltip " + data.Item.Rarity(), 15 | CreateTooltip(data.Bag, data.Item) 16 | ); 17 | } 18 | 19 | VisualElement CreateTooltip(Bag bag, Item item) => item.ItemBase switch { 20 | WeaponItemBase b => WeaponTooltip(item.Name(), item.Rarity(), b, CostString(item, bag is Vendor)), 21 | ArmorItemBase b => ArmorTooltip(item.Name(), item.Rarity(), b, CostString(item, bag is Vendor)), 22 | _ => OtherTooltip(item.Name(), item.Rarity(), item.Quant(), CostString(item, bag is Vendor)) 23 | }; 24 | 25 | // weapon tooltip - name, rarity, attack, attack speed, dps 26 | VisualElement WeaponTooltip(string name, Rarity rarity, WeaponItemBase itemBase, string cost) => Div( 27 | Label("tooltip__item-name", name), 28 | Label("tooltip__affix-text", $"[{rarity}]").SetVisible(rarity is not Rarity.NoRarity), 29 | Label("tooltip__affix-text", "Attack: " + itemBase.Attack.ToString().Green()), 30 | Label("tooltip__affix-text", "AttackSpeed: " + itemBase.AttackSpeed.ToString().Green()), 31 | Label("tooltip__affix-text", "DPS: " + (itemBase.Attack * itemBase.AttackSpeed).ToString().Pink()), 32 | Label("tooltip__item-cost", cost) 33 | ); 34 | 35 | // armor tooltip - name, rarity, defense 36 | VisualElement ArmorTooltip(string name, Rarity rarity, ArmorItemBase itemBase, string cost) => Div( 37 | Label("tooltip__item-name", name), 38 | Label("tooltip__affix-text", $"[{rarity}]").SetVisible(rarity is not Rarity.NoRarity), 39 | Label("tooltip__affix-text", "Defense: " + itemBase.Defense.ToString().Blue()), 40 | Label("tooltip__item-cost", cost) 41 | ); 42 | 43 | // Other tooltip - name, rarity 44 | VisualElement OtherTooltip(string name, Rarity rarity, int quant, string cost) => Div( 45 | Label("tooltip__item-name", quant > 1 ? $"{name} ({quant})" : name), 46 | Label("tooltip__affix-text", $"[{rarity}]").SetVisible(rarity is not Rarity.NoRarity), 47 | Label("tooltip__item-cost", cost) 48 | ); 49 | 50 | string CostString(Item item, bool isVendor) => isVendor ? "Cost: " + item.Cost() : "Sell value: " + item.SellValue(); 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /GDS/Core/Inventory/Types/Types.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace GDS.Core { 5 | 6 | public record ItemBase(string Id, string Name, string IconPath, bool Stackable, Size Size) { public static ItemBase NoItemBase = new("NoItem", "NoItem", "NoPath", false, Sizes.Size1x1); }; 7 | public record ItemData(int Quant = 1) { public static ItemData NoItemData = new(); }; 8 | public record Item(int Id, ItemBase ItemBase, ItemData ItemData) { public static readonly NoItem NoItem = new(); }; 9 | public record NoItem() : Item(-1, ItemBase.NoItemBase, ItemData.NoItemData); 10 | public record BagItem(Bag Bag, Item Item); 11 | 12 | public record Pos(int X, int Y) { public static readonly NoPos NoPos = new(); }; 13 | public record NoPos() : Pos(0, 0); 14 | public record Size(int W, int H) { public static readonly NoSize NoSize = new(); }; 15 | public record NoSize() : Size(0, 0); 16 | 17 | public delegate bool Filter(Item item); 18 | public delegate bool FilterFn(Item item); 19 | 20 | public record Slot(Item Item) { public static Slot NoSlot = new(Item.NoItem); public FilterFn Accepts = Filters.Everything; }; 21 | 22 | /// 23 | /// A slot with a name, used in inventories like Equipment 24 | /// 25 | public record SetSlot(string Key, Item Item) : Slot(Item); 26 | /// 27 | /// A slot with an index, used in inventories where slot order matters 28 | /// 29 | public record ListSlot(int Index, Item Item) : Slot(Item); 30 | 31 | /// 32 | /// Base type for all bags (inventories) 33 | /// 34 | /// 35 | public abstract record Bag(string Id) { 36 | public static NoBag NoBag = new(); 37 | public FilterFn Accepts = Filters.Everything; 38 | } 39 | public record NoBag() : Bag("NoBag"); 40 | 41 | /// 42 | /// Used in inventories that have named slots 43 | /// For example an Equipment Bag could have 2 weapon slots differentated by their slot name (Main-Hand, Off-Hand) 44 | /// 45 | public record SetBag(string Id, Observable> Data) : Bag(Id) { 46 | public Dictionary Slots = Data.Value; 47 | }; 48 | /// 49 | /// Used in inventories where slots are ordered and item size doesn't matter 50 | /// 51 | public record ListBag(string Id, int Size, Observable> Data) : Bag(Id) { 52 | public List Slots = Data.Value; 53 | }; 54 | 55 | /// 56 | /// Used in inventories where slots are ordered and item size doesn't matter 57 | /// 58 | public record DenseListBag(string Id, int Size, Observable> Data) : ListBag(Id, Size, Data); 59 | 60 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/SfxManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using GDS.Core.Events; 3 | 4 | namespace GDS.Basic { 5 | [RequireComponent(typeof(AudioSource))] 6 | public class SfxManager : MonoBehaviour { 7 | 8 | AudioSource audioSource; 9 | 10 | public SoundList Sounds; 11 | 12 | [System.Serializable] 13 | public class SoundList { 14 | public AudioClip Fail; 15 | public AudioClip Pick; 16 | public AudioClip Place; 17 | public AudioClip Move; 18 | public AudioClip Buy; 19 | public AudioClip Sell; 20 | public AudioClip Craft; 21 | } 22 | 23 | void OnEnable() { 24 | audioSource = GetComponent(); 25 | var bus = Store.Bus; 26 | 27 | bus.Subscribe(PlayClip); 28 | bus.Subscribe(PlayClip); 29 | bus.Subscribe(PlayClip); 30 | bus.Subscribe(PlayClip); 31 | bus.Subscribe(PlayClip); 32 | bus.Subscribe(PlayClip); 33 | bus.Subscribe(PlayClip); 34 | bus.Subscribe(PlayClip); 35 | bus.Subscribe(PlayClip); 36 | bus.Subscribe(PlayClip); 37 | bus.Subscribe(PlayClip); 38 | } 39 | 40 | void OnDisable() { 41 | var bus = Store.Bus; 42 | bus.Unsubscribe(PlayClip); 43 | bus.Unsubscribe(PlayClip); 44 | bus.Unsubscribe(PlayClip); 45 | bus.Unsubscribe(PlayClip); 46 | bus.Unsubscribe(PlayClip); 47 | bus.Unsubscribe(PlayClip); 48 | bus.Unsubscribe(PlayClip); 49 | bus.Unsubscribe(PlayClip); 50 | bus.Unsubscribe(PlayClip); 51 | bus.Unsubscribe(PlayClip); 52 | bus.Unsubscribe(PlayClip); 53 | } 54 | 55 | AudioClip EventClip(CustomEvent e) => e switch { 56 | Fail => Sounds.Fail, 57 | PickItemSuccess => Sounds.Pick, 58 | PlaceItemSuccess => Sounds.Place, 59 | MoveItemSuccess => Sounds.Move, 60 | CraftItemSuccess => Sounds.Craft, 61 | BuyItemSuccess => Sounds.Buy, 62 | SellItemSuccess => Sounds.Sell, 63 | DropItemSuccess => Sounds.Pick, 64 | DestroyItemSuccess => Sounds.Place, 65 | CollectItemSuccess => Sounds.Place, 66 | _ => null 67 | }; 68 | 69 | void PlayClip(CustomEvent e) { 70 | audioSource.PlayOneShot(EventClip(e)); 71 | } 72 | 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/boots.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30204ce833fe8584ea87ba7d265559b3 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 5e97eb03825dee720800000000000000 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/helmet.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5e900b395fb5c646a19b329d1e32f8a 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 5e97eb03825dee720800000000000000 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/weapon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42a79ae989d4e0748859fb1120db8cca 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 5e97eb03825dee720800000000000000 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /GDS/Core/Resources/Shared/Images/Equipment/64/body-armor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0997b222910af594bafac8b6e15211f0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: -1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 5e97eb03825dee720800000000000000 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /GDS/Core/Events/Events.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | 4 | // This file contains all the Event types used throughout the system 5 | namespace GDS.Core.Events { 6 | 7 | public abstract record Error; 8 | public record NoError : Error; 9 | public record BagFull : Error; 10 | 11 | public abstract record CustomEvent() { public static NoEvent NoEvent = new(); public static Fail Fail = new(); public static Success Success = new(); } 12 | public record NoEvent() : CustomEvent; 13 | public record ChangedEvent(string Id) : CustomEvent; 14 | public record AddItemEvent(Item Item) : CustomEvent; 15 | public record BuyItemEvent(Item Item) : CustomEvent; 16 | public record SellItemEvent(Item Item) : CustomEvent; 17 | public record PickItemEvent(Bag Bag, Item Item, Slot Slot, EventModifiers EventModifiers) : CustomEvent; 18 | public record PlaceItemEvent(Bag Bag, Item Item, Slot Slot, EventModifiers EventModifiers) : CustomEvent; 19 | public record DropDraggedItemEvent() : CustomEvent; 20 | public record DestroyDraggedItemEvent() : CustomEvent; 21 | 22 | 23 | public record CollectAllEvent(Bag Bag, Item[] Items) : CustomEvent; 24 | public record HotbarUseEvent(int indexPlusOne) : CustomEvent; 25 | public record ToggleInventoryEvent() : CustomEvent; 26 | public record CloseInventoryEvent() : CustomEvent; 27 | public record ToggleWindowEvent(string Id) : CustomEvent; 28 | public record StashTabChangeEvent(int Index) : CustomEvent; 29 | public record OpenSideWindowEvent(Bag Bag) : CustomEvent; 30 | public record CloseWindowEvent(Bag Bag) : CustomEvent; 31 | public record OpenSideWindowByIdEvent(string Id) : CustomEvent; 32 | 33 | public record SelectItemEvent(Bag Bag, Item Item) : CustomEvent; 34 | public record DismantleEvent() : CustomEvent; 35 | public record CraftEvent(ItemBase ItemBase) : CustomEvent; 36 | 37 | public record ResetEvent() : CustomEvent; 38 | public record MessageEvent(string Message) : CustomEvent; 39 | public record PlaySoundEvent() : CustomEvent; 40 | 41 | public record RotateItemEvent() : CustomEvent; 42 | public record IllegalActionEvent() : CustomEvent; 43 | 44 | 45 | public record Success : CustomEvent; 46 | 47 | public record PickItemSuccess(Item Item) : Success; 48 | public record PlaceItemSuccess(Item Item) : Success; 49 | public record MoveItemSuccess(Item Item) : Success; 50 | public record BuyItemSuccess(Item Item) : Success; 51 | public record SellItemSuccess(Item Item) : Success; 52 | public record DropItemSuccess(Item Item) : Success; 53 | public record ConsumeItemSuccess(Item Item) : Success; 54 | public record CraftItemSuccess(Item Item) : Success; 55 | public record CollectItemSuccess(Item Item) : Success; 56 | public record DestroyItemSuccess(Item Item) : Success; 57 | 58 | public enum Severity { Info, Warning, Error } 59 | public record Fail() : CustomEvent; 60 | public record ActionFail(string Reason, Severity Severity = Severity.Info) : Fail; 61 | } -------------------------------------------------------------------------------- /GDS/Demos/Basic/Scene/Materials/textures/prototype_512x512_magenta.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81c078e07a3828a42885510e3d5369a9 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 1 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 0 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 512 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | - serializedVersion: 3 79 | buildTarget: Standalone 80 | maxTextureSize: 512 81 | resizeAlgorithm: 0 82 | textureFormat: -1 83 | textureCompression: 1 84 | compressionQuality: 50 85 | crunchedCompression: 0 86 | allowsAlphaSplitting: 0 87 | overridden: 0 88 | androidETC2FallbackOverride: 0 89 | forceMaximumCompressionQuality_BC6H_BC7: 0 90 | spriteSheet: 91 | serializedVersion: 2 92 | sprites: [] 93 | outline: [] 94 | physicsShape: [] 95 | bones: [] 96 | spriteID: 97 | internalID: 0 98 | vertices: [] 99 | indices: 100 | edges: [] 101 | weights: [] 102 | secondaryTextures: [] 103 | spritePackingTag: 104 | pSDRemoveMatte: 0 105 | pSDShowRemoveMatteOption: 0 106 | userData: 107 | assetBundleName: 108 | assetBundleVariant: 109 | -------------------------------------------------------------------------------- /GDS/Demos/Basic/Inventory/Bases.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace GDS.Basic { 5 | public static class Bases { 6 | public static readonly ArmorItemBase WarriorHelmet = new("WarriorHelmet", "Warrior Helmet", "Shared/Images/items/helmet", ItemClass.Helmet, 40); 7 | public static readonly ArmorItemBase LeatherGloves = new("LeatherGloves", "Leather Gloves", "Shared/Images/items/gloves", ItemClass.Gloves, 25); 8 | public static readonly ArmorItemBase LeatherArmor = new("LeatherArmor", "Leather Armor", "Shared/Images/items/armor", ItemClass.BodyArmor, 120); 9 | public static readonly ArmorItemBase SteelBoots = new("SteelBoots", "Steel Boots", "Shared/Images/items/boots", ItemClass.Boots, 30); 10 | 11 | public static readonly WeaponItemBase ShortSword = new("ShortSword", "Short Sword", "Shared/Images/items/sword-blue", ItemClass.Weapon1H, 80, 1.5f); 12 | public static readonly WeaponItemBase LongSword = new("LongSword", "Long Sword", "Shared/Images/items/sword", ItemClass.Weapon1H, 110, 1.35f); 13 | public static readonly WeaponItemBase Axe = new("Axe", "Axe", "Shared/Images/items/axe", ItemClass.Weapon2H, 140, 1.2f); 14 | 15 | public static readonly ItemBase BlueAmulet = new("BlueAmulet", "Silver Amulet", "Shared/Images/items/necklace", false, ItemClass.Amulet); 16 | public static readonly ItemBase Mushroom = new("Mushroom", "Mushroom", "Shared/Images/items/mushroom", true, ItemClass.Consumable); 17 | public static readonly ItemBase GoldRing = new("GoldRing", "Gold Ring", "Shared/Images/items/ring", false, ItemClass.Ring); 18 | public static readonly ItemBase Potion = new("Potion", "Potion", "Shared/Images/items/potion", true, ItemClass.Consumable); 19 | public static readonly ItemBase Apple = new("Apple", "Apple", "Shared/Images/items/apple", true, ItemClass.Consumable); 20 | public static readonly ItemBase Steel = new("Steel", "Steel", "Shared/Images/items/silver", true, ItemClass.Material); 21 | public static readonly ItemBase Wood = new("Wood", "Wood", "Shared/Images/items/wood", true, ItemClass.Material); 22 | public static readonly ItemBase Gem = new("Gem", "Gem", "Shared/Images/items/gem", true, ItemClass.Material); 23 | 24 | // public static readonly IEnumerable All = typeof(Bases).GetFields().Select(field => (ItemBase)field.GetValue(null)); 25 | public static readonly IEnumerable All = typeof(Bases).GetFields().Where(field => typeof(ItemBase).IsAssignableFrom(field.FieldType)).Select(field => (ItemBase)field.GetValue(null)); 26 | 27 | public static ItemBase RandomBase() { 28 | var rnd = new System.Random(); 29 | var randomIndex = rnd.Next(All.Count() - 1); 30 | var randomBase = All.ElementAt(randomIndex); 31 | return randomBase; 32 | } 33 | 34 | public static ItemBase Get(string id) => All.Where(b => b.Id == id).FirstOrDefault(); 35 | public static readonly string[] AllIds = All.Select(b => b.Id).ToArray(); 36 | 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /GDS/Core/Inventory/Factory/InventoryFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | namespace GDS.Core { 6 | /// 7 | /// Contains factory methods for creating all types of bags and slots 8 | /// 9 | public static class InventoryFactory { 10 | static int _lastId = 0; 11 | public static int NextId() => _lastId + 1; 12 | public static int Id() => _lastId++; 13 | 14 | public static ItemBase CreateBase(string id, string name, string iconPath) => new(id, name, iconPath, false, Sizes.Size1x1); 15 | public static ItemBase CreateBase(string id, string name, string iconPath, bool stackable) => new(id, name, iconPath, stackable, Sizes.Size1x1); 16 | 17 | public static Item Create(ItemBase itemBase, ItemData itemData) => new(Id(), itemBase, itemData); 18 | public static Item Create(ItemBase itemBase, int quant) => new(Id(), itemBase, new(quant)); 19 | public static Item Create(ItemBase itemBase) => new(Id(), itemBase, ItemData.NoItemData); 20 | 21 | 22 | public static Slot CreateSlot(Item item) => new Slot(item); 23 | public static Slot CreateSlot() => CreateSlot(Item.NoItem); 24 | 25 | public static ListSlot CreateListSlot(int index) => new ListSlot(index, Item.NoItem); 26 | public static ListSlot CreateListSlot(int index, Core.FilterFn filter) => new ListSlot(index, Item.NoItem) { Accepts = filter }; 27 | public static SetSlot CreateSetSlot(string key) => new SetSlot(key, Item.NoItem); 28 | public static SetSlot CreateSetSlot(string key, FilterFn accepts) => new SetSlot(key, Item.NoItem) { Accepts = accepts }; 29 | 30 | public static T CreateListBag(string id, List slots) where T : ListBag { 31 | var bag = (T)Activator.CreateInstance(typeof(T), id, slots.Count, new Observable>(slots)); 32 | return bag; 33 | } 34 | public static ListBag CreateListBag(string id, int size) { 35 | var slots = Enumerable.Range(0, size).Select(CreateListSlot).ToList(); 36 | var bag = new ListBag(id, size, new(slots)); 37 | return bag; 38 | } 39 | 40 | public static ListBag CreateListBag(string id, params FilterFn[] slotFilters) { 41 | var slots = slotFilters.Select((fn, index) => CreateListSlot(index, fn)).ToList(); 42 | var bag = new ListBag(id, slots.Count, new(slots)); 43 | return bag; 44 | } 45 | 46 | public static T CreateListBag(string id, int size) where T : ListBag { 47 | var slots = Enumerable.Range(0, size).Select(CreateListSlot).ToList(); 48 | var bag = (T)Activator.CreateInstance(typeof(T), id, size, new Observable>(slots)); 49 | return bag; 50 | } 51 | 52 | public static SetBag CreateSetBag(string id, SetSlot[] slots) { 53 | var slotsDict = slots.ToDictionary(slot => slot.Key, slot => slot); 54 | var bag = new SetBag(id, new(slotsDict)); 55 | return bag; 56 | } 57 | 58 | public static SetBag CreateSetBag(string id, string[] slotKeys) { 59 | var slots = slotKeys.ToDictionary(key => key, key => CreateSetSlot(key)); 60 | var bag = new SetBag(id, new(slots)); 61 | return bag; 62 | } 63 | } 64 | } --------------------------------------------------------------------------------