Skip to content
Snippets Groups Projects
Commit 370c12a2 authored by Marco Zimmer's avatar Marco Zimmer
Browse files

+ Refactored Gadgets, again;

parent c970754b
No related branches found
No related tags found
No related merge requests found
Showing
with 5440 additions and 10019 deletions
This diff is collapsed.
......@@ -26,9 +26,10 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5345241908758045532}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
......@@ -61,6 +62,7 @@ MonoBehaviour:
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:
......@@ -89,6 +91,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
......
This diff is collapsed.
fileFormatVersion: 2
guid: 551f6656e16c58d4a92122e087f7f9ae
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%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: 262a3c8caea4a7741b65ef20c568f5c2, type: 3}
m_Name: AngleToolDataContainerGadgetInit
m_EditorClassIdentifier: Assembly-CSharp::DataContainerGadgetInit
Rank: 3
MaxRange: Infinity
MaxHeight: Infinity
UiName: Angle Tool
MaterialIndx: 1
ButtonIndx: 3
IgnoreLayerMask:
serializedVersion: 2
m_Bits: 96770
SecondaryLayerMask:
serializedVersion: 2
m_Bits: 0
fileFormatVersion: 2
guid: 2a891f5d8ee52c345bde724abf963061
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "DataContainerGadgetCollection", menuName = "ScriptableObjects/Spawn DataContainerGadgetCollection", order = 1)]
public class DataContainerGadgetCollection : ScriptableObject, ISerializationCallbackReceiver
{
public Material[] Materials;
public Sprite[] ButtonSprites;
public Dictionary<Gadget.GadgetIDs, DataContainerGadgetInit> DataContainerGadgetDict = new();
[SerializeField]
private List<Gadget.GadgetIDs> GadgetType = new();
[SerializeField]
private List<DataContainerGadgetInit> GadgetData = new();
public void OnBeforeSerialize()
{
GadgetType.Clear();
GadgetData.Clear();
foreach (var kvp in DataContainerGadgetDict)
{
GadgetType.Add(kvp.Key);
GadgetData.Add(kvp.Value);
}
}
public void OnAfterDeserialize()
{
DataContainerGadgetDict = new();
for (int i = 0; i != Math.Min(GadgetType.Count, GadgetData.Count); i++)
if (GadgetData[i] != null)
DataContainerGadgetDict.Add(GadgetType[i], GadgetData[i]);
}
}
fileFormatVersion: 2
guid: 38cd422d38f88564e81d012b615cc77a
guid: 7ce7096949e82e448a46c31198e83eb2
MonoImporter:
externalObjects: {}
serializedVersion: 2
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "DataContainerGadgetInit", menuName = "ScriptableObjects/SpawnDataContainerGadgetInit", order = 1)]
public class DataContainerGadgetInit : ScriptableObject
{
public int Rank = -1;
public float MaxRange = float.PositiveInfinity;
public float MaxHeight = float.PositiveInfinity;
public string UiName = "Not Defined";
public int MaterialIndx = 0;
public int ButtonIndx = 0;
public LayerMask IgnoreLayerMask;
public LayerMask SecondaryLayerMask;
}
\ No newline at end of file
fileFormatVersion: 2
guid: 262a3c8caea4a7741b65ef20c568f5c2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
%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: 262a3c8caea4a7741b65ef20c568f5c2, type: 3}
m_Name: DefaultDataContainerGadgetInit
m_EditorClassIdentifier: Assembly-CSharp::DataContainerGadgetInit
Rank: -1
MaxRange: Infinity
MaxHeight: Infinity
UiName: Not Defined
ButtonSprite: {fileID: 21300000, guid: f4c84b8f318e3cb469eb72c734ccbf39, type: 3}
IgnoreLayerMask:
serializedVersion: 2
m_Bits: 0
fileFormatVersion: 2
guid: 7431ff31b707d2a4082b65b61e15e5df
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%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: 7ce7096949e82e448a46c31198e83eb2, type: 3}
m_Name: GadgetDataContainerGadgetCollection
m_EditorClassIdentifier:
Materials:
- {fileID: 2100000, guid: a8a7bf60a30970f469a9c9d3ae2de6ef, type: 2}
- {fileID: 2100000, guid: 8a28cccde2536794c97ec91954e34e90, type: 2}
ButtonSprites:
- {fileID: 21300000, guid: f4c84b8f318e3cb469eb72c734ccbf39, type: 3}
- {fileID: 21300000, guid: 61c389e99e8388e4e93070d2f5e6275f, type: 3}
- {fileID: 21300000, guid: 23ef0c9f8111e14439483be733da29eb, type: 3}
- {fileID: 21300000, guid: 644edf8b3fa05da418500a0e9dd10820, type: 3}
- {fileID: 21300000, guid: fa8323d8b52054c46b24fc9a0040caa3, type: 3}
- {fileID: 21300000, guid: 0b5fd1ea5a3b1a74588f605621176b6a, type: 3}
- {fileID: 21300000, guid: 463f5131871fc2e4ba1a0d516a181b52, type: 3}
- {fileID: 21300000, guid: 64638854d11ebae43b37782de9c88be7, type: 3}
- {fileID: 21300000, guid: d456617ba2282854d9570dcebcc2b279, type: 3}
GadgetType: ffffffff0000000001000000020000000300000004000000050000000600000007000000
GadgetData:
- {fileID: 11400000, guid: 7431ff31b707d2a4082b65b61e15e5df, type: 2}
- {fileID: 11400000, guid: c149a1e468d3b3b48a0732c2e0811856, type: 2}
- {fileID: 11400000, guid: 1b641055f5d8e57448bcc42a824d237f, type: 2}
- {fileID: 11400000, guid: 2a891f5d8ee52c345bde724abf963061, type: 2}
- {fileID: 11400000, guid: ef7464e1276b9e34fb6dc73e5ac6b565, type: 2}
- {fileID: 11400000, guid: 241b4664cc985c944a1165bc35548e0f, type: 2}
- {fileID: 11400000, guid: 85f31465cba949d48b44c90fd9e0504e, type: 2}
- {fileID: 11400000, guid: 8fb57464fd99014479babf9a76388910, type: 2}
- {fileID: 11400000, guid: 06736b134e21b50488990025c33c9c2e, type: 2}
fileFormatVersion: 2
guid: 4f083cea1fe36674f8441e41ed95263d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%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: 262a3c8caea4a7741b65ef20c568f5c2, type: 3}
m_Name: LineDataContainerGadgetInit
m_EditorClassIdentifier: Assembly-CSharp::DataContainerGadgetInit
Rank: 4
MaxRange: Infinity
MaxHeight: Infinity
UiName: Line Tool
MaterialIndx: 0
ButtonIndx: 4
IgnoreLayerMask:
serializedVersion: 2
m_Bits: 96770
SecondaryLayerMask:
serializedVersion: 2
m_Bits: 0
fileFormatVersion: 2
guid: ef7464e1276b9e34fb6dc73e5ac6b565
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%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: 262a3c8caea4a7741b65ef20c568f5c2, type: 3}
m_Name: LotToolDataContainerGadgetInit
m_EditorClassIdentifier: Assembly-CSharp::DataContainerGadgetInit
Rank: 5
MaxRange: Infinity
MaxHeight: Infinity
UiName: Lot Tool
MaterialIndx: 0
ButtonIndx: 5
IgnoreLayerMask:
serializedVersion: 2
m_Bits: 86530
SecondaryLayerMask:
serializedVersion: 2
m_Bits: 0
fileFormatVersion: 2
guid: 241b4664cc985c944a1165bc35548e0f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%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: 262a3c8caea4a7741b65ef20c568f5c2, type: 3}
m_Name: PendulumDataContainerGadgetInit
m_EditorClassIdentifier: Assembly-CSharp::DataContainerGadgetInit
Rank: 6
MaxRange: Infinity
MaxHeight: Infinity
UiName: Pendulum
MaterialIndx: 0
ButtonIndx: 6
IgnoreLayerMask:
serializedVersion: 2
m_Bits: 96770
SecondaryLayerMask:
serializedVersion: 2
m_Bits: 1
fileFormatVersion: 2
guid: 85f31465cba949d48b44c90fd9e0504e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment