Fix interactivity script.
This commit is contained in:
parent
c6202020b3
commit
34c18ddcd7
13 changed files with 484 additions and 19 deletions
108
.idea/.idea.gimm270_07_photoGallery/.idea/workspace.xml
Normal file
108
.idea/.idea.gimm270_07_photoGallery/.idea/workspace.xml
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="4a1232c8-16f5-4a95-9e88-301383bfb2b3" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Materials/wallMaterial01.mat" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Materials/wallMaterial01.mat" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/mainGallery.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/mainGallery.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/mainGallery/LightingData.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/mainGallery/LightingData.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Proximity.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Proximity.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Proximity.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectId" id="2Ey1B9xEHc5g5YYfvTtm4d9MBrl" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"Discover.Launch.Via.Unity": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"settings.editor.selected.configurable": "discord-application",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||
<configuration name="UnitTests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="$USER_HOME$/.Unity/2021.3.9f1/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-runTests -batchmode -projectPath $PROJECT_DIR$ -testResults Logs/results.xml -testPlatform EditMode -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor & Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="4a1232c8-16f5-4a95-9e88-301383bfb2b3" name="Changes" comment="" />
|
||||
<created>1663552873780</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1663552873780</updated>
|
||||
<workItem from="1663552880082" duration="1724000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="UnityCheckinConfiguration" checkUnsavedScenes="true" />
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="true" />
|
||||
<component name="UnityUnitTestConfiguration" currentTestLauncher="EditMode" />
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
</component>
|
||||
</project>
|
8
Assets/Fonts.meta
Normal file
8
Assets/Fonts.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cafc87e7c309e48e3919e4daa39676d9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Fonts/Oswald-Light.ttf
Normal file
BIN
Assets/Fonts/Oswald-Light.ttf
Normal file
Binary file not shown.
23
Assets/Fonts/Oswald-Light.ttf.meta
Normal file
23
Assets/Fonts/Oswald-Light.ttf.meta
Normal file
|
@ -0,0 +1,23 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 590dad5226b6989b985b090681e2816c
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Oswald
|
||||
fallbackFontReferences:
|
||||
- {fileID: 12800000, guid: 2947a88bd6d7982ddb584b39f857889a, type: 3}
|
||||
- {fileID: 12800000, guid: 63015b5399fb597cf966c4220a4e3252, type: 3}
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Fonts/Oswald-Medium.ttf
Normal file
BIN
Assets/Fonts/Oswald-Medium.ttf
Normal file
Binary file not shown.
21
Assets/Fonts/Oswald-Medium.ttf.meta
Normal file
21
Assets/Fonts/Oswald-Medium.ttf.meta
Normal file
|
@ -0,0 +1,21 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 63015b5399fb597cf966c4220a4e3252
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Oswald
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Fonts/Oswald-Regular.ttf
Normal file
BIN
Assets/Fonts/Oswald-Regular.ttf
Normal file
Binary file not shown.
22
Assets/Fonts/Oswald-Regular.ttf.meta
Normal file
22
Assets/Fonts/Oswald-Regular.ttf.meta
Normal file
|
@ -0,0 +1,22 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2947a88bd6d7982ddb584b39f857889a
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Oswald
|
||||
fallbackFontReferences:
|
||||
- {fileID: 12800000, guid: 63015b5399fb597cf966c4220a4e3252, type: 3}
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -75,6 +75,6 @@ Material:
|
|||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.15686275, g: 0.1882353, b: 0.26666668, a: 1}
|
||||
- _Color: {r: 0.20705882, g: 0.24847056, b: 0.352, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
|
@ -3901,6 +3901,7 @@ GameObject:
|
|||
- component: {fileID: 291248332}
|
||||
- component: {fileID: 291248331}
|
||||
- component: {fileID: 291248330}
|
||||
- component: {fileID: 291248334}
|
||||
m_Layer: 0
|
||||
m_Name: overviewPanorama
|
||||
m_TagString: Untagged
|
||||
|
@ -3987,6 +3988,23 @@ Transform:
|
|||
m_Father: {fileID: 246693464}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 90, y: -90, z: 90}
|
||||
--- !u!114 &291248334
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 291248329}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 98992e6cde6dc02c7839fafcab46b9cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
newTitle: Overview
|
||||
newDesc: This panorama depicts an overview of the area where I captured the images
|
||||
in this gallery.
|
||||
minDistance: 4
|
||||
maxDistance: 5
|
||||
--- !u!43 &326199260
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -16214,7 +16232,7 @@ Light:
|
|||
m_Type: 0
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 2.89
|
||||
m_Intensity: 3.48
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30.8
|
||||
m_InnerSpotAngle: 19.3
|
||||
|
@ -22303,6 +22321,108 @@ Mesh:
|
|||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
--- !u!1 &1722350007
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1722350011}
|
||||
- component: {fileID: 1722350010}
|
||||
- component: {fileID: 1722350009}
|
||||
- component: {fileID: 1722350008}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1722350008
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1722350007}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1722350009
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1722350007}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1722350010
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1722350007}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1722350011
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1722350007}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1897960196}
|
||||
- {fileID: 1986132873}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
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, y: 0}
|
||||
--- !u!1 &1730356800
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -23826,6 +23946,86 @@ Mesh:
|
|||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
--- !u!1 &1897960195
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1897960196}
|
||||
- component: {fileID: 1897960198}
|
||||
- component: {fileID: 1897960197}
|
||||
m_Layer: 5
|
||||
m_Name: ArtTitle
|
||||
m_TagString: ArtTitle
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1897960196
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1897960195}
|
||||
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: 1722350011}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 173, y: 55}
|
||||
m_SizeDelta: {x: 320, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1897960197
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1897960195}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 63015b5399fb597cf966c4220a4e3252, type: 3}
|
||||
m_FontSize: 24
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Testing
|
||||
--- !u!222 &1897960198
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1897960195}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1909136987
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -26144,6 +26344,86 @@ MonoBehaviour:
|
|||
m_SelectedFaces:
|
||||
m_SelectedEdges: []
|
||||
m_SelectedVertices:
|
||||
--- !u!1 &1986132872
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1986132873}
|
||||
- component: {fileID: 1986132875}
|
||||
- component: {fileID: 1986132874}
|
||||
m_Layer: 5
|
||||
m_Name: ArtDescription
|
||||
m_TagString: Description
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1986132873
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1986132872}
|
||||
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: 1722350011}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -256, y: 55}
|
||||
m_SizeDelta: {x: 500, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1986132874
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1986132872}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 63015b5399fb597cf966c4220a4e3252, type: 3}
|
||||
m_FontSize: 18
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 18
|
||||
m_Alignment: 1
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Testing
|
||||
--- !u!222 &1986132875
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1986132872}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &2055064493
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
Binary file not shown.
|
@ -1,23 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
public class Proximity : MonoBehaviour
|
||||
{
|
||||
public string newTitle;
|
||||
public string newAuthor;
|
||||
public string newDesc;
|
||||
private Transform other;
|
||||
private Text myTitle;
|
||||
private Text myAuthor;
|
||||
private Text myDesc;
|
||||
private float dist;
|
||||
public float minDistance = 4.0f;
|
||||
public float maxDistance = 5.0f;
|
||||
private GameObject player;
|
||||
private GameObject message1;
|
||||
private GameObject message2;
|
||||
private GameObject message3;
|
||||
private bool check;
|
||||
|
||||
// Start is called before the first frame update
|
||||
|
@ -26,13 +22,10 @@ public class Proximity : MonoBehaviour
|
|||
player = GameObject.FindWithTag("Player");
|
||||
other = player.GetComponent<Transform>();
|
||||
message1 = GameObject.FindWithTag("ArtTitle");
|
||||
message2 = GameObject.FindWithTag("Auth");
|
||||
message3 = GameObject.FindWithTag("Description");
|
||||
message2 = GameObject.FindWithTag("Description");
|
||||
myTitle = message1.GetComponent<Text>();
|
||||
myTitle.text = "";
|
||||
myAuthor = message2.GetComponent<Text>();
|
||||
myAuthor.text = "";
|
||||
myDesc = message3.GetComponent<Text>();
|
||||
myDesc = message2.GetComponent<Text>();
|
||||
myDesc.text = "";
|
||||
check = false;
|
||||
}
|
||||
|
@ -44,17 +37,23 @@ public class Proximity : MonoBehaviour
|
|||
{
|
||||
dist = Vector3.Distance(transform.position, other.position);
|
||||
print("Distance to player: " + dist);
|
||||
if (dist < 4)
|
||||
if (dist < minDistance)
|
||||
{
|
||||
myTitle.text = newTitle;
|
||||
myAuthor.text = newAuthor;
|
||||
myDesc.text = newDesc;
|
||||
check = true;
|
||||
}
|
||||
if (dist > 4 && check == true)
|
||||
if (dist > maxDistance && check)
|
||||
{
|
||||
Start();
|
||||
resetText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void resetText()
|
||||
{
|
||||
myTitle.text = "";
|
||||
myDesc.text = "";
|
||||
check = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
--- !u!78 &1
|
||||
TagManager:
|
||||
serializedVersion: 2
|
||||
tags: []
|
||||
tags:
|
||||
- CinemachineTarget
|
||||
- ArtTitle
|
||||
- Auth
|
||||
- Description
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
|
Loading…
Reference in a new issue