Rename BlinkyBox to Button, add doors, make them pink
This commit is contained in:
parent
674c43f2df
commit
af75616e2c
75
Assets/Materials/Testing/TestPink.mat
Normal file
75
Assets/Materials/Testing/TestPink.mat
Normal file
@ -0,0 +1,75 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: TestPink
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.9190476, g: 0.38830015, b: 0.9264706, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
9
Assets/Materials/Testing/TestPink.mat.meta
Normal file
9
Assets/Materials/Testing/TestPink.mat.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce8dfa1cfa2f741819d5c8702d8739d4
|
||||
timeCreated: 1494171362
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -139,6 +139,170 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &100803251
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 100803252}
|
||||
- component: {fileID: 100803255}
|
||||
- component: {fileID: 100803254}
|
||||
- component: {fileID: 100803253}
|
||||
m_Layer: 0
|
||||
m_Name: Door Mesh
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &100803252
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 100803251}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1, y: 1.5, z: 0}
|
||||
m_LocalScale: {x: 2, y: 3, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1708261007}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &100803253
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 100803251}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: ce8dfa1cfa2f741819d5c8702d8739d4, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &100803254
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 100803251}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &100803255
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 100803251}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &248140502
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 248140503}
|
||||
- component: {fileID: 248140506}
|
||||
- component: {fileID: 248140505}
|
||||
- component: {fileID: 248140504}
|
||||
m_Layer: 0
|
||||
m_Name: Test Roof
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &248140503
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 248140502}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.07999992, y: 3.5, z: -0.020000458}
|
||||
m_LocalScale: {x: 7.163513, y: 1, z: 8.3030815}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 360020178}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &248140504
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 248140502}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d7fc3e4b5927d4025acc0b692587440c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &248140505
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 248140502}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &248140506
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 248140502}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &270758321
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -273,6 +437,50 @@ CanvasRenderer:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 270758321}
|
||||
--- !u!1 &310461191
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 310461192}
|
||||
- component: {fileID: 310461193}
|
||||
m_Layer: 0
|
||||
m_Name: Door
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &310461192
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 310461191}
|
||||
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: 1708261007}
|
||||
m_Father: {fileID: 949094013}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &310461193
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 310461191}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 48f972e7413e548b3a1f4f31bb0f3422, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ID: 0
|
||||
DoorRoot: {fileID: 1708261007}
|
||||
IsOpen: 0
|
||||
--- !u!1 &344272454
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -305,6 +513,40 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &360020177
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 360020178}
|
||||
m_Layer: 0
|
||||
m_Name: Test House
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &360020178
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 360020177}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.5, y: 0, z: 9.5}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 963248537}
|
||||
- {fileID: 1304969966}
|
||||
- {fileID: 418104023}
|
||||
- {fileID: 829930058}
|
||||
- {fileID: 248140503}
|
||||
- {fileID: 603481119}
|
||||
m_Father: {fileID: 949094013}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &375619905
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -421,6 +663,88 @@ CanvasRenderer:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 396674780}
|
||||
--- !u!1 &418104022
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 418104023}
|
||||
- component: {fileID: 418104026}
|
||||
- component: {fileID: 418104025}
|
||||
- component: {fileID: 418104024}
|
||||
m_Layer: 0
|
||||
m_Name: Test Wall
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &418104023
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 418104022}
|
||||
m_LocalRotation: {x: -0, y: 0.7071065, z: -0, w: 0.7071072}
|
||||
m_LocalPosition: {x: 0, y: 1.5, z: 3}
|
||||
m_LocalScale: {x: 1, y: 3, z: 6}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 360020178}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90.00001, z: 0}
|
||||
--- !u!23 &418104024
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 418104022}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d7fc3e4b5927d4025acc0b692587440c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &418104025
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 418104022}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &418104026
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 418104022}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &566501560
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -491,6 +815,71 @@ CanvasRenderer:
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 566501560}
|
||||
--- !u!1 &603481118
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 603481119}
|
||||
- component: {fileID: 603481120}
|
||||
m_Layer: 0
|
||||
m_Name: Test Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &603481119
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 603481118}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1.547, z: -0.082}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 360020178}
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!108 &603481120
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 603481118}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 2
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 0.5
|
||||
m_Range: 16.576748
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.02
|
||||
m_NormalBias: 0.3
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 4
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!1 &605817613
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -805,6 +1194,88 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &829930057
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 829930058}
|
||||
- component: {fileID: 829930061}
|
||||
- component: {fileID: 829930060}
|
||||
- component: {fileID: 829930059}
|
||||
m_Layer: 0
|
||||
m_Name: Test Wall
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &829930058
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 829930057}
|
||||
m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 1, y: 1.5, z: -3}
|
||||
m_LocalScale: {x: 1, y: 3, z: 2}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 360020178}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!23 &829930059
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 829930057}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d7fc3e4b5927d4025acc0b692587440c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &829930060
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 829930057}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &829930061
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 829930057}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &949094012
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -834,9 +1305,93 @@ Transform:
|
||||
- {fileID: 1199326066}
|
||||
- {fileID: 1377895208}
|
||||
- {fileID: 1988211392}
|
||||
- {fileID: 360020178}
|
||||
- {fileID: 310461192}
|
||||
m_Father: {fileID: 19192150}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &963248536
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 963248537}
|
||||
- component: {fileID: 963248540}
|
||||
- component: {fileID: 963248539}
|
||||
- component: {fileID: 963248538}
|
||||
m_Layer: 0
|
||||
m_Name: Test Wall
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &963248537
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963248536}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.5, y: 1.5, z: -0.5}
|
||||
m_LocalScale: {x: 1, y: 3, z: 6}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 360020178}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &963248538
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963248536}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d7fc3e4b5927d4025acc0b692587440c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &963248539
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963248536}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &963248540
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963248536}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1116159554
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -992,7 +1547,7 @@ GameObject:
|
||||
- component: {fileID: 1229079793}
|
||||
- component: {fileID: 1229079791}
|
||||
m_Layer: 0
|
||||
m_Name: Blinky Mesh
|
||||
m_Name: Button Mesh
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -1050,6 +1605,88 @@ MeshFilter:
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1229079789}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1304969965
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1304969966}
|
||||
- component: {fileID: 1304969969}
|
||||
- component: {fileID: 1304969968}
|
||||
- component: {fileID: 1304969967}
|
||||
m_Layer: 0
|
||||
m_Name: Test Wall
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1304969966
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1304969965}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.5, y: 1.5, z: -0.5}
|
||||
m_LocalScale: {x: 1, y: 3, z: 6}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 360020178}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &1304969967
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1304969965}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d7fc3e4b5927d4025acc0b692587440c, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!65 &1304969968
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1304969965}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &1304969969
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1304969965}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1377895204
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1210,8 +1847,8 @@ Transform:
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1444061381}
|
||||
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_LocalPosition: {x: 0, y: 0, z: 5}
|
||||
m_LocalScale: {x: 1, y: 1, z: 2}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 949094013}
|
||||
m_RootOrder: 0
|
||||
@ -1293,6 +1930,35 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1708261006
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 1708261007}
|
||||
m_Layer: 0
|
||||
m_Name: Door Root
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1708261007
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1708261006}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -2.5, y: 0, z: 6.5}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 100803252}
|
||||
m_Father: {fileID: 310461192}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1810916631
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1489,7 +2155,7 @@ GameObject:
|
||||
- component: {fileID: 1988211393}
|
||||
- component: {fileID: 1988211394}
|
||||
m_Layer: 0
|
||||
m_Name: BlinkyBox
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -1517,10 +2183,11 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 1988211391}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0c07d843d1f7647df9d2fb28d9e51c51, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 962f4855dcb8f4584839a7448e385201, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ID: 0
|
||||
WillTrigger: {fileID: 310461193}
|
||||
Mesh: {fileID: 1229079791}
|
||||
BlinkLength: 1
|
||||
BlinkBrightness: 1.3
|
||||
|
@ -10,10 +10,15 @@ namespace Cyber.Entities.SyncBases {
|
||||
/// <summary>
|
||||
/// Object that blinks when interacted with.
|
||||
/// </summary>
|
||||
public class BlinkyBox : Interactable {
|
||||
public class Button : Interactable {
|
||||
|
||||
/// <summary>
|
||||
/// The lamp mesh that will blink.
|
||||
/// The interactable which this button will trigger.
|
||||
/// </summary>
|
||||
public Interactable WillTrigger;
|
||||
|
||||
/// <summary>
|
||||
/// The button mesh that will blink.
|
||||
/// </summary>
|
||||
public MeshRenderer Mesh;
|
||||
|
||||
@ -32,42 +37,43 @@ namespace Cyber.Entities.SyncBases {
|
||||
/// </summary>
|
||||
public Color BlinkColor = new Color(1f, 0.6f, 0f);
|
||||
|
||||
private double BlinkTime = 0;
|
||||
private float BlinkTime = float.MinValue;
|
||||
private Material Material;
|
||||
|
||||
/// <summary>
|
||||
/// When a BlinkyBox is interacted with, it blinks once, light lasting
|
||||
/// for <see cref="BlinkLength"/> seconds.
|
||||
/// When the button is interacted with, it blinks once, light lasting
|
||||
/// for <see cref="BlinkLength"/> seconds, and calls Interact
|
||||
/// on the <see cref="WillTrigger"/>.
|
||||
/// </summary>
|
||||
public override void Interact() {
|
||||
BlinkTime = NetworkHelper.GetCurrentSystemTime();
|
||||
BlinkTime = Time.time;
|
||||
if (WillTrigger != null) {
|
||||
WillTrigger.Interact();
|
||||
} else {
|
||||
Term.Println("FIXME: The button '" + gameObject.name + "' was pressed, but it doesn't have a WillTrigger.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the blink time if the server has a newer blinktime
|
||||
/// Buttons only act as triggers, so only interact is sent to the server.
|
||||
/// </summary>
|
||||
/// <param name="reader"></param>
|
||||
public override void Deserialize(NetworkReader reader) {
|
||||
double ServerBlinkTime = reader.ReadDouble();
|
||||
if (ServerBlinkTime > BlinkTime) {
|
||||
BlinkTime = ServerBlinkTime;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the blink time so others will sync if they have older blinks.
|
||||
/// Buttons only act as triggers, so only interact is sent to the server.
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
public override void Serialize(NetworkWriter writer) {
|
||||
writer.Write(BlinkTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The blinky box doesn't need a hash and it should update every 5 ticks.
|
||||
/// Buttons only act as triggers, so only interact is sent to the server.
|
||||
/// </summary>
|
||||
/// <returns>Sync Handletype containing sync information.</returns>
|
||||
public override SyncHandletype GetSyncHandletype() {
|
||||
return new SyncHandletype(false, 5);
|
||||
return new SyncHandletype(false, 1000);
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
@ -75,9 +81,9 @@ namespace Cyber.Entities.SyncBases {
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
float Time = (float) (NetworkHelper.GetCurrentSystemTime() - BlinkTime);
|
||||
if (Time < BlinkLength) {
|
||||
float Brightness = (1f - Time / BlinkLength) * BlinkBrightness;
|
||||
float CurrentTime = Time.time - BlinkTime;
|
||||
if (CurrentTime < BlinkLength) {
|
||||
float Brightness = (1f - CurrentTime / BlinkLength) * BlinkBrightness;
|
||||
Color NewColor = new Color(Brightness * BlinkColor.r,
|
||||
Brightness * BlinkColor.g, Brightness * BlinkColor.b);
|
||||
Material.SetColor("_EmissionColor", NewColor);
|
@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c07d843d1f7647df9d2fb28d9e51c51
|
||||
timeCreated: 1494425788
|
||||
guid: 962f4855dcb8f4584839a7448e385201
|
||||
timeCreated: 1494461750
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
63
Assets/Scripts/Entities/SyncBases/Door.cs
Normal file
63
Assets/Scripts/Entities/SyncBases/Door.cs
Normal file
@ -0,0 +1,63 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
namespace Cyber.Entities.SyncBases {
|
||||
public class Door : Interactable {
|
||||
|
||||
/// <summary>
|
||||
/// The root of the door mesh. This will be scaled to animate the door.
|
||||
/// </summary>
|
||||
public Transform DoorRoot;
|
||||
|
||||
/// <summary>
|
||||
/// The openness of the door.
|
||||
/// </summary>
|
||||
public bool IsOpen = false;
|
||||
|
||||
/// <summary>
|
||||
/// Toggles the openness of the door.
|
||||
/// </summary>
|
||||
public override void Interact() {
|
||||
IsOpen = !IsOpen;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the openness of the door from the server.
|
||||
/// </summary>
|
||||
/// <param name="reader"></param>
|
||||
public override void Deserialize(NetworkReader reader) {
|
||||
IsOpen = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes the openness of the door.
|
||||
/// </summary>
|
||||
/// <param name="writer"></param>
|
||||
public override void Serialize(NetworkWriter writer) {
|
||||
writer.Write(IsOpen);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the Sync Handletype information for <see cref="Syncer"/>.
|
||||
/// </summary>
|
||||
/// <returns>Sync Handletype containing sync information.</returns>
|
||||
public override SyncHandletype GetSyncHandletype() {
|
||||
return new SyncHandletype(false, 10);
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
float DoorScale = IsOpen ? 0.01f : 1;
|
||||
if (DoorRoot.localScale.x != DoorScale) {
|
||||
Vector3 Scale = DoorRoot.localScale;
|
||||
if (Mathf.Abs(Scale.x - DoorScale) < 0.01) {
|
||||
Scale.x = DoorScale;
|
||||
} else {
|
||||
Scale.x = Mathf.Lerp(Scale.x, DoorScale, 5f * Time.deltaTime);
|
||||
}
|
||||
DoorRoot.localScale = Scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
Assets/Scripts/Entities/SyncBases/Door.cs.meta
Normal file
12
Assets/Scripts/Entities/SyncBases/Door.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48f972e7413e548b3a1f4f31bb0f3422
|
||||
timeCreated: 1494455828
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user