Change MeshDB to PrefabDB, add gun to inventory
This commit is contained in:
parent
3dcea18a33
commit
da0e4236a4
@ -73,6 +73,6 @@ Material:
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 0.14700001, b: 0.97646916, a: 0.5019608}
|
||||
- _EmissionColor: {r: 2.4, g: 1.5287998, b: 2.34947, a: 1}
|
||||
- _Color: {r: 1, g: 0.14700001, b: 0.97646916, a: 0.678}
|
||||
- _EmissionColor: {r: 2.3, g: 1.2007352, b: 2.2697449, a: 1}
|
||||
- _TintColor: {r: 1, g: 0.13725491, b: 0.7058824, a: 0.028}
|
||||
|
@ -100,14 +100,14 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_Settings:
|
||||
bloom:
|
||||
intensity: 0.5
|
||||
threshold: 1.3
|
||||
intensity: 0.1
|
||||
threshold: 0.1
|
||||
softKnee: 0.5
|
||||
radius: 5
|
||||
antiFlicker: 0
|
||||
radius: 4
|
||||
antiFlicker: 1
|
||||
lensDirt:
|
||||
texture: {fileID: 2800000, guid: a2960ffde020f27409e070d92fb2e00b, type: 3}
|
||||
intensity: 0.75
|
||||
intensity: 1
|
||||
colorGrading:
|
||||
m_Enabled: 0
|
||||
m_Settings:
|
||||
|
111
Assets/Prefabs/Cube.prefab
Normal file
111
Assets/Prefabs/Cube.prefab
Normal file
@ -0,0 +1,111 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1234348911399036}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1141994068573534
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4589947661171960}
|
||||
- component: {fileID: 33329614007622854}
|
||||
- component: {fileID: 23149232739000136}
|
||||
m_Layer: 0
|
||||
m_Name: Mesh
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1234348911399036
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4247694155128182}
|
||||
m_Layer: 0
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4247694155128182
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1234348911399036}
|
||||
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: 4589947661171960}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4589947661171960
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1141994068573534}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4247694155128182}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23149232739000136
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1141994068573534}
|
||||
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!33 &33329614007622854
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1141994068573534}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
9
Assets/Prefabs/Cube.prefab.meta
Normal file
9
Assets/Prefabs/Cube.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e95d72dd366d446c7a31d2fbb90b5c12
|
||||
timeCreated: 1495362496
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
111
Assets/Prefabs/Cylinder.prefab
Normal file
111
Assets/Prefabs/Cylinder.prefab
Normal file
@ -0,0 +1,111 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1723129093729032}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1062053544341604
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4890812469165510}
|
||||
- component: {fileID: 33094480760550290}
|
||||
- component: {fileID: 23595422366951510}
|
||||
m_Layer: 0
|
||||
m_Name: Mesh
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1723129093729032
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4333959237908536}
|
||||
m_Layer: 0
|
||||
m_Name: Cylinder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4333959237908536
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1723129093729032}
|
||||
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: 4890812469165510}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4890812469165510
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1062053544341604}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4333959237908536}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23595422366951510
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1062053544341604}
|
||||
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!33 &33094480760550290
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1062053544341604}
|
||||
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
9
Assets/Prefabs/Cylinder.prefab.meta
Normal file
9
Assets/Prefabs/Cylinder.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6992caf23fc7342a88450abc87761579
|
||||
timeCreated: 1495362540
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -55,8 +55,6 @@ GameObject:
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4021186793457802}
|
||||
- component: {fileID: 33347327159040576}
|
||||
- component: {fileID: 23664335955531464}
|
||||
m_Layer: 0
|
||||
m_Name: Left Hand
|
||||
m_TagString: Untagged
|
||||
@ -104,8 +102,6 @@ GameObject:
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4530387361756610}
|
||||
- component: {fileID: 33512562496570824}
|
||||
- component: {fileID: 23983100625939084}
|
||||
m_Layer: 0
|
||||
m_Name: Hat Mesh
|
||||
m_TagString: Untagged
|
||||
@ -121,8 +117,6 @@ GameObject:
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4029151840286420}
|
||||
- component: {fileID: 33917458294930386}
|
||||
- component: {fileID: 23177266068827686}
|
||||
m_Layer: 0
|
||||
m_Name: Right Hand
|
||||
m_TagString: Untagged
|
||||
@ -154,7 +148,7 @@ Transform:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1061796689964632}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.6, y: -0.30000007, z: 0.6}
|
||||
m_LocalPosition: {x: -0.3, y: -0.25, z: 0.3}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4900355877646882}
|
||||
@ -167,7 +161,7 @@ Transform:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1702112528416172}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.6, y: -0.30000007, z: 0.6}
|
||||
m_LocalPosition: {x: 0.3, y: -0.25, z: 0.3}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4900355877646882}
|
||||
@ -290,38 +284,6 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!23 &23177266068827686
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1702112528416172}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: cac55f0f5d2b94909899376ddfca7276, 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: 0
|
||||
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!23 &23446230835089794
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -386,70 +348,6 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!23 &23664335955531464
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1061796689964632}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: cac55f0f5d2b94909899376ddfca7276, 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: 0
|
||||
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!23 &23983100625939084
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1473522455052964}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: cac55f0f5d2b94909899376ddfca7276, 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: 0
|
||||
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!33 &33321560475186088
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -457,20 +355,6 @@ MeshFilter:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1042355583027620}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!33 &33347327159040576
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1061796689964632}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!33 &33512562496570824
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1473522455052964}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!33 &33780506824302906
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -485,13 +369,6 @@ MeshFilter:
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1147981388454896}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!33 &33917458294930386
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1702112528416172}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!114 &114052379458543858
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@ -521,14 +398,13 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Inventory: {fileID: 114934786006823366}
|
||||
UpdateFrequency: 5
|
||||
Slots:
|
||||
- Slot: 0
|
||||
Mesh: {fileID: 33512562496570824}
|
||||
Transform: {fileID: 4530387361756610}
|
||||
- Slot: 1
|
||||
Mesh: {fileID: 33917458294930386}
|
||||
Transform: {fileID: 4029151840286420}
|
||||
- Slot: 2
|
||||
Mesh: {fileID: 33347327159040576}
|
||||
Transform: {fileID: 4021186793457802}
|
||||
--- !u!114 &114934786006823366
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
|
File diff suppressed because it is too large
Load Diff
284
Assets/Prefabs/Revolver.prefab
Normal file
284
Assets/Prefabs/Revolver.prefab
Normal file
@ -0,0 +1,284 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1189570342817650}
|
||||
m_IsPrefabParent: 1
|
||||
--- !u!1 &1189570342817650
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4120815632844386}
|
||||
- component: {fileID: 95210833825758216}
|
||||
m_Layer: 0
|
||||
m_Name: Revolver
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1636027850798724
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4854108128273276}
|
||||
m_Layer: 0
|
||||
m_Name: Root
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1658484764950030
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4497048483641736}
|
||||
m_Layer: 0
|
||||
m_Name: Cylinder
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1662957851593570
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4161320097804978}
|
||||
m_Layer: 0
|
||||
m_Name: Hammer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1807536173560240
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4139935116609196}
|
||||
- component: {fileID: 137873237851816630}
|
||||
m_Layer: 0
|
||||
m_Name: Revolver
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1906255200147712
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4020990981463640}
|
||||
m_Layer: 0
|
||||
m_Name: Armature
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1925943292885272
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 4541820958096452}
|
||||
m_Layer: 0
|
||||
m_Name: Trigger
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4020990981463640
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1906255200147712}
|
||||
m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4854108128273276}
|
||||
m_Father: {fileID: 4120815632844386}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4120815632844386
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1189570342817650}
|
||||
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: 4020990981463640}
|
||||
- {fileID: 4139935116609196}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4139935116609196
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1807536173560240}
|
||||
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: 4120815632844386}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4161320097804978
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1662957851593570}
|
||||
m_LocalRotation: {x: -0.00000010940482, y: -5.434581e-10, z: 0.004967419, w: 0.99998766}
|
||||
m_LocalPosition: {x: -0.09575599, y: -0.022962062, z: 0.05999526}
|
||||
m_LocalScale: {x: 0.99999994, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4854108128273276}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4497048483641736
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1658484764950030}
|
||||
m_LocalRotation: {x: 0.21537921, y: 0.6735071, z: -0.21388468, w: 0.6739833}
|
||||
m_LocalPosition: {x: -0.0833501, y: -0.0005345028, z: 0.09397061}
|
||||
m_LocalScale: {x: 1, y: 0.99999994, z: 0.9999999}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4854108128273276}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4541820958096452
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1925943292885272}
|
||||
m_LocalRotation: {x: -0.00000010940484, y: -5.434583e-10, z: 0.004967418, w: 0.99998766}
|
||||
m_LocalPosition: {x: -0.034001924, y: -0.014679911, z: 0.08898599}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4854108128273276}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4854108128273276
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1636027850798724}
|
||||
m_LocalRotation: {x: -0.49751332, y: -0.5024743, z: 0.50248075, w: -0.49750698}
|
||||
m_LocalPosition: {x: -0.0002935566, y: -0.00007437801, z: 0.0004956032}
|
||||
m_LocalScale: {x: 0.99999994, y: 1, z: 0.99999994}
|
||||
m_Children:
|
||||
- {fileID: 4497048483641736}
|
||||
- {fileID: 4161320097804978}
|
||||
- {fileID: 4541820958096452}
|
||||
m_Father: {fileID: 4020990981463640}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!95 &95210833825758216
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1189570342817650}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 9000000, guid: 4bdb9c3cf6eb02a46813d71d2e3c87ad, type: 3}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 1
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
--- !u!137 &137873237851816630
|
||||
SkinnedMeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1807536173560240}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: d7eb6d68ec87f9842af7f1e1b4b5cdd0, type: 2}
|
||||
- {fileID: 2100000, guid: c21fe0b9ebdc3c54b92f9504a816be02, type: 2}
|
||||
- {fileID: 2100000, guid: 0e5403f39757d4243a701ef7f975e417, 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: 0
|
||||
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
|
||||
serializedVersion: 2
|
||||
m_Quality: 0
|
||||
m_UpdateWhenOffscreen: 0
|
||||
m_SkinnedMotionVectors: 1
|
||||
m_Mesh: {fileID: 4300000, guid: 4bdb9c3cf6eb02a46813d71d2e3c87ad, type: 3}
|
||||
m_Bones:
|
||||
- {fileID: 4854108128273276}
|
||||
- {fileID: 4541820958096452}
|
||||
- {fileID: 4161320097804978}
|
||||
- {fileID: 4497048483641736}
|
||||
m_BlendShapeWeights: []
|
||||
m_RootBone: {fileID: 4854108128273276}
|
||||
m_AABB:
|
||||
m_Center: {x: -0.024172641, y: -0.00078928843, z: 0.17103767}
|
||||
m_Extent: {x: 0.102851205, y: 0.03587121, z: 0.22000009}
|
||||
m_DirtyAABB: 0
|
9
Assets/Prefabs/Revolver.prefab.meta
Normal file
9
Assets/Prefabs/Revolver.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fed35f862b6524339a68bb9dc36f6acb
|
||||
timeCreated: 1495362564
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -245,7 +245,7 @@ Light:
|
||||
serializedVersion: 8
|
||||
m_Type: 2
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 1.3
|
||||
m_Intensity: 0.8
|
||||
m_Range: 13
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
|
@ -395,9 +395,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 928708f1fbd954c6e9e015942b8ddb92, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Meshes:
|
||||
- {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
- {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||
Prefabs: []
|
||||
--- !u!1 &310461191
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -843,48 +841,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 9d715320baa1f401ab0f46b603399dc3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &662048545
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1 &746314094
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1328,6 +1284,48 @@ Transform:
|
||||
m_Father: {fileID: 19192150}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &963953023
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4586682446228250, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 100100000, guid: e8761b9491a974d1780e60dafbd372a2, type: 2}
|
||||
m_IsPrefabParent: 0
|
||||
--- !u!1 &1116159554
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -17,7 +17,7 @@ RenderSettings:
|
||||
m_Fog: 1
|
||||
m_FogColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_FogDensity: 0.02
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
@ -37,7 +37,7 @@ RenderSettings:
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_Sun: {fileID: 1810916632}
|
||||
m_IndirectSpecularColor: {r: 0.010379571, g: 0.0037877169, b: 0.0007244428, a: 1}
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@ -354,6 +354,8 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 769207969}
|
||||
- {fileID: 1810916633}
|
||||
- {fileID: 458076501}
|
||||
- {fileID: 2039610603}
|
||||
- {fileID: 949094013}
|
||||
- {fileID: 824127003}
|
||||
m_Father: {fileID: 0}
|
||||
@ -910,7 +912,7 @@ GameObject:
|
||||
- component: {fileID: 274219296}
|
||||
- component: {fileID: 274219297}
|
||||
m_Layer: 0
|
||||
m_Name: MeshDB
|
||||
m_Name: PrefabDB
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -940,9 +942,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 928708f1fbd954c6e9e015942b8ddb92, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Meshes:
|
||||
- {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
- {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||
Prefabs:
|
||||
- {fileID: 1234348911399036, guid: e95d72dd366d446c7a31d2fbb90b5c12, type: 2}
|
||||
- {fileID: 1723129093729032, guid: 6992caf23fc7342a88450abc87761579, type: 2}
|
||||
- {fileID: 1189570342817650, guid: fed35f862b6524339a68bb9dc36f6acb, type: 2}
|
||||
--- !u!114 &310461193 stripped
|
||||
MonoBehaviour:
|
||||
m_PrefabParentObject: {fileID: 114930047805146446, guid: 03523048e15d74908b251a069e8163fa,
|
||||
@ -1714,6 +1717,71 @@ Transform:
|
||||
m_Father: {fileID: 1042143220}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &458076499
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 458076501}
|
||||
- component: {fileID: 458076500}
|
||||
m_Layer: 0
|
||||
m_Name: Ambient Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &458076500
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 458076499}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 0.45
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 0
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
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!4 &458076501
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 458076499}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 2, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 19192150}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &483169919
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3621,7 +3689,7 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 1854896671}
|
||||
m_Father: {fileID: 19192150}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &824127004
|
||||
MeshRenderer:
|
||||
@ -4483,7 +4551,7 @@ Transform:
|
||||
- {fileID: 1596443182}
|
||||
- {fileID: 2132855673}
|
||||
m_Father: {fileID: 19192150}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &961663886
|
||||
GameObject:
|
||||
@ -5837,7 +5905,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1444061381}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -0.001, z: 0}
|
||||
m_LocalScale: {x: 4, y: 1, z: 3.08}
|
||||
m_LocalScale: {x: 20, y: 1, z: 20}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 949094013}
|
||||
m_RootOrder: 0
|
||||
@ -8520,6 +8588,71 @@ MeshFilter:
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2032081181}
|
||||
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &2039610601
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 2039610603}
|
||||
- component: {fileID: 2039610602}
|
||||
m_Layer: 0
|
||||
m_Name: Ambient Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &2039610602
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2039610601}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 0.3
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 0
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
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!4 &2039610603
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2039610601}
|
||||
m_LocalRotation: {x: -0.9212198, y: -0.077828385, z: -0.24684006, w: 0.2904595}
|
||||
m_LocalPosition: {x: 0, y: 2, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 19192150}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: -145, y: -30, z: 0}
|
||||
--- !u!1 &2098021898
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -26,7 +26,7 @@ namespace Cyber.Controls {
|
||||
/// <summary>
|
||||
/// The in-world slot of the item.
|
||||
/// </summary>
|
||||
public MeshFilter Mesh;
|
||||
public Transform Transform;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -34,35 +34,34 @@ namespace Cyber.Controls {
|
||||
/// </summary>
|
||||
public Inventory Inventory;
|
||||
|
||||
/// <summary>
|
||||
/// How many times per second the visual equipment should be updated.
|
||||
/// </summary>
|
||||
public float UpdateFrequency = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// The slots where the equipped items go.
|
||||
/// </summary>
|
||||
public EquipmentMesh[] Slots;
|
||||
|
||||
private float LastUpdateTime = 0;
|
||||
private Dictionary<EquipSlot, Item> LastEquips = new Dictionary<EquipSlot, Item>();
|
||||
|
||||
private void Update() {
|
||||
if (Time.time - LastUpdateTime >= 1f / UpdateFrequency) {
|
||||
Dictionary<EquipSlot, Item> Equips = Inventory.Drive.GetEquippedItems();
|
||||
// Empty all slots
|
||||
for (int i = 0; i < Slots.Length; i++) {
|
||||
Slots[i].Mesh.mesh = null;
|
||||
bool Equipped = Equips.ContainsKey(Slots[i].Slot);
|
||||
bool LastEquipped = LastEquips.ContainsKey(Slots[i].Slot);
|
||||
// Check if this slot needs to be changed
|
||||
if (Equipped != LastEquipped || (Equipped && Equips[Slots[i].Slot] != LastEquips[Slots[i].Slot])) {
|
||||
// Clear slot
|
||||
for (int j = 0; j < Slots[i].Transform.childCount; j++) {
|
||||
Destroy(Slots[i].Transform.GetChild(j).gameObject);
|
||||
}
|
||||
if (!Equipped) {
|
||||
// Nothing is equipped
|
||||
LastEquips.Remove(Slots[i].Slot);
|
||||
} else {
|
||||
// Something is equipped
|
||||
Item Item = Equips[Slots[i].Slot];
|
||||
PrefabDB.Create(Item.ModelID, Slots[i].Transform);
|
||||
LastEquips[Slots[i].Slot] = Item;
|
||||
}
|
||||
}
|
||||
// Equip all slots
|
||||
foreach (EquipSlot Slot in Equips.Keys) {
|
||||
for (int i = 0; i < Slots.Length; i++) {
|
||||
if (Slots[i].Slot == Slot) {
|
||||
Slots[i].Mesh.mesh = MeshDB.GetMesh(Equips[Slots[i].Slot].ModelID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
LastUpdateTime = Time.time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,9 +42,9 @@ namespace Cyber.Controls {
|
||||
public TextTextureApplier ItemDescriptionText;
|
||||
|
||||
/// <summary>
|
||||
/// The item preview mesh.
|
||||
/// The item preview parent.
|
||||
/// </summary>
|
||||
public MeshFilter ItemPreviewMesh;
|
||||
public Transform ItemPreview;
|
||||
|
||||
/// <summary>
|
||||
/// The item preview spinner.
|
||||
@ -92,11 +92,22 @@ namespace Cyber.Controls {
|
||||
/// </summary>
|
||||
public Vector2 ItemGridDimensions;
|
||||
|
||||
/// <summary>
|
||||
/// The material of the items in the item grid.
|
||||
/// </summary>
|
||||
public Material ItemGridHologramMaterial;
|
||||
|
||||
/// <summary>
|
||||
/// The material of the item in the item preview.
|
||||
/// </summary>
|
||||
public Material ItemPreviewHologramMaterial;
|
||||
|
||||
private bool InventoryOpen = false;
|
||||
private float PreviewVisibility = 0f;
|
||||
private int PreviewModelID = -1;
|
||||
|
||||
private List<Transform> ItemGridCells;
|
||||
private List<MeshFilter> ItemGridCellMeshes;
|
||||
private Dictionary<int, Item> ItemGridContainedItems = new Dictionary<int, Item>();
|
||||
private int ItemGridSelectedIndex;
|
||||
private Transform GrabbedItem;
|
||||
private int GrabbedItemIndex = -1;
|
||||
@ -117,11 +128,9 @@ namespace Cyber.Controls {
|
||||
private void Start() {
|
||||
int ItemGridSize = (int) ItemGridDimensions.x * (int) ItemGridDimensions.y;
|
||||
ItemGridCells = new List<Transform>(ItemGridSize);
|
||||
ItemGridCellMeshes = new List<MeshFilter>(ItemGridSize);
|
||||
for (int i = 0; i < ItemGridSize; i++) {
|
||||
Transform Cell = ItemGridParent.GetChild(i).transform;
|
||||
ItemGridCells.Add(Cell);
|
||||
ItemGridCellMeshes.Add(Cell.GetComponentInChildren<MeshFilter>());
|
||||
}
|
||||
|
||||
IconInventoryColor = IconInventory.material.GetColor("_EmissionColor");
|
||||
@ -178,23 +187,32 @@ namespace Cyber.Controls {
|
||||
}
|
||||
} else {
|
||||
// Something is grabbed, make things react to this
|
||||
ItemGridSelectedIndex = CurrentIndex;
|
||||
if (Input.GetButtonUp("Activate")) {
|
||||
// Grab was released, drop item here
|
||||
// Lerp things
|
||||
ItemGridCellMeshes[GrabbedItemIndex].transform.position = ItemGridCells[CurrentIndex].position;
|
||||
Lerper.LerpTransformPosition(ItemGridCellMeshes[GrabbedItemIndex].transform, new Vector3(), 10f);
|
||||
Lerper.LerpTransformPosition(ItemGridCellMeshes[CurrentIndex].transform, new Vector3(), 10f);
|
||||
if (GrabbedItemIndex == CurrentIndex) {
|
||||
// The item was dropped in place, reset the position
|
||||
if (ItemGridCells[GrabbedItemIndex].childCount > 0) {
|
||||
ItemGridCells[GrabbedItemIndex].GetChild(0).localPosition = new Vector3();
|
||||
}
|
||||
} else {
|
||||
// Lerp things (if the models are set)
|
||||
Vector3 ReturnToPos = ItemGridCells[GrabbedItemIndex].position;
|
||||
ItemGridCells[GrabbedItemIndex].position = ItemGridCells[CurrentIndex].position;
|
||||
Lerper.LerpTransformPosition(ItemGridCells[GrabbedItemIndex], ReturnToPos, 20f);
|
||||
|
||||
// Switch items
|
||||
Inventory.Drive.SwitchSlots(GrabbedItemIndex, CurrentIndex);
|
||||
Client.Send(PktType.InventoryAction, Inventory.ActionHandler.BuildSlotSwitch(GrabbedItemIndex, CurrentIndex));
|
||||
}
|
||||
|
||||
// Reset grabbing
|
||||
GrabbedItem = null;
|
||||
GrabbedItemIndex = -1;
|
||||
ItemGridSelectedIndex = CurrentIndex;
|
||||
} else {
|
||||
ItemGridCellMeshes[GrabbedItemIndex].transform.position = LookedAt.point;
|
||||
if (ItemGridCells[GrabbedItemIndex].childCount > 0) {
|
||||
ItemGridCells[GrabbedItemIndex].GetChild(0).position = LookedAt.point;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (Mesh != null) {
|
||||
@ -248,25 +266,38 @@ namespace Cyber.Controls {
|
||||
// Find the item and mesh
|
||||
int i = x + y * (int) ItemGridDimensions.x;
|
||||
Item Item = Inventory.Drive.GetItemAt(x + y * (int) ItemGridDimensions.x);
|
||||
Mesh Mesh = null;
|
||||
if (Item != null) {
|
||||
Mesh = MeshDB.GetMesh(Item.ModelID);
|
||||
if (Item != null && (!ItemGridContainedItems.ContainsKey(i) || ItemGridContainedItems[i] != Item)) {
|
||||
// Clear cell
|
||||
for (int j = 0; j < ItemGridCells[i].childCount; j++) {
|
||||
DestroyImmediate(ItemGridCells[i].GetChild(j).gameObject);
|
||||
}
|
||||
|
||||
// Add new item
|
||||
GameObject ItemObject = PrefabDB.Create(Item.ModelID, ItemGridCells[i]);
|
||||
MeshUtil.SetMaterial(ItemObject, ItemGridHologramMaterial);
|
||||
ItemGridContainedItems[i] = Item;
|
||||
} else if (Item == null && ItemGridContainedItems.ContainsKey(i)) {
|
||||
for (int j = 0; j < ItemGridCells[i].childCount; j++) {
|
||||
Destroy(ItemGridCells[i].GetChild(j).gameObject);
|
||||
}
|
||||
ItemGridContainedItems.Remove(i);
|
||||
}
|
||||
ItemGridCellMeshes[i].mesh = Mesh;
|
||||
|
||||
// Set the base scale and spin status
|
||||
float Scale = 0.08f;
|
||||
float Scale = 0.13f;
|
||||
bool Spinning = false;
|
||||
|
||||
if (focused == i || ItemGridSelectedIndex == i) {
|
||||
// Item is selected or hovered, animate
|
||||
Scale = 0.1f;
|
||||
Scale = 0.16f;
|
||||
Spinning = true;
|
||||
}
|
||||
|
||||
if (ItemGridSelectedIndex == i) {
|
||||
// Set preview information
|
||||
SetPreviewMesh(Mesh);
|
||||
if (ItemGridCells[i].childCount > 0) {
|
||||
SetPreviewItem(Item);
|
||||
}
|
||||
TextTextureProperties NameProps = ItemNameText.TextProperties;
|
||||
TextTextureProperties DescriptionProps = ItemDescriptionText.TextProperties;
|
||||
if (Item != null) {
|
||||
@ -286,7 +317,7 @@ namespace Cyber.Controls {
|
||||
} else {
|
||||
ItemGridSelector.position =
|
||||
Vector3.Lerp(ItemGridSelector.position,
|
||||
ItemGridCells[i].position, 20f * Time.deltaTime);
|
||||
ItemGridCells[i].position, 10f * Time.deltaTime);
|
||||
}
|
||||
Vector3 NewRot = ItemGridSelector.localEulerAngles;
|
||||
NewRot.z = 0;
|
||||
@ -295,15 +326,21 @@ namespace Cyber.Controls {
|
||||
|
||||
if (!Spinning) {
|
||||
// Not selected, reset rotation
|
||||
ItemGridCellMeshes[i].transform.LookAt(Camera.transform);
|
||||
Vector3 NewRot = ItemGridCellMeshes[i].transform.localEulerAngles;
|
||||
if (ItemGridCells[i].childCount > 0) {
|
||||
Transform ItemTransform = ItemGridCells[i].GetChild(0);
|
||||
ItemTransform.LookAt(Camera.transform);
|
||||
Vector3 NewRot = ItemTransform.localEulerAngles;
|
||||
NewRot.z = 0;
|
||||
ItemGridCellMeshes[i].transform.localEulerAngles = NewRot;
|
||||
NewRot.y += 90;
|
||||
ItemTransform.localEulerAngles = NewRot;
|
||||
}
|
||||
}
|
||||
|
||||
// Update spinning status and scaling
|
||||
ItemGridCells[i].GetComponent<Spinner>().Spinning = Spinning;
|
||||
FixMeshScaling(ItemGridCellMeshes[i], Scale);
|
||||
if (ItemGridCells[i].childCount > 0) {
|
||||
FixMeshScaling(ItemGridCells[i].GetChild(0), Scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,7 +349,7 @@ namespace Cyber.Controls {
|
||||
|
||||
// Clean up the preview screen if there was no item
|
||||
if (!ItemFound) {
|
||||
SetPreviewMesh(null);
|
||||
SetPreviewItem(null);
|
||||
TextTextureProperties NameProps = ItemNameText.TextProperties;
|
||||
TextTextureProperties DescriptionProps = ItemDescriptionText.TextProperties;
|
||||
NameProps.Text = "";
|
||||
@ -325,38 +362,35 @@ namespace Cyber.Controls {
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPreviewMesh(Mesh mesh) {
|
||||
ItemPreviewSpinner.Spinning = mesh != null;
|
||||
if (mesh != null) {
|
||||
ItemPreviewMesh.mesh = mesh;
|
||||
private void SetPreviewItem(Item item) {
|
||||
ItemPreviewSpinner.Spinning = item != null;
|
||||
if (item != null && PreviewModelID != item.ModelID) {
|
||||
for (int j = 0; j < ItemPreview.childCount; j++) {
|
||||
DestroyImmediate(ItemPreview.GetChild(j).gameObject);
|
||||
}
|
||||
FixMeshScaling(ItemPreviewMesh, 0.175f * PreviewVisibility);
|
||||
}
|
||||
|
||||
private void FixMeshScaling(MeshFilter toFix, float scale) {
|
||||
if (toFix.mesh == null) {
|
||||
return;
|
||||
GameObject ItemObject = PrefabDB.Create(item.ModelID, ItemPreview);
|
||||
MeshUtil.SetMaterial(ItemObject, ItemPreviewHologramMaterial);
|
||||
PreviewModelID = item.ModelID;
|
||||
}
|
||||
FixMeshScaling(ItemPreview, 0.35f * PreviewVisibility);
|
||||
}
|
||||
|
||||
private void FixMeshScaling(Transform toFix, float scale) {
|
||||
Vector3 Extents = MeshUtil.GetMeshBounds(toFix.gameObject).extents;
|
||||
float HighestExtent = 0.1f;
|
||||
float Height = toFix.mesh.bounds.extents.y * 2f;
|
||||
float Width = Mathf.Sqrt(Mathf.Pow(toFix.mesh.bounds.extents.x * 2f, 2) +
|
||||
Mathf.Pow(toFix.mesh.bounds.extents.y * 2f, 2));
|
||||
float Depth = Mathf.Sqrt(Mathf.Pow(toFix.mesh.bounds.extents.z * 2f, 2) +
|
||||
Mathf.Pow(toFix.mesh.bounds.extents.y * 2f, 2));
|
||||
|
||||
if (Height > HighestExtent) {
|
||||
HighestExtent = Height;
|
||||
if (Extents.x > HighestExtent) {
|
||||
HighestExtent = Extents.x;
|
||||
}
|
||||
if (Width > HighestExtent) {
|
||||
HighestExtent = Width;
|
||||
if (Extents.y > HighestExtent) {
|
||||
HighestExtent = Extents.y;
|
||||
}
|
||||
if (Depth > HighestExtent) {
|
||||
HighestExtent = Depth;
|
||||
if (Extents.z > HighestExtent) {
|
||||
HighestExtent = Extents.z;
|
||||
}
|
||||
|
||||
float Scale = scale * 1f / HighestExtent;
|
||||
toFix.transform.localScale = new Vector3(Scale, Scale, Scale);
|
||||
float Scale = scale * 0.5f / HighestExtent;
|
||||
toFix.localScale = new Vector3(Scale, Scale, Scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ namespace Cyber.Entities.SyncBases {
|
||||
Drive.AddItem(ItemDB.Singleton.Get(0));
|
||||
Drive.AddItem(ItemDB.Singleton.Get(1));
|
||||
Drive.AddItem(ItemDB.Singleton.Get(2));
|
||||
Drive.AddItem(ItemDB.Singleton.Get(3));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ namespace Cyber.Items {
|
||||
AddItem(new Item(Counter++, 0, "Very Long Item Name", 1.5f, EquipSlot.Hat, "This item is a rare piece of the \"way too long of a name\" technology, invented by space goblins in ancient times."));
|
||||
AddItem(new Item(Counter++, 1, "Outworldly Spherical Tube", .5f, EquipSlot.RightHand, "It's so spherical and smooth that it seems like it's not even from this world!"));
|
||||
AddItem(new Item(Counter++, 0, "Cube Of Debuggery", 1.5f, EquipSlot.LeftHand, "Does some debuggery when you poke it.", (host) => { Term.Println("*DEBUGGERY*"); }));
|
||||
AddItem(new Item(Counter++, 2, "Punk Revolver", 1f, EquipSlot.RightHand, "It only knows three chords. Shoots five times though.", (host) => { Term.Println("*BANG*"); }));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -30,7 +30,7 @@ namespace Cyber.Util {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lerps the transform local position.
|
||||
/// Lerps the transform world position.
|
||||
/// </summary>
|
||||
/// <param name="transform">Transform.</param>
|
||||
/// <param name="to">To.</param>
|
||||
@ -41,13 +41,17 @@ namespace Cyber.Util {
|
||||
}
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
private void LateUpdate() {
|
||||
List<Transform> RemoveThese = new List<Transform>();
|
||||
foreach (Transform Transform in PositionLerps.Keys) {
|
||||
Transform.localPosition = Vector3.Lerp(Transform.localPosition,
|
||||
if (Transform == null) {
|
||||
PositionLerps.Remove(Transform);
|
||||
continue;
|
||||
}
|
||||
Transform.position = Vector3.Lerp(Transform.position,
|
||||
PositionLerps[Transform].Target, PositionLerps[Transform].Speed * Time.deltaTime);
|
||||
if ((Transform.localPosition - PositionLerps[Transform].Target).magnitude < 0.001f) {
|
||||
Transform.localPosition = PositionLerps[Transform].Target;
|
||||
if ((Transform.position - PositionLerps[Transform].Target).magnitude < 0.001f) {
|
||||
Transform.position = PositionLerps[Transform].Target;
|
||||
RemoveThese.Add(Transform);
|
||||
}
|
||||
}
|
||||
|
@ -1,35 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cyber.Util {
|
||||
|
||||
/// <summary>
|
||||
/// Mesh database, contains all the meshes in the game. This should be
|
||||
/// used if meshes are needed at runtime.
|
||||
/// </summary>
|
||||
public class MeshDB : MonoBehaviour {
|
||||
private static MeshDB Singleton;
|
||||
|
||||
/// <summary>
|
||||
/// The meshes that can be used at runtime.
|
||||
/// </summary>
|
||||
public Mesh[] Meshes;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the Singleton.
|
||||
/// </summary>
|
||||
public MeshDB() {
|
||||
Singleton = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the mesh at the defined index.
|
||||
/// </summary>
|
||||
/// <returns>The mesh.</returns>
|
||||
/// <param name="index">Index.</param>
|
||||
public static Mesh GetMesh(int index) {
|
||||
return Singleton.Meshes[index];
|
||||
}
|
||||
}
|
||||
}
|
95
Assets/Scripts/Util/MeshUtil.cs
Normal file
95
Assets/Scripts/Util/MeshUtil.cs
Normal file
@ -0,0 +1,95 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cyber.Util {
|
||||
|
||||
/// <summary>
|
||||
/// Utility functions for mesh-related things.
|
||||
/// </summary>
|
||||
public class MeshUtil : MonoBehaviour {
|
||||
|
||||
/// <summary>
|
||||
/// Gets the bounds of a gameobject or its children with a mesh.
|
||||
/// </summary>
|
||||
/// <returns>The bounds of the object.</returns>
|
||||
/// <param name="obj">Object.</param>
|
||||
public static Bounds GetMeshBounds(GameObject obj) {
|
||||
MeshFilter Mesh = GetMeshFilter(obj);
|
||||
if (Mesh != null) {
|
||||
return Mesh.mesh.bounds;
|
||||
}
|
||||
SkinnedMeshRenderer SkinnedMesh = GetSkinnedMeshRenderer(obj);
|
||||
if (SkinnedMesh != null) {
|
||||
return SkinnedMesh.sharedMesh.bounds;
|
||||
}
|
||||
return new Bounds();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the material in the objects or its children.
|
||||
/// </summary>
|
||||
/// <param name="obj">Object.</param>
|
||||
/// <param name="mat">Mat.</param>
|
||||
public static void SetMaterial(GameObject obj, Material mat) {
|
||||
MeshRenderer MeshRenderer = MeshUtil.GetMeshRenderer(obj);
|
||||
if (MeshRenderer != null) {
|
||||
Material[] NewMats = new Material[MeshRenderer.materials.Length];
|
||||
for (int j = 0; j < MeshRenderer.materials.Length; j++) {
|
||||
NewMats[j] = mat;
|
||||
}
|
||||
MeshRenderer.materials = NewMats;
|
||||
}
|
||||
SkinnedMeshRenderer SkinnedMeshRenderer = MeshUtil.GetSkinnedMeshRenderer(obj);
|
||||
if (SkinnedMeshRenderer != null) {
|
||||
Material[] NewMats = new Material[SkinnedMeshRenderer.materials.Length];
|
||||
for (int j = 0; j < SkinnedMeshRenderer.materials.Length; j++) {
|
||||
NewMats[j] = mat;
|
||||
}
|
||||
SkinnedMeshRenderer.materials = NewMats;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a MeshFilter in a gameobject or its children.
|
||||
/// </summary>
|
||||
/// <returns>The MeshFilter in object.</returns>
|
||||
/// <param name="obj">Object.</param>
|
||||
public static MeshFilter GetMeshFilter(GameObject obj) {
|
||||
MeshFilter Mesh = obj.GetComponent<MeshFilter>();
|
||||
if (Mesh == null) {
|
||||
// No mesh found, search children
|
||||
Mesh = obj.GetComponentInChildren<MeshFilter>();
|
||||
}
|
||||
return Mesh;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a MeshRenderer in a gameobject or its children.
|
||||
/// </summary>
|
||||
/// <returns>The MeshRenderer in object.</returns>
|
||||
/// <param name="obj">Object.</param>
|
||||
public static MeshRenderer GetMeshRenderer(GameObject obj) {
|
||||
MeshRenderer Mesh = obj.GetComponent<MeshRenderer>();
|
||||
if (Mesh == null) {
|
||||
// No mesh found, search children
|
||||
Mesh = obj.GetComponentInChildren<MeshRenderer>();
|
||||
}
|
||||
return Mesh;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a SkinnedMeshRenderer in a gameobject or its children.
|
||||
/// </summary>
|
||||
/// <returns>The SkinnedMeshRenderer in object.</returns>
|
||||
/// <param name="obj">Object.</param>
|
||||
public static SkinnedMeshRenderer GetSkinnedMeshRenderer(GameObject obj) {
|
||||
SkinnedMeshRenderer Mesh = obj.GetComponent<SkinnedMeshRenderer>();
|
||||
if (Mesh == null) {
|
||||
// No mesh found, search children
|
||||
Mesh = obj.GetComponentInChildren<SkinnedMeshRenderer>();
|
||||
}
|
||||
return Mesh;
|
||||
}
|
||||
}
|
||||
}
|
12
Assets/Scripts/Util/MeshUtil.cs.meta
Normal file
12
Assets/Scripts/Util/MeshUtil.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eca7ccdc67deb4f24a06764028c17dd5
|
||||
timeCreated: 1495362148
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
44
Assets/Scripts/Util/PrefabDB.cs
Normal file
44
Assets/Scripts/Util/PrefabDB.cs
Normal file
@ -0,0 +1,44 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cyber.Util {
|
||||
|
||||
/// <summary>
|
||||
/// Prefab database, contains all the prefabs that might be needed at
|
||||
/// runtime. Intended to be called through the static functions.
|
||||
/// </summary>
|
||||
public class PrefabDB : MonoBehaviour {
|
||||
private static PrefabDB Singleton;
|
||||
|
||||
/// <summary>
|
||||
/// The prefabs that can be used at runtime.
|
||||
/// </summary>
|
||||
public GameObject[] Prefabs;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the Singleton.
|
||||
/// </summary>
|
||||
public PrefabDB() {
|
||||
Singleton = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new prefab with the given position, rotation and parent.
|
||||
/// </summary>
|
||||
/// <returns>The prefab.</returns>
|
||||
/// <param name="index">Index.</param>
|
||||
/// <param name="pos">The position (local, if parent is not null).</param>
|
||||
/// <param name="rot">The rotation (local, if parent is not null).</param>
|
||||
/// <param name="parent">The parent transform.</param>
|
||||
public static GameObject Create(int index, Transform parent,
|
||||
Vector3 pos = new Vector3(), Quaternion rot = new Quaternion()) {
|
||||
GameObject Result = Instantiate(Singleton.Prefabs[index], pos, rot, parent);
|
||||
if (parent != null) {
|
||||
Result.transform.localPosition = pos;
|
||||
Result.transform.localRotation = rot;
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user