stuff less important than the shader

This commit is contained in:
klemek
2020-12-11 00:06:47 +01:00
parent 3e9752dcad
commit cd354b5133
41 changed files with 1618 additions and 437 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

+138
View File
@@ -0,0 +1,138 @@
fileFormatVersion: 2
guid: f532ef47545d2004dbde7529a934f204
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 4
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline:
- - {x: -2, y: -2}
- {x: -2, y: 2}
- {x: 2, y: 2}
- {x: 2, y: -2}
physicsShape:
- - {x: -2, y: -2}
- {x: -2, y: 2}
- {x: 2, y: 2}
- {x: 2, y: -2}
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b756b9be6f75d9243a1cad4468a34070
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+5 -5
View File
@@ -70,9 +70,9 @@ SpriteRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 791405367 m_SortingLayerID: 0
m_SortingLayer: 2 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 2
m_Sprite: {fileID: 21300000, guid: 0415f46fc23af284da343f01713b8c27, type: 3} m_Sprite: {fileID: 21300000, guid: 0415f46fc23af284da343f01713b8c27, type: 3}
m_Color: {r: 1, g: 0, b: 0, a: 1} m_Color: {r: 1, g: 0, b: 0, a: 1}
m_FlipX: 0 m_FlipX: 0
@@ -96,8 +96,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d38ff3984e75ad44398ee5927f8fbcf8, type: 3} m_Script: {fileID: 11500000, guid: d38ff3984e75ad44398ee5927f8fbcf8, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
IsInput: 0
Name: Name:
IsInput: 0
ScaleIncrease: 1.5 ScaleIncrease: 1.5
--- !u!58 &8643366489253547345 --- !u!58 &8643366489253547345
CircleCollider2D: CircleCollider2D:
@@ -114,4 +114,4 @@ CircleCollider2D:
m_UsedByComposite: 0 m_UsedByComposite: 0
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.49999997 m_Radius: 0.75
+3 -3
View File
@@ -69,9 +69,9 @@ LineRenderer:
m_AutoUVMaxDistance: 0.5 m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89 m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 791405367 m_SortingLayerID: 0
m_SortingLayer: 2 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 1
m_Positions: m_Positions:
- {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0}
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a3eab2b02a43b8f4cb5c9cd3d84c21dc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -9,8 +9,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 2070848596161447923} - component: {fileID: 2070848596161447923}
- component: {fileID: 3023362318199728274} - component: {fileID: 2637797866570093762}
- component: {fileID: 1147181935280608789}
m_Layer: 0 m_Layer: 0
m_Name: NAND gate m_Name: NAND gate
m_TagString: Untagged m_TagString: Untagged
@@ -32,61 +31,11 @@ Transform:
- {fileID: 4810999900376905961} - {fileID: 4810999900376905961}
- {fileID: 118974315500811181} - {fileID: 118974315500811181}
- {fileID: 555726995092159938} - {fileID: 555726995092159938}
- {fileID: 120012632069647147}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &3023362318199728274 --- !u!114 &2637797866570093762
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 347446582494478752}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 73ddb2958e9cd451c82f37c26efa5eb0, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: -1993690767
m_SortingLayer: 1
m_SortingOrder: 0
m_Sprite: {fileID: 3286163911610860551, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 6, y: 5}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &1147181935280608789
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@@ -98,6 +47,173 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4b336fb04307cae45953d977c01c393d, type: 3} m_Script: {fileID: 11500000, guid: 4b336fb04307cae45953d977c01c393d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
HasState: 0
GateType: 6
--- !u!60 &3161691366024547520
PolygonCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1856925445254163832}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 1}
oldSize: {x: 6, y: 5}
newSize: {x: 6, y: 5}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 3.09, y: -4.5099998}
- {x: 3.23, y: -4.46}
- {x: 3.49, y: -4.33}
- {x: 3.59, y: -4.27}
- {x: 3.76, y: -4.15}
- {x: 3.8899999, y: -4.04}
- {x: 4.0699997, y: -3.85}
- {x: 4.21, y: -3.6599998}
- {x: 4.31, y: -3.49}
- {x: 4.42, y: -3.26}
- {x: 4.49, y: -3}
- {x: 4.5099998, y: -2.8899999}
- {x: 4.5499997, y: -2.82}
- {x: 4.63, y: -2.8899999}
- {x: 4.7999997, y: -2.98}
- {x: 5.0099998, y: -2.97}
- {x: 5.1, y: -2.9399998}
- {x: 5.23, y: -2.85}
- {x: 5.3399997, y: -2.7}
- {x: 5.37, y: -2.61}
- {x: 5.37, y: -2.3899999}
- {x: 5.3399997, y: -2.3}
- {x: 5.25, y: -2.1699998}
- {x: 5.1, y: -2.06}
- {x: 4.99, y: -2.04}
- {x: 4.87, y: -2.03}
- {x: 4.7599998, y: -2.05}
- {x: 4.66, y: -2.09}
- {x: 4.52, y: -2.1599998}
- {x: 4.49, y: -2}
- {x: 4.42, y: -1.76}
- {x: 4.35, y: -1.5999999}
- {x: 4.25, y: -1.4}
- {x: 4.11, y: -1.1999999}
- {x: 4, y: -1.0699999}
- {x: 3.81, y: -0.89}
- {x: 3.72, y: -0.82}
- {x: 3.59, y: -0.72999996}
- {x: 3.34, y: -0.59999996}
- {x: 3.1999998, y: -0.53999996}
- {x: 3.01, y: -0.48}
- {x: 2.8, y: -0.42999998}
- {x: 2.6799998, y: -0.41}
- {x: 2.5, y: -0.39}
- {x: 2.29, y: -0.38}
- {x: 0.5, y: -0.38}
- {x: 0.48, y: -0.39999998}
- {x: 0.48, y: -4.6}
- {x: 0.5, y: -4.62}
- {x: 2.3, y: -4.62}
- {x: 2.5, y: -4.61}
- {x: 2.61, y: -4.6}
- {x: 2.75, y: -4.58}
--- !u!114 &5276010568307047601
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1856925445254163832}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 419a02bb4cfe59848a1f7677a1018aa3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &14861468116553427
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2070848596161447923}
m_Modifications:
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -5415975035532293479, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_SortingLayer
value: 0
objectReference: {fileID: 0}
- target: {fileID: -5415975035532293479, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_SortingLayerID
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1869508105636651947, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
propertyPath: m_Name
value: sprite
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 7243324766535440047, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
--- !u!1 &1856925445254163832 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1869508105636651947, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
m_PrefabInstance: {fileID: 14861468116553427}
m_PrefabAsset: {fileID: 0}
--- !u!4 &120012632069647147 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -9106680079924091400, guid: dd1159e4e096fd24695274a28f36162e, type: 3}
m_PrefabInstance: {fileID: 14861468116553427}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3863004111573961202 --- !u!1001 &3863004111573961202
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -105,13 +221,17 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 2070848596161447923} m_TransformParent: {fileID: 2070848596161447923}
m_Modifications: m_Modifications:
- target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: Name
value: A
objectReference: {fileID: 0}
- target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: IsInput propertyPath: IsInput
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1824742176375353076, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: 1824742176375353076, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Anchor value: A
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8599692958760628507, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: 8599692958760628507, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
@@ -171,9 +291,13 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 2070848596161447923} m_TransformParent: {fileID: 2070848596161447923}
m_Modifications: m_Modifications:
- target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: Name
value: Q
objectReference: {fileID: 0}
- target: {fileID: 1824742176375353076, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: 1824742176375353076, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Anchor (2) value: Q
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8599692958760628507, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: 8599692958760628507, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
@@ -233,13 +357,17 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 2070848596161447923} m_TransformParent: {fileID: 2070848596161447923}
m_Modifications: m_Modifications:
- target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: Name
value: B
objectReference: {fileID: 0}
- target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: -7307756874029176930, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: IsInput propertyPath: IsInput
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1824742176375353076, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: 1824742176375353076, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Anchor (1) value: B
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8599692958760628507, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3} - target: {fileID: 8599692958760628507, guid: d2ad1e1266d8af64ca87541a40be7e9f, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
+2 -2
View File
@@ -29,9 +29,9 @@
<g style="stroke:black;stroke-width:20;fill:white"> <g style="stroke:black;stroke-width:20;fill:white">
<path d="M 60 50 L 225 50 C 515 50, 515 450, 225 450 L 60 450 Z" /> <path d="M 60 50 L 225 50 C 515 50, 515 450, 225 450 L 60 450 Z" />
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="50" cy="350" r="20"/> <circle cx="50" cy="350" r="20"/>
<circle cx="450" cy="250" r="20"/> <circle cx="450" cy="250" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+2 -2
View File
@@ -29,8 +29,8 @@
<g style="stroke:black;stroke-width:20;fill:white"> <g style="stroke:black;stroke-width:20;fill:white">
<path d="M 60 50 L 240 150 L 60 250 Z" /> <path d="M 60 50 L 240 150 L 60 250 Z" />
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="250" cy="150" r="20"/> <circle cx="250" cy="150" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+2 -2
View File
@@ -30,9 +30,9 @@
<path d="M 10 50 L 150 50 C 375 50, 440 250, 440 250 C 440 250, 375 450, 150 450 L 20 450 L 150 450 L 10 450 C 110 400, 110 100, 10 50 L 150 50 L 10 50 Z" /> <path d="M 10 50 L 150 50 C 375 50, 440 250, 440 250 C 440 250, 375 450, 150 450 L 20 450 L 150 450 L 10 450 C 110 400, 110 100, 10 50 L 150 50 L 10 50 Z" />
<circle cx="490" cy="250" r="35"/> <circle cx="490" cy="250" r="35"/>
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="50" cy="350" r="20"/> <circle cx="50" cy="350" r="20"/>
<circle cx="550" cy="250" r="20"/> <circle cx="550" cy="250" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+2 -2
View File
@@ -30,8 +30,8 @@
<path d="M 60 50 L 250 150 L 60 250 Z" /> <path d="M 60 50 L 250 150 L 60 250 Z" />
<circle cx="290" cy="150" r="35"/> <circle cx="290" cy="150" r="35"/>
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="350" cy="150" r="20"/> <circle cx="350" cy="150" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+2 -2
View File
@@ -29,9 +29,9 @@
<g style="stroke:black;stroke-width:20;fill:white"> <g style="stroke:black;stroke-width:20;fill:white">
<path d="M 10 50 L 150 50 C 375 50, 430 250, 430 250 C 430 250, 375 450, 150 450 L 20 450 L 150 450 L 10 450 C 110 400, 110 100, 10 50 L 150 50 L 10 50 Z" /> <path d="M 10 50 L 150 50 C 375 50, 430 250, 430 250 C 430 250, 375 450, 150 450 L 20 450 L 150 450 L 10 450 C 110 400, 110 100, 10 50 L 150 50 L 10 50 Z" />
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="50" cy="350" r="20"/> <circle cx="50" cy="350" r="20"/>
<circle cx="450" cy="250" r="20"/> <circle cx="450" cy="250" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+2 -2
View File
@@ -33,9 +33,9 @@
<path d="M 10 50 C 110 100, 110 400, 10 450 C 110 400, 110 100, 10 50 Z" /> <path d="M 10 50 C 110 100, 110 400, 10 450 C 110 400, 110 100, 10 50 Z" />
<circle cx="590" cy="250" r="35"/> <circle cx="590" cy="250" r="35"/>
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="50" cy="350" r="20"/> <circle cx="50" cy="350" r="20"/>
<circle cx="650" cy="250" r="20"/> <circle cx="650" cy="250" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
+2 -2
View File
@@ -32,9 +32,9 @@
<path d="M 110 50 L 250 50 C 475 50, 530 250, 530 250 C 530 250, 475 450, 250 450 L 120 450 L 250 450 L 110 450 C 210 400, 210 100, 110 50 L 250 50 L 110 50 Z" /> <path d="M 110 50 L 250 50 C 475 50, 530 250, 530 250 C 530 250, 475 450, 250 450 L 120 450 L 250 450 L 110 450 C 210 400, 210 100, 110 50 L 250 50 L 110 50 Z" />
<path d="M 10 50 C 110 100, 110 400, 10 450 C 110 400, 110 100, 10 50 Z" /> <path d="M 10 50 C 110 100, 110 400, 10 450 C 110 400, 110 100, 10 50 Z" />
</g> </g>
<g style="stroke:none;fill:green"> <!--<g style="stroke:none;fill:green">
<circle cx="50" cy="150" r="20"/> <circle cx="50" cy="150" r="20"/>
<circle cx="50" cy="350" r="20"/> <circle cx="50" cy="350" r="20"/>
<circle cx="550" cy="250" r="20"/> <circle cx="550" cy="250" r="20"/>
</g> </g>-->
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

+1 -1
View File
@@ -14,7 +14,7 @@ ScriptedImporter:
gradientResolution: 64 gradientResolution: 64
alignment: 1 alignment: 1
customPivot: {x: 0, y: 0} customPivot: {x: 0, y: 0}
generatePhysicsShape: 0 generatePhysicsShape: 1
viewportOptions: 1 viewportOptions: 1
preserveViewport: 0 preserveViewport: 0
advancedMode: 0 advancedMode: 0
@@ -123,6 +123,88 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1 &155822103
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 155822105}
- component: {fileID: 155822104}
m_Layer: 8
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!212 &155822104
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 155822103}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 7f247c265d325694a96c63ce0be3b314, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: f532ef47545d2004dbde7529a934f204, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 1
m_Size: {x: 100, y: 100}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 1
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!4 &155822105
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 155822103}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 10, y: 10, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &297330683 --- !u!1 &297330683
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -146,14 +228,15 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 297330683} m_GameObject: {fileID: 297330683}
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_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1141755333} - {fileID: 1141755333}
- {fileID: 2034233491} - {fileID: 2034233491}
m_Father: {fileID: 0} - {fileID: 917919193}
m_RootOrder: 2 m_Father: {fileID: 1741727034}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &519420028 --- !u!1 &519420028
GameObject: GameObject:
@@ -166,6 +249,7 @@ GameObject:
- component: {fileID: 519420032} - component: {fileID: 519420032}
- component: {fileID: 519420031} - component: {fileID: 519420031}
- component: {fileID: 519420029} - component: {fileID: 519420029}
- component: {fileID: 519420030}
m_Layer: 0 m_Layer: 0
m_Name: Main Camera m_Name: Main Camera
m_TagString: MainCamera m_TagString: MainCamera
@@ -181,6 +265,22 @@ AudioListener:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028} m_GameObject: {fileID: 519420028}
m_Enabled: 1 m_Enabled: 1
--- !u!114 &519420030
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ad29b44c506923441adfb71b13f0f9dd, type: 3}
m_Name:
m_EditorClassIdentifier:
MinSize: 5
MaxSize: 80
ScrollSensitivity: 10
Camera101: {fileID: 816332484}
--- !u!20 &519420031 --- !u!20 &519420031
Camera: Camera:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -190,7 +290,7 @@ Camera:
m_GameObject: {fileID: 519420028} m_GameObject: {fileID: 519420028}
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_ClearFlags: 2 m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1 m_projectionMatrixMode: 1
m_GateFitMode: 2 m_GateFitMode: 2
@@ -218,7 +318,7 @@ Camera:
m_TargetDisplay: 0 m_TargetDisplay: 0
m_TargetEye: 0 m_TargetEye: 0
m_HDR: 1 m_HDR: 1
m_AllowMSAA: 0 m_AllowMSAA: 1
m_AllowDynamicResolution: 0 m_AllowDynamicResolution: 0
m_ForceIntoRT: 0 m_ForceIntoRT: 0
m_OcclusionCulling: 0 m_OcclusionCulling: 0
@@ -231,12 +331,12 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028} m_GameObject: {fileID: 519420028}
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: -10} m_LocalPosition: {x: 0, y: 0, z: -20}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1835199860}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &535412051 --- !u!1 &535412051
GameObject: GameObject:
@@ -248,6 +348,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 535412053} - component: {fileID: 535412053}
- component: {fileID: 535412052} - component: {fileID: 535412052}
- component: {fileID: 535412054}
m_Layer: 0 m_Layer: 0
m_Name: GameManager m_Name: GameManager
m_TagString: Untagged m_TagString: Untagged
@@ -286,6 +387,92 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &535412054
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 535412051}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 11e573998e532eb42bdb43b80953d23f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &816332482
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 816332485}
- component: {fileID: 816332484}
m_Layer: 0
m_Name: 101Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!20 &816332484
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 816332482}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 1
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &816332485
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 816332482}
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_Children: []
m_Father: {fileID: 1835199860}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &840857165 --- !u!1001 &840857165
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -303,11 +490,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3} - target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -8 value: -10.11
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3} - target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 1 value: 2.82
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3} - target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
@@ -343,11 +530,137 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e13798a14679ee74fa71d11caea77e78, type: 3} m_SourcePrefab: {fileID: 100100000, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
--- !u!4 &917919193 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
m_PrefabInstance: {fileID: 1721634386}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1141755333 stripped --- !u!4 &1141755333 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3} m_CorrespondingSourceObject: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
m_PrefabInstance: {fileID: 808953822019098548} m_PrefabInstance: {fileID: 808953822019098548}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &1721634386
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 297330684}
m_Modifications:
- target: {fileID: 347446582494478752, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_Name
value: NAND gate
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalPosition.x
value: -10.26
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalPosition.y
value: -4.53
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2070848596161447923, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e13798a14679ee74fa71d11caea77e78, type: 3}
--- !u!1 &1741727033
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1741727034}
m_Layer: 0
m_Name: Workspace
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1741727034
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1741727033}
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_Children:
- {fileID: 297330684}
- {fileID: 1929026276}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1835199859
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1835199860}
m_Layer: 0
m_Name: Cameras
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1835199860
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1835199859}
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_Children:
- {fileID: 519420032}
- {fileID: 816332485}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1929026275 --- !u!1 &1929026275
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -371,12 +684,12 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1929026275} m_GameObject: {fileID: 1929026275}
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_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 1741727034}
m_RootOrder: 3 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &2034233491 stripped --- !u!4 &2034233491 stripped
Transform: Transform:
+18 -6
View File
@@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
public class Anchor : MonoBehaviour namespace UntitledLogicGame
{ {
public class Anchor : MonoBehaviour
{
#region Unity Properties #region Unity Properties
public bool IsInput;
public string Name; public string Name;
public bool IsInput;
public float ScaleIncrease; public float ScaleIncrease;
#endregion #endregion
@@ -49,19 +51,20 @@ public class Anchor : MonoBehaviour
// Start is called before the first frame update // Start is called before the first frame update
private void Start() private void Start()
{ {
Utils.RandomName("Anchor", gameObject); Gate = GetComponentInParent<Gate>();
Utils.RandomName($"{Gate.GateType}_{Name}", gameObject);
_scale = transform.localScale; _scale = transform.localScale;
_sprite = GetComponent<SpriteRenderer>(); _sprite = GetComponent<SpriteRenderer>();
Cables = new List<Cable>(); Cables = new List<Cable>();
Gate = GetComponentInParent<Gate>();
} }
// Update is called once per frame // Update is called once per frame
private void Update() private void Update()
{ {
if(_lastActivated == null || _lastActivated != Activated) if (_lastActivated == null || _lastActivated != Activated)
{ {
_sprite.color = Activated ? GameManager.Instance.ActivatedColor : GameManager.Instance.DeadColor; _sprite.color = Activated ? GameManager.Instance.ActivatedColor : GameManager.Instance.DeadColor;
_lastActivated = Activated;
} }
} }
@@ -74,10 +77,18 @@ public class Anchor : MonoBehaviour
private void OnMouseExit() private void OnMouseExit()
{ {
transform.localScale = _scale; transform.localScale = _scale;
if(Equals(GameManager.Instance.CurrentAnchor)) if (Equals(GameManager.Instance.CurrentAnchor))
GameManager.Instance.CurrentAnchor = null; GameManager.Instance.CurrentAnchor = null;
} }
private void OnDestroy()
{
foreach(var cable in Cables)
{
Destroy(cable.gameObject);
}
}
#endregion #endregion
#region Public Methods #region Public Methods
@@ -95,4 +106,5 @@ public class Anchor : MonoBehaviour
#region Private Methods #region Private Methods
#endregion #endregion
}
} }
+23 -5
View File
@@ -1,9 +1,12 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
public class Cable : MonoBehaviour namespace UntitledLogicGame
{ {
public class Cable : MonoBehaviour
{
#region Unity Properties #region Unity Properties
#endregion #endregion
@@ -16,6 +19,11 @@ public class Cable : MonoBehaviour
set set
{ {
_startAnchor = value; _startAnchor = value;
if (value.IsInput)
{
if (value.Cables.Count > 0)
Destroy(value.Cables.First().gameObject);
}
} }
} }
public Anchor EndAnchor public Anchor EndAnchor
@@ -41,6 +49,8 @@ public class Cable : MonoBehaviour
else else
{ {
StartAnchor.Cables.Add(this); StartAnchor.Cables.Add(this);
if (EndAnchor.Cables.Count > 0)
Destroy(EndAnchor.Cables.First().gameObject);
EndAnchor.Cables = new List<Cable> { this }; EndAnchor.Cables = new List<Cable> { this };
} }
} }
@@ -75,17 +85,24 @@ public class Cable : MonoBehaviour
{ {
_line.startColor = Activated ? GameManager.Instance.ActivatedColor : GameManager.Instance.DeadColor; _line.startColor = Activated ? GameManager.Instance.ActivatedColor : GameManager.Instance.DeadColor;
_line.endColor = Activated ? GameManager.Instance.ActivatedColor : GameManager.Instance.DeadColor; _line.endColor = Activated ? GameManager.Instance.ActivatedColor : GameManager.Instance.DeadColor;
_lastActivated = Activated;
} }
var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); var startPos = StartAnchor == null ? MouseManager.MousePos : StartAnchor.transform.position;
mousePos.z = 0f; var endPos = EndAnchor == null ? MouseManager.MousePos : EndAnchor.transform.position;
var startPos = StartAnchor == null ? mousePos : StartAnchor.transform.position;
var endPos = EndAnchor == null ? mousePos : EndAnchor.transform.position;
_line.positionCount = 2; _line.positionCount = 2;
_line.SetPosition(0, startPos); _line.SetPosition(0, startPos);
_line.SetPosition(1, endPos); _line.SetPosition(1, endPos);
} }
private void OnDestroy()
{
if(StartAnchor != null)
StartAnchor.Cables.Remove(this);
if (EndAnchor != null)
EndAnchor.Cables.Remove(this);
}
#endregion #endregion
#region Public Methods #region Public Methods
@@ -101,4 +118,5 @@ public class Cable : MonoBehaviour
#endregion #endregion
}
} }
+71
View File
@@ -0,0 +1,71 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UntitledLogicGame
{
public class CameraManager : MonoBehaviour
{
#region Unity Properties
[Header("Zooming")]
public int MinSize;
public int MaxSize;
public float ScrollSensitivity;
[Header("Moving")]
public Camera Camera101;
#endregion
#region Public Properties
#endregion
#region Private Properties
private Vector3 _startDragMousePos;
private Vector3? _startDragPos;
#endregion
#region Unity Methods
private void FixedUpdate()
{
var size = Camera.main.orthographicSize;
size -= Input.GetAxis("Mouse ScrollWheel") * ScrollSensitivity;
size = Mathf.Clamp(size, MinSize, MaxSize);
Camera.main.orthographicSize = size;
Camera.main.transform.position = new Vector3(Camera.main.transform.position.x, Camera.main.transform.position.y, -size);
if (Input.GetMouseButton(2))
{
var mousePos = Camera101.ScreenToWorldPoint(Input.mousePosition);
mousePos.z = 0f;
if (_startDragPos == null)
{
_startDragMousePos = mousePos;
_startDragPos = Camera.main.transform.position;
}
Camera.main.transform.position = _startDragPos.Value - (mousePos - _startDragMousePos) * Camera.main.orthographicSize;
}
else if(_startDragPos != null)
{
_startDragPos = null;
}
}
#endregion
#region Public Methods
#endregion
#region Private Methods
#endregion
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ad29b44c506923441adfb71b13f0f9dd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+9 -23
View File
@@ -2,9 +2,12 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UntitledLogicGame.Gates;
public class GameManager : MonoBehaviour namespace UntitledLogicGame
{ {
public class GameManager : MonoBehaviour
{
#region Static Properties #region Static Properties
public static GameManager Instance { get; set; } public static GameManager Instance { get; set; }
@@ -30,12 +33,12 @@ public class GameManager : MonoBehaviour
public Anchor CurrentAnchor { get; set; } public Anchor CurrentAnchor { get; set; }
public Gate CurrentGate { get; set; }
#endregion #endregion
#region Private Properties #region Private Properties
private Cable _currentCable;
#endregion #endregion
#region Unity Methods #region Unity Methods
@@ -51,26 +54,7 @@ public class GameManager : MonoBehaviour
// Update is called once per frame // Update is called once per frame
private void Update() private void Update()
{ {
if (Input.GetMouseButton(0))
{
if (CurrentAnchor != null && _currentCable == null)
{
_currentCable = Instantiate(CablePrefab, CablesGroup, true);
_currentCable.StartAnchor = CurrentAnchor;
}
}
else if (_currentCable != null)
{
if (CurrentAnchor == null || _currentCable.StartAnchor.IsInput == CurrentAnchor.IsInput)
{
Destroy(_currentCable.gameObject);
}
else
{
_currentCable.EndAnchor = CurrentAnchor;
}
_currentCable = null;
}
} }
#endregion #endregion
@@ -82,4 +66,6 @@ public class GameManager : MonoBehaviour
#region Private Methods #region Private Methods
#endregion #endregion
}
} }
+18 -3
View File
@@ -2,12 +2,16 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
using UntitledLogicGame.Gates;
public class Gate : MonoBehaviour namespace UntitledLogicGame
{ {
public class Gate : MonoBehaviour
{
#region Unity Properties #region Unity Properties
private bool HasState; public bool HasState;
public GateType GateType;
#endregion #endregion
@@ -21,19 +25,29 @@ public class Gate : MonoBehaviour
#region Private Properties #region Private Properties
private GateDefinition _definition;
private int _lastState = -1;
#endregion #endregion
#region Unity Methods #region Unity Methods
private void Start() private void Start()
{ {
Utils.RandomName("Gate", gameObject); Utils.RandomName(GateType.ToString(), gameObject);
Anchors = GetComponentsInChildren<Anchor>().ToList(); Anchors = GetComponentsInChildren<Anchor>().ToList();
_definition = GateDefinition.Get(GateType, this);
} }
// Update is called once per frame // Update is called once per frame
private void Update() private void Update()
{ {
var state = _definition.GetState(this).ToInt();
if(state != _lastState)
{
_definition.Compute(this);
_lastState = state;
}
} }
@@ -55,4 +69,5 @@ public class Gate : MonoBehaviour
#endregion #endregion
}
} }
+60
View File
@@ -0,0 +1,60 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UntitledLogicGame.Gates;
namespace UntitledLogicGame
{
public class GateSprite : MonoBehaviour
{
#region Unity Properties
#endregion
#region Public Properties
#endregion
#region Private Properties
private Gate _gate;
#endregion
#region Unity Methods
private void Start()
{
_gate = GetComponentInParent<Gate>();
}
// Update is called once per frame
private void Update()
{
}
private void OnMouseEnter()
{
GameManager.Instance.CurrentGate = _gate;
}
private void OnMouseExit()
{
if (_gate.Equals(GameManager.Instance.CurrentGate))
GameManager.Instance.CurrentGate = null;
}
#endregion
#region Public Methods
#endregion
#region Private Methods
#endregion
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 419a02bb4cfe59848a1f7677a1018aa3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 55a2af5530764a041ab519b9d3fa15a8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+252
View File
@@ -0,0 +1,252 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace UntitledLogicGame.Gates
{
public enum GateType
{
None,
Buffer,
NOTGate,
ANDGate,
ORGate,
XORGate,
NANDGate,
NORGate,
XNORGate
}
public abstract class GateDefinition
{
public abstract string[] Inputs { get; }
public abstract string[] Outputs { get; }
internal abstract Dictionary<State, State> TruthTable { get; }
private static Dictionary<GateType, GateDefinition> Definitions;
private static void LoadAll()
{
Definitions = new Dictionary<GateType, GateDefinition>();
foreach (var gateType in Enum.GetValues(typeof(GateType)).Cast<GateType>())
{
Type t = Type.GetType($"{typeof(GateDefinition).Namespace}.{gateType}", true);
Definitions[gateType] = (GateDefinition)t.GetConstructor(new Type[0]).Invoke(new object[0]);
}
}
public static GateDefinition Get(GateType gateType, Gate gate)
{
if (gateType == GateType.None)
throw new InvalidOperationException("GateType is set to None");
if (Definitions == null)
LoadAll();
GateDefinition definition = Definitions[gateType];
foreach (var inputName in definition.Inputs)
{
if(!gate.InputAnchors.Any(a => a.Name.Equals(inputName)))
throw new InvalidOperationException($"Gate has no {inputName} input anchor");
}
foreach (var outputName in definition.Outputs)
{
if (!gate.OutputAnchors.Any(a => a.Name.Equals(outputName)))
throw new InvalidOperationException($"Gate has no {outputName} output anchor");
}
return definition;
}
internal GateDefinition()
{
foreach(var key in TruthTable.Keys)
{
if (key.Length != Inputs.Length)
throw new InvalidOperationException($"{GetType()} invalid inputs ({key})");
}
if(Inputs.Length != 0)
{
foreach (var key in Utils.AllBoolArrayValues(Inputs.Length).Select(b => new State(b)))
{
if (!TruthTable.Keys.Contains(key))
throw new InvalidOperationException($"{GetType()} no outputs for ({key})");
var values = TruthTable[key];
if (values.Length != Outputs.Length)
throw new InvalidOperationException($"{GetType()} invalid outputs for ({key})");
}
}
}
public bool[] GetState(Gate gate)
{
return Inputs.Select(i => gate.InputAnchors.First(a => a.Name.Equals(i)).Activated).ToArray();
}
public void Compute(Gate gate)
{
State key = new State(GetState(gate));
bool[] values = TruthTable[key].values;
foreach (var output in Outputs.Select((value, i) => new { i, value }))
{
gate.OutputAnchors.First(a => a.Name.Equals(output.value)).Activated = values[output.i];
}
}
}
internal class State
{
internal int Length => values.Length;
internal bool[] values;
public State(IEnumerable<bool> args)
{
values = args.ToArray();
}
public State(params bool[] args)
{
values = args;
}
public override bool Equals(object obj)
{
return obj is State state && Enumerable.SequenceEqual(values, state.values);
}
public override int GetHashCode()
{
//https://stackoverflow.com/questions/6832139/gethashcode-from-booleans-only
int hash = 17;
for (int index = 0; index < values.Length; index++)
hash = hash * 23 + values[index].GetHashCode();
return hash;
}
public override string ToString()
{
return string.Join(",", values);
}
}
#region Gates
internal class None : GateDefinition
{
public override string[] Inputs { get; } = new string[] { };
public override string[] Outputs { get; } = new string[] { };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
};
}
internal class Buffer : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false ), new State( false ) },
{ new State( true ), new State( true ) },
};
}
internal class NOTGate : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false ), new State( true ) },
{ new State( true ), new State( false ) },
};
}
internal class ANDGate : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A", "B" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false, false ), new State( false ) },
{ new State( false, true ), new State( false ) },
{ new State( true, false ), new State( false ) },
{ new State( true, true ), new State( true ) },
};
}
internal class ORGate : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A", "B" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false, false ), new State( false ) },
{ new State( false, true ), new State( true ) },
{ new State( true, false ), new State( true ) },
{ new State( true, true ), new State( true ) },
};
}
internal class XORGate : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A", "B" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false, false ), new State( false ) },
{ new State( false, true ), new State( true ) },
{ new State( true, false ), new State( true ) },
{ new State( true, true ), new State( false ) },
};
}
internal class NANDGate : GateDefinition
{
public override string[] Inputs { get; } = new string[]{ "A", "B" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false, false ), new State( true ) },
{ new State( false, true ), new State( true ) },
{ new State( true, false ), new State( true ) },
{ new State( true, true ), new State( false ) },
};
}
internal class NORGate : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A", "B" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false, false ), new State( true ) },
{ new State( false, true ), new State( false ) },
{ new State( true, false ), new State( false ) },
{ new State( true, true ), new State( false ) },
};
}
internal class XNORGate : GateDefinition
{
public override string[] Inputs { get; } = new string[] { "A", "B" };
public override string[] Outputs { get; } = new string[] { "Q" };
internal override Dictionary<State, State> TruthTable { get; } = new Dictionary<State, State>
{
{ new State( false, false ), new State( true ) },
{ new State( false, true ), new State( false ) },
{ new State( true, false ), new State( false ) },
{ new State( true, true ), new State( true ) },
};
}
#endregion
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d351d9e762a4bc64c8491ae8fabcdede
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+96
View File
@@ -0,0 +1,96 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UntitledLogicGame
{
public class MouseManager : MonoBehaviour
{
#region Unity Properties
#endregion
#region Public Properties
public static Vector3 MousePos { get; set; }
#endregion
#region Private Properties
private Cable _currentCable;
private Gate _currentGate;
private Vector3 _currentGateDelta;
#endregion
#region Unity Methods
private void Start()
{
}
private void Update()
{
var mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousePos.z = 0f;
MousePos = mousePos;
if (Input.GetMouseButton(0))
{
if(_currentCable == null)
{
if (_currentGate != null)
{
_currentGate.transform.position = MousePos - _currentGateDelta;
}
else if (GameManager.Instance.CurrentAnchor != null)
{
_currentCable = Instantiate(GameManager.Instance.CablePrefab, GameManager.Instance.CablesGroup, true);
_currentCable.StartAnchor = GameManager.Instance.CurrentAnchor;
}
else if (GameManager.Instance.CurrentGate != null)
{
_currentGate = GameManager.Instance.CurrentGate;
_currentGateDelta = MousePos - _currentGate.transform.position;
foreach(var renderer in _currentGate.GetComponentsInChildren<SpriteRenderer>())
{
renderer.sortingLayerName = "moving";
}
}
}
}
else if (_currentCable != null)
{
if (GameManager.Instance.CurrentAnchor == null || _currentCable.StartAnchor.IsInput == GameManager.Instance.CurrentAnchor.IsInput)
{
Destroy(_currentCable.gameObject);
}
else
{
_currentCable.EndAnchor = GameManager.Instance.CurrentAnchor;
}
_currentCable = null;
}
else if(_currentGate != null)
{
foreach (var renderer in _currentGate.GetComponentsInChildren<SpriteRenderer>())
{
renderer.sortingLayerName = "default";
}
_currentGate = null;
}
}
#endregion
#region Public Methods
#endregion
#region Private Methods
#endregion
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 11e573998e532eb42bdb43b80953d23f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+32 -2
View File
@@ -1,8 +1,13 @@
using System.Linq; using System;
using System.Collections;
using System.Linq;
using UnityEngine; using UnityEngine;
using Random = UnityEngine.Random;
public static class Utils namespace UntitledLogicGame
{ {
public static class Utils
{
#region String Utils #region String Utils
public static string RandomString(int length) public static string RandomString(int length)
@@ -14,6 +19,16 @@ public static class Utils
#endregion #endregion
#region Bool Utils
public static bool[][] AllBoolArrayValues(int length)
{
int count = (int)Math.Pow(2, length);
return new ArrayList[count].Select((v, i) => i.ToBoolArray(length)).ToArray();
}
#endregion
#region Unity Utils #region Unity Utils
public static void RandomName(string prefix, GameObject obj) public static void RandomName(string prefix, GameObject obj)
@@ -22,4 +37,19 @@ public static class Utils
} }
#endregion #endregion
}
public static class Extensions
{
public static bool[] ToBoolArray(this int value, int length)
{
string str = Convert.ToString(value, 2).PadLeft(length, '0');
return str.Select((x) => x == '1').ToArray();
}
public static int ToInt(this bool[] array)
{
return array.Select((v, i) => (v ? 1 : 0) << (array.Length - i - 1)).Sum();
}
}
} }
+1 -1
View File
@@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 1 - enabled: 1
path: Assets/Scenes/SampleScene.unity path: Assets/Scenes/Workspace.unity
guid: 2cda990e2423bbf4892e6590ba056729 guid: 2cda990e2423bbf4892e6590ba056729
m_configObjects: {} m_configObjects: {}
+2 -8
View File
@@ -13,7 +13,7 @@ TagManager:
- UI - UI
- -
- -
- - Background Image
- -
- -
- -
@@ -41,12 +41,6 @@ TagManager:
- name: Default - name: Default
uniqueID: 0 uniqueID: 0
locked: 0 locked: 0
- name: gates - name: moving
uniqueID: 2301276529 uniqueID: 2301276529
locked: 0 locked: 0
- name: wires
uniqueID: 791405367
locked: 0
- name: anchors
uniqueID: 1165454523
locked: 0