Initial commit

This commit is contained in:
HussienX72u
2026-07-21 08:56:10 +03:00
commit 4017028111
9410 changed files with 2150500 additions and 0 deletions
@@ -0,0 +1,34 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec390037e79ae134b9fe859322a98be8, type: 3}
m_Name: Blocks
m_EditorClassIdentifier:
ID: Blocks
blocks:
- {fileID: 11400000, guid: da7213f08293477469e917a1983ebe26, type: 2}
- {fileID: 11400000, guid: 7b14631732f6ea045a656f130e86fa4f, type: 2}
- {fileID: 11400000, guid: 2c3bcf71f1e39b74f9c7b0f2cfb63282, type: 2}
- {fileID: 11400000, guid: 8b1c0562d67ecd241b868f6776b1870a, type: 2}
- {fileID: 11400000, guid: 50f248d2728c2e1438c8eed0b44248e4, type: 2}
- {fileID: 11400000, guid: 4d481aed680c8eb4493b855601d44151, type: 2}
- {fileID: 11400000, guid: 45f53651439e0a64eb7b422c779c3f9b, type: 2}
- {fileID: 11400000, guid: 3ccbf53c5ed30c14d89f228c4fa2b86c, type: 2}
- {fileID: 11400000, guid: a1352715bfb79724b86e0f333918b3e2, type: 2}
- {fileID: 11400000, guid: 79d7ba1dce976964d9a53d6c126db54e, type: 2}
- {fileID: 11400000, guid: 6cfeffa61d55f5749bf115086b65de2b, type: 2}
- {fileID: 11400000, guid: 7bbbc0ca55dd41347a6d0ff3096a9dc1, type: 2}
- {fileID: 11400000, guid: 7a653f824c6fbca45ac8d2a8dd748133, type: 2}
- {fileID: 11400000, guid: 24d8f3d7913a4c344b3f4e53b4329d6d, type: 2}
- {fileID: 11400000, guid: 16068f6ff31e0dd4b9f8750cbc3ff1dc, type: 2}
- {fileID: 11400000, guid: 728639034b08ffc4191bbcb0f4f50293, type: 2}
- {fileID: 11400000, guid: df1505724d96cec4a9beab782bb68cb1, type: 2}
icon: {fileID: 21300000, guid: 249d6cef03dcad041b89f78646b7f81a, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86480ee67e6364b4fa1f9a1a496e5b4c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,40 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public class CategoryInherit : MonoBehaviour
{
[SerializeField] private GameObject UIPrefab;
[SerializeField] private GameObject UIParent;
private CategoryData currentCategory;
private List<BlockData> blockDatas;
public void UpdateCategory(CategoryData category)
{
currentCategory = category;
DestroyBlocks();
blockDatas = currentCategory.blocks;
if (UIPrefab != null)
{
foreach (BlockData blockData in blockDatas)
{
UIInteractable uiInteractable = Instantiate(UIPrefab, UIParent.transform).GetComponent<UIInteractable>();
uiInteractable.setBlockData(blockData);
Image image = uiInteractable.transform.GetComponent<Image>();
image.sprite = Sprite.Create(blockData.icon, new Rect(0, 0, blockData.icon.width, blockData.icon.height), new Vector2(0.5f, 0.5f));
}
}
}
private void DestroyBlocks()
{
if (UIParent == null) return;
Transform[] transforms = UIParent.transform.GetComponentsInChildren<Transform>().Where((t) => t != UIParent.transform).ToArray();
foreach (Transform transform in transforms)
{
Destroy(transform.gameObject);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8ee966972529d643af2b56c527e2562
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec390037e79ae134b9fe859322a98be8, type: 3}
m_Name: Connectors
m_EditorClassIdentifier:
ID: Connectors
blocks:
- {fileID: 11400000, guid: 9400a0f8ca6603942951b5006c6912b0, type: 2}
- {fileID: 11400000, guid: d1a160c21d29ce944816ba0df7c7c2bd, type: 2}
- {fileID: 11400000, guid: 7cc8dc811deb2f648bbc7aecfe51a481, type: 2}
- {fileID: 11400000, guid: e10b9e452222cf94ab8924c7ed16c872, type: 2}
- {fileID: 11400000, guid: e911b54ef541e9e4396b926821e4dfc0, type: 2}
- {fileID: 11400000, guid: db9d38c67cf9f474a8dbeaaf5a73298f, type: 2}
- {fileID: 11400000, guid: 115a6910b01a1e64389d5f3c27a04c30, type: 2}
- {fileID: 11400000, guid: 44b3e86ed80f8584bbcd50950166f075, type: 2}
- {fileID: 11400000, guid: 49daedfde8d515e4d8b27bfef45001b9, type: 2}
- {fileID: 11400000, guid: 68a122449e6172748bc4c641f0ac97be, type: 2}
icon: {fileID: 0}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5a2a0a71bcd471d468b7bcacbbc8176a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,49 @@
using DG.Tweening.Plugins;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class DropdownCategories : MonoBehaviour
{
public CategoryData[] Categories;
private TMP_Dropdown DropdownMenu;
[SerializeField] private CategoryInherit categoryInherit;
void Start()
{
if (GetComponent<TMP_Dropdown>())
DropdownMenu = GetComponent<TMP_Dropdown>();
else
Debug.Log("Couldn't find a Dropdown menu");
if (Categories != null && Categories.Length > 0 && DropdownMenu != null)
{
DropdownMenu.ClearOptions();
//List<string> CategoryNames = new List<string>();
//foreach (var category in Categories)
//{
// CategoryNames.Add(category.ID);
//}
//List<Sprite> CategorySprites = new List<Sprite>();
//foreach (var category in Categories)
//{
// CategorySprites.Add(category.icon);
//}
List<TMP_Dropdown.OptionData> Options = new List<TMP_Dropdown.OptionData>();
for (int i = 0; i < Categories.Length; i++)
{
Options.Add(new TMP_Dropdown.OptionData(Categories[i].ID, Categories[i].icon));
}
DropdownMenu.AddOptions(Options);
categoryInherit.UpdateCategory(Categories[0]);
DropdownMenu.onValueChanged.AddListener(newVal =>
{
categoryInherit.UpdateCategory(Categories[newVal]);
});
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f68cd7f7a8de8894ea00033c6122d193
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,103 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2885132409113817774
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2859378353417183890}
- component: {fileID: 92348113815725019}
- component: {fileID: 1494917336169592978}
- component: {fileID: 3726770597991922256}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2859378353417183890
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2885132409113817774}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &92348113815725019
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2885132409113817774}
m_CullTransparentMesh: 1
--- !u!114 &1494917336169592978
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2885132409113817774}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &3726770597991922256
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2885132409113817774}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6bc96f60788466141a4a58584aa21a0b, type: 3}
m_Name:
m_EditorClassIdentifier:
onSelectEnterEvent:
m_PersistentCalls:
m_Calls: []
onSelectExitEvent:
m_PersistentCalls:
m_Calls: []
onHoverEnterEvent:
m_PersistentCalls:
m_Calls: []
onHoverExitEvent:
m_PersistentCalls:
m_Calls: []
blockData: {fileID: 0}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2c718d7be46b7eb449a52f24a8b0b1bf
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec390037e79ae134b9fe859322a98be8, type: 3}
m_Name: Pins
m_EditorClassIdentifier:
ID: Pins
blocks:
- {fileID: 11400000, guid: 4ae96e5475ef93140a8ee6ed11593054, type: 2}
icon: {fileID: 21300000, guid: 463b55a38b1277044a2f6f4348bcc0d4, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ffda9eca5fbd46e4badbaf708cf51b66
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,19 @@
{
"name": "scripts.UI",
"rootNamespace": "",
"references": [
"GUID:0f8d877125e73cc40a31b031c2e5fe60",
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:6546d7765b4165b40850b3667f981c26",
"GUID:592d2f233d5888842a42a43f3adbf282"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1f41f79e186f0504892eace365f3d394
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: