Compare commits
16 Commits
54db4e4b73
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 9dfcee6159 | |||
| 9db5d65278 | |||
| 9948d82dc7 | |||
| 0e652c6cc0 | |||
| 7259fe8d67 | |||
| 8fef9c25d7 | |||
| aee3fe9ea7 | |||
| b414bd391c | |||
| 343a27936c | |||
| f4be1941d3 | |||
| a689d76de7 | |||
| 9ba1ff4a1f | |||
| 8dd61407cd | |||
| db47bc3768 | |||
| 46ec37309d | |||
| 77625e7ad5 |
@@ -0,0 +1,144 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!243 &-5985036292871575848
|
||||||
|
AudioMixerGroupController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Music
|
||||||
|
m_AudioMixer: {fileID: 24100000}
|
||||||
|
m_GroupID: 5bdfe230200494b4dba2d07588c7c60d
|
||||||
|
m_Children: []
|
||||||
|
m_Volume: 831694893cecc104e83cd13eec93d28c
|
||||||
|
m_Pitch: 5aeb6a175f195024a87861062e2ec1b0
|
||||||
|
m_Send: 00000000000000000000000000000000
|
||||||
|
m_Effects:
|
||||||
|
- {fileID: -5067953075322291121}
|
||||||
|
m_UserColorIndex: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_Solo: 0
|
||||||
|
m_BypassEffects: 0
|
||||||
|
--- !u!244 &-5067953075322291121
|
||||||
|
AudioMixerEffectController:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EffectID: 87ce651d7c89cfa44afcecbb0fff4abd
|
||||||
|
m_EffectName: Attenuation
|
||||||
|
m_MixLevel: df4b34f13069a454cb0de1361d5c4099
|
||||||
|
m_Parameters: []
|
||||||
|
m_SendTarget: {fileID: 0}
|
||||||
|
m_EnableWetMix: 0
|
||||||
|
m_Bypass: 0
|
||||||
|
--- !u!241 &24100000
|
||||||
|
AudioMixerController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: AudioMixer
|
||||||
|
m_OutputGroup: {fileID: 0}
|
||||||
|
m_MasterGroup: {fileID: 24300002}
|
||||||
|
m_Snapshots:
|
||||||
|
- {fileID: 24500006}
|
||||||
|
m_StartSnapshot: {fileID: 24500006}
|
||||||
|
m_SuspendThreshold: -80
|
||||||
|
m_EnableSuspend: 1
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ExposedParameters:
|
||||||
|
- guid: 8e54073feec66d24c8b5b5321b86da6f
|
||||||
|
name: MasterVolume
|
||||||
|
- guid: 831694893cecc104e83cd13eec93d28c
|
||||||
|
name: MusicVolume
|
||||||
|
- guid: 97cc39ce50c2b85439b8361ceae3f4c6
|
||||||
|
name: SFXVolume
|
||||||
|
m_AudioMixerGroupViews:
|
||||||
|
- guids:
|
||||||
|
- 1647cf21931ffb4409abd5f86b5ba22b
|
||||||
|
- 5bdfe230200494b4dba2d07588c7c60d
|
||||||
|
- 306f67f3e059d2c4aaaef306930b737e
|
||||||
|
name: View
|
||||||
|
m_CurrentViewIndex: 0
|
||||||
|
m_TargetSnapshot: {fileID: 24500006}
|
||||||
|
--- !u!243 &24300002
|
||||||
|
AudioMixerGroupController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Master
|
||||||
|
m_AudioMixer: {fileID: 24100000}
|
||||||
|
m_GroupID: 1647cf21931ffb4409abd5f86b5ba22b
|
||||||
|
m_Children:
|
||||||
|
- {fileID: -5985036292871575848}
|
||||||
|
- {fileID: 3079392121493439853}
|
||||||
|
m_Volume: 8e54073feec66d24c8b5b5321b86da6f
|
||||||
|
m_Pitch: f023bc3b372a9df469e34b83fc9efc66
|
||||||
|
m_Send: 00000000000000000000000000000000
|
||||||
|
m_Effects:
|
||||||
|
- {fileID: 24400004}
|
||||||
|
m_UserColorIndex: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_Solo: 0
|
||||||
|
m_BypassEffects: 0
|
||||||
|
--- !u!244 &24400004
|
||||||
|
AudioMixerEffectController:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EffectID: bdd917cc2a7b59c45a66df37be3e3489
|
||||||
|
m_EffectName: Attenuation
|
||||||
|
m_MixLevel: c9d36b6a18286a8449cc204da4cc3140
|
||||||
|
m_Parameters: []
|
||||||
|
m_SendTarget: {fileID: 0}
|
||||||
|
m_EnableWetMix: 0
|
||||||
|
m_Bypass: 0
|
||||||
|
--- !u!245 &24500006
|
||||||
|
AudioMixerSnapshotController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Snapshot
|
||||||
|
m_AudioMixer: {fileID: 24100000}
|
||||||
|
m_SnapshotID: 8474d9129ecb5954ea867453e7561687
|
||||||
|
m_FloatValues: {}
|
||||||
|
m_TransitionOverrides: {}
|
||||||
|
--- !u!243 &3079392121493439853
|
||||||
|
AudioMixerGroupController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: SFX
|
||||||
|
m_AudioMixer: {fileID: 24100000}
|
||||||
|
m_GroupID: 306f67f3e059d2c4aaaef306930b737e
|
||||||
|
m_Children: []
|
||||||
|
m_Volume: 97cc39ce50c2b85439b8361ceae3f4c6
|
||||||
|
m_Pitch: 9119b1dfcb88e4e4c917090c57fa1680
|
||||||
|
m_Send: 00000000000000000000000000000000
|
||||||
|
m_Effects:
|
||||||
|
- {fileID: 5127884578886668124}
|
||||||
|
m_UserColorIndex: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_Solo: 0
|
||||||
|
m_BypassEffects: 0
|
||||||
|
--- !u!244 &5127884578886668124
|
||||||
|
AudioMixerEffectController:
|
||||||
|
m_ObjectHideFlags: 3
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EffectID: 0f75e42fe6e091c4ca36a6aa676fff0f
|
||||||
|
m_EffectName: Attenuation
|
||||||
|
m_MixLevel: 45c4e84286ed5a345b779472c0df9874
|
||||||
|
m_Parameters: []
|
||||||
|
m_SendTarget: {fileID: 0}
|
||||||
|
m_EnableWetMix: 0
|
||||||
|
m_Bypass: 0
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3490106d3e6edc143b9179d3107780dd
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 24100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4309010032443068981
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7306326942743672910}
|
||||||
|
- component: {fileID: 1001616692551291424}
|
||||||
|
- component: {fileID: 8608724141738220055}
|
||||||
|
- component: {fileID: 5427514152406774277}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Canvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7306326942743672910
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4309010032443068981}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 2225573246702167059}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!223 &1001616692551291424
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4309010032443068981}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_VertexColorAlwaysGammaSpace: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 25
|
||||||
|
m_UpdateRectTransformForStandalone: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!114 &8608724141738220055
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4309010032443068981}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 1
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||||
|
m_ScreenMatchMode: 1
|
||||||
|
m_MatchWidthOrHeight: 0.5
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!114 &5427514152406774277
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4309010032443068981}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!1001 &4657271629088206950
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 7306326942743672910}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 818899427131401759, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1376587328550839904, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: UI
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2975696880262954876, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4264548731807291060, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5101319162034548862, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5514935285560916770, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7535213278904715570, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
--- !u!4 &2225573246702167059 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4657271629088206950}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bbc6f24d8835c954e9ac0321983d48f7
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public static class DebugUtilities
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Draws a wire sphere using Debug.DrawLine for runtime visibility.
|
||||||
|
/// </summary>
|
||||||
|
public static void DrawWireSphere(Vector3 center, float radius, Color color, float duration, int quality = 3)
|
||||||
|
{
|
||||||
|
quality = Mathf.Clamp(quality, 1, 10);
|
||||||
|
int segments = quality << 2;
|
||||||
|
int subdivisions = quality << 3;
|
||||||
|
int halfSegments = segments >> 1;
|
||||||
|
float strideAngle = 360f / subdivisions;
|
||||||
|
float segmentStride = 180f / segments;
|
||||||
|
|
||||||
|
Vector3 first;
|
||||||
|
Vector3 next;
|
||||||
|
|
||||||
|
// Draw meridians (vertical circles)
|
||||||
|
for (int i = 0; i < segments; i++)
|
||||||
|
{
|
||||||
|
first = (Vector3.forward * radius);
|
||||||
|
first = Quaternion.AngleAxis(segmentStride * (i - halfSegments), Vector3.right) * first;
|
||||||
|
|
||||||
|
for (int j = 0; j < subdivisions; j++)
|
||||||
|
{
|
||||||
|
next = Quaternion.AngleAxis(strideAngle, Vector3.up) * first;
|
||||||
|
Debug.DrawLine(first + center, next + center, color, duration);
|
||||||
|
first = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw parallels (horizontal circles)
|
||||||
|
Vector3 axis;
|
||||||
|
for (int i = 0; i < segments; i++)
|
||||||
|
{
|
||||||
|
first = (Vector3.forward * radius);
|
||||||
|
first = Quaternion.AngleAxis(segmentStride * (i - halfSegments), Vector3.up) * first;
|
||||||
|
axis = Quaternion.AngleAxis(90f, Vector3.up) * first;
|
||||||
|
|
||||||
|
for (int j = 0; j < subdivisions; j++)
|
||||||
|
{
|
||||||
|
next = Quaternion.AngleAxis(strideAngle, axis) * first;
|
||||||
|
Debug.DrawLine(first + center, next + center, color, duration);
|
||||||
|
first = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 933aa2a82d546964cb7e1a8e7a1e007f
|
||||||
+421
-11
@@ -481,6 +481,7 @@ Transform:
|
|||||||
- {fileID: 7557613548437949332}
|
- {fileID: 7557613548437949332}
|
||||||
- {fileID: 4497923176373106572}
|
- {fileID: 4497923176373106572}
|
||||||
- {fileID: 5562995395109305721}
|
- {fileID: 5562995395109305721}
|
||||||
|
- {fileID: 4912141646191296772}
|
||||||
m_Father: {fileID: 5056434560497563343}
|
m_Father: {fileID: 5056434560497563343}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1125603919066053951
|
--- !u!1 &1125603919066053951
|
||||||
@@ -875,6 +876,118 @@ BoxCollider:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_Size: {x: 1, y: 1, z: 1}
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &2224365324496764932
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3539603623064926047}
|
||||||
|
- component: {fileID: 4327863251967237271}
|
||||||
|
- component: {fileID: 5853307117920602168}
|
||||||
|
- component: {fileID: 425346278670060512}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Hook
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &3539603623064926047
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2224365324496764932}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.60816044, y: 0.25875628, z: 0.6905512, w: 0.29381147}
|
||||||
|
m_LocalPosition: {x: 0.1109866, y: 0.081797495, z: 0.063700035}
|
||||||
|
m_LocalScale: {x: 0.044682946, y: 0.04468295, z: 0.02127847}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4912141646191296772}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 46.923}
|
||||||
|
--- !u!33 &4327863251967237271
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2224365324496764932}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &5853307117920602168
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2224365324496764932}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &425346278670060512
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2224365324496764932}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &2257686476074821330
|
--- !u!1 &2257686476074821330
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1071,6 +1184,118 @@ Animator:
|
|||||||
m_AllowConstantClipSamplingOptimization: 1
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
m_KeepAnimatorStateOnDisable: 0
|
m_KeepAnimatorStateOnDisable: 0
|
||||||
m_WriteDefaultValuesOnDisable: 0
|
m_WriteDefaultValuesOnDisable: 0
|
||||||
|
--- !u!1 &3383803907815417999
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 800413527618061279}
|
||||||
|
- component: {fileID: 5808647788581163567}
|
||||||
|
- component: {fileID: 679585356186139854}
|
||||||
|
- component: {fileID: 6130631655629471205}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Graphics (1)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &800413527618061279
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3383803907815417999}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.45486292, y: 0.47949305, z: 0.51648575, w: 0.54445267}
|
||||||
|
m_LocalPosition: {x: 0.1214, y: 0.0776, z: -0.0206}
|
||||||
|
m_LocalScale: {x: 0.033143807, y: 0.15052864, z: 0.030040754}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4912141646191296772}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 82.74, z: 86.98}
|
||||||
|
--- !u!33 &5808647788581163567
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3383803907815417999}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &679585356186139854
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3383803907815417999}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &6130631655629471205
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3383803907815417999}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &3424469979721106716
|
--- !u!1 &3424469979721106716
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1320,14 +1545,14 @@ Transform:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4310657189086097289}
|
m_GameObject: {fileID: 4310657189086097289}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0.30070576, y: -0, z: -0, w: 0.953717}
|
m_LocalRotation: {x: 0.1947668, y: 0.05645799, z: -0.01123019, w: 0.979159}
|
||||||
m_LocalPosition: {x: -0.35901004, y: 47.8, z: -70.2}
|
m_LocalPosition: {x: -2.5, y: 11.5, z: -21}
|
||||||
m_LocalScale: {x: 1, y: 0.78067374, z: 1.6579802}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 6872729306491234319}
|
- {fileID: 6872729306491234319}
|
||||||
m_Father: {fileID: 5526037850913171920}
|
m_Father: {fileID: 5526037850913171920}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 22.5, y: 6.6, z: 0}
|
||||||
--- !u!1 &4324082620616441630
|
--- !u!1 &4324082620616441630
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1654,7 +1879,7 @@ MonoBehaviour:
|
|||||||
altUseTimeSec: 0
|
altUseTimeSec: 0
|
||||||
inUse: 0
|
inUse: 0
|
||||||
shootForce: 10
|
shootForce: 10
|
||||||
testBall: {fileID: 7664016258760507437, guid: 0b0365667a94c474bb3cc42312aac1db, type: 3}
|
ball: {fileID: 7664016258760507437, guid: 0b0365667a94c474bb3cc42312aac1db, type: 3}
|
||||||
ballLifeTime: 5
|
ballLifeTime: 5
|
||||||
--- !u!1 &4672178086213347511
|
--- !u!1 &4672178086213347511
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -1922,13 +2147,13 @@ Transform:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 5784121484016646142}
|
m_GameObject: {fileID: 5784121484016646142}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0.000000028422978, z: 0.000000008961729, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 2119885955527004040}
|
m_Father: {fileID: 2119885955527004040}
|
||||||
m_LocalEulerAnglesHint: {x: 35, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!20 &7814557473141052265
|
--- !u!20 &7814557473141052265
|
||||||
Camera:
|
Camera:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1963,7 +2188,7 @@ Camera:
|
|||||||
near clip plane: 0.3
|
near clip plane: 0.3
|
||||||
far clip plane: 1000
|
far clip plane: 1000
|
||||||
field of view: 60
|
field of view: 60
|
||||||
orthographic: 1
|
orthographic: 0
|
||||||
orthographic size: 2.3
|
orthographic size: 2.3
|
||||||
m_Depth: -1
|
m_Depth: -1
|
||||||
m_CullingMask:
|
m_CullingMask:
|
||||||
@@ -2154,6 +2379,59 @@ BoxCollider:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_Size: {x: 1, y: 1, z: 1}
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &6104215866556849460
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4912141646191296772}
|
||||||
|
- component: {fileID: 6038027350876930962}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GrappleGun
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &4912141646191296772
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6104215866556849460}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 3539603623064926047}
|
||||||
|
- {fileID: 4982369430241200918}
|
||||||
|
- {fileID: 800413527618061279}
|
||||||
|
m_Father: {fileID: 6581087177990818461}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &6038027350876930962
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6104215866556849460}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 70102eddcaad3044d9ac0ec62519caad, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::GrappleGun
|
||||||
|
useTimeSec: 0.2
|
||||||
|
altUseTimeSec: 0
|
||||||
|
inUse: 0
|
||||||
|
range: 5
|
||||||
|
hookStickTime: 0.2
|
||||||
|
hook: {fileID: 2224365324496764932}
|
||||||
--- !u!1 &6169192211327620812
|
--- !u!1 &6169192211327620812
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2293,7 +2571,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 6233083279635182816}
|
m_GameObject: {fileID: 6233083279635182816}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: -0.49347007, z: 0}
|
m_LocalPosition: {x: 0, y: -0.78, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 3, z: 1}
|
m_LocalScale: {x: 1, y: 3, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
@@ -2469,6 +2747,118 @@ BoxCollider:
|
|||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_Size: {x: 1, y: 1, z: 1}
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &6874027526435261889
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4982369430241200918}
|
||||||
|
- component: {fileID: 2974524997077103125}
|
||||||
|
- component: {fileID: 4683339968417362321}
|
||||||
|
- component: {fileID: 6854971480795012501}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Graphics
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4982369430241200918
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6874027526435261889}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.45486292, y: 0.47949305, z: 0.51648575, w: 0.54445267}
|
||||||
|
m_LocalPosition: {x: 0.127, y: 0.041000016, z: -0.06199996}
|
||||||
|
m_LocalScale: {x: 0.063083, y: 0.06308299, z: 0.030040754}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4912141646191296772}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 82.74, z: 86.98}
|
||||||
|
--- !u!33 &2974524997077103125
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6874027526435261889}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &4683339968417362321
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6874027526435261889}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_ForceMeshLod: -1
|
||||||
|
m_MeshLodSelectionBias: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_GlobalIlluminationMeshLod: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &6854971480795012501
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6874027526435261889}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &6923950202799821203
|
--- !u!1 &6923950202799821203
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2748,11 +3138,11 @@ MonoBehaviour:
|
|||||||
- {fileID: 2884873557578242522}
|
- {fileID: 2884873557578242522}
|
||||||
- {fileID: 6033266832729015012}
|
- {fileID: 6033266832729015012}
|
||||||
- {fileID: 5907675754202653673}
|
- {fileID: 5907675754202653673}
|
||||||
|
- {fileID: 6038027350876930962}
|
||||||
walkSpeed: 2
|
walkSpeed: 2
|
||||||
sprintMultiplier: 1.5
|
sprintMultiplier: 1.5
|
||||||
gravity: 1
|
gravity: 1
|
||||||
jumpForce: 8.01
|
cameraController: {fileID: 5478143440182735446}
|
||||||
jumpTime: 0.5
|
|
||||||
--- !u!114 &5478143440182735446
|
--- !u!114 &5478143440182735446
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2765,6 +3155,26 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 34a2af7866b6ecc4ab5f2b6222f7dbe2, type: 3}
|
m_Script: {fileID: 11500000, guid: 34a2af7866b6ecc4ab5f2b6222f7dbe2, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::CameraController
|
m_EditorClassIdentifier: Assembly-CSharp::CameraController
|
||||||
|
MainCamera: {fileID: 7814557473141052265}
|
||||||
|
mouseSensitivity: 1000
|
||||||
|
minPitch: 10
|
||||||
|
maxPitch: 60
|
||||||
|
distance: 4
|
||||||
|
followSpeed: 1000
|
||||||
|
maxDistance: 6
|
||||||
|
minDistance: 1
|
||||||
|
zoomSpeed: 5
|
||||||
|
heightOffset: -0.75
|
||||||
|
collisionRadius: 0.3
|
||||||
|
collisionOffset: 0.2
|
||||||
|
collisionMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 8
|
||||||
|
obstructionMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
fadedAlpha: 0.25
|
||||||
|
fadeSpeed: 5
|
||||||
playerCamHome: {fileID: 2119885955527004040}
|
playerCamHome: {fileID: 2119885955527004040}
|
||||||
--- !u!114 &5412473048133157928
|
--- !u!114 &5412473048133157928
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|||||||
@@ -438,6 +438,7 @@ GameObject:
|
|||||||
- component: {fileID: 7681847596368765025}
|
- component: {fileID: 7681847596368765025}
|
||||||
- component: {fileID: 4444498079052879519}
|
- component: {fileID: 4444498079052879519}
|
||||||
- component: {fileID: 5173819118098093347}
|
- component: {fileID: 5173819118098093347}
|
||||||
|
- component: {fileID: 1410439939888368689}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: GameManager
|
m_Name: GameManager
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -560,3 +561,16 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::PlayerManager
|
m_EditorClassIdentifier: Assembly-CSharp::PlayerManager
|
||||||
CurrentToolIndex: 0
|
CurrentToolIndex: 0
|
||||||
|
--- !u!114 &1410439939888368689
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8685480739473632986}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ab14394efecbd6540af369ced75e81d0, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::SoundSettingManager
|
||||||
|
audioMixer: {fileID: 24100000, guid: 3490106d3e6edc143b9179d3107780dd, type: 2}
|
||||||
|
|||||||
@@ -0,0 +1,137 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Island_Temp_Shader
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Opaque
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlpha: 0
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 0
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _XRMotionVectorsPass: 1
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.6226415, g: 0.56533194, b: 0.502225, a: 1}
|
||||||
|
- _Color: {r: 0.62264144, g: 0.5653319, b: 0.5022249, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &4647237875860341337
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||||
|
version: 10
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b74fa76d3c3551d478f93b2a251df8f8
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,110 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5d4389ebffbf7bd458488fd3ea3fc492
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 24200
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
materials:
|
||||||
|
materialImportMode: 2
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
materialLocation: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
resampleCurves: 1
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
removeConstantScaleCurves: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationImportErrors:
|
||||||
|
animationImportWarnings:
|
||||||
|
animationRetargetingWarnings:
|
||||||
|
animationDoRetargetingWarnings: 0
|
||||||
|
importAnimatedCustomProperties: 0
|
||||||
|
importConstraints: 0
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: 0.5
|
||||||
|
animationPositionError: 0.5
|
||||||
|
animationScaleError: 0.5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
extraUserProperties: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 0
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
useSRGBMaterialColor: 1
|
||||||
|
sortHierarchyByName: 1
|
||||||
|
importPhysicalCameras: 1
|
||||||
|
importVisibility: 1
|
||||||
|
importBlendShapes: 1
|
||||||
|
importCameras: 1
|
||||||
|
importLights: 1
|
||||||
|
nodeNameCollisionStrategy: 1
|
||||||
|
fileIdsGeneration: 2
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
keepQuads: 0
|
||||||
|
weldVertices: 1
|
||||||
|
bakeAxisConversion: 0
|
||||||
|
preserveHierarchy: 0
|
||||||
|
skinWeightsMode: 0
|
||||||
|
maxBonesPerVertex: 4
|
||||||
|
minBoneWeight: 0.001
|
||||||
|
optimizeBones: 1
|
||||||
|
generateMeshLods: 0
|
||||||
|
meshLodGenerationFlags: 0
|
||||||
|
maximumMeshLod: -1
|
||||||
|
meshOptimizationFlags: -1
|
||||||
|
indexFormat: 0
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVMarginMethod: 1
|
||||||
|
secondaryUVMinLightmapResolution: 40
|
||||||
|
secondaryUVMinObjectScale: 1
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
useFileScale: 1
|
||||||
|
strictVertexDataChecks: 0
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 3
|
||||||
|
normalCalculationMode: 4
|
||||||
|
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||||
|
blendShapeNormalImportMode: 1
|
||||||
|
normalSmoothingSource: 0
|
||||||
|
referencedClips: []
|
||||||
|
importAnimation: 1
|
||||||
|
humanDescription:
|
||||||
|
serializedVersion: 3
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: 0.5
|
||||||
|
foreArmTwist: 0.5
|
||||||
|
upperLegTwist: 0.5
|
||||||
|
legTwist: 0.5
|
||||||
|
armStretch: 0.05
|
||||||
|
legStretch: 0.05
|
||||||
|
feetSpacing: 0
|
||||||
|
globalScale: 1
|
||||||
|
rootMotionBoneName:
|
||||||
|
hasTranslationDoF: 0
|
||||||
|
hasExtraRoot: 0
|
||||||
|
skeletonHasParents: 1
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
autoGenerateAvatarMappingIfUnspecified: 1
|
||||||
|
animationType: 2
|
||||||
|
humanoidOversampling: 1
|
||||||
|
avatarSetup: 0
|
||||||
|
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||||
|
importBlendShapeDeformPercent: 1
|
||||||
|
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eaa54bb6b383cee45b061dbca1a69945
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: ParticlesUnlit Variant
|
||||||
|
m_Shader: {fileID: 4800000, guid: 0406db5a14f94604a8c57ccfbc9f3b46, type: 3}
|
||||||
|
m_Parent: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords:
|
||||||
|
- _FLIPBOOKBLENDING_OFF
|
||||||
|
- _RECEIVE_SHADOWS_OFF
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- ALWAYS
|
||||||
|
- SHADOWCASTER
|
||||||
|
- DepthOnly
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs: []
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats: []
|
||||||
|
m_Colors: []
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &3897461806608698219
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||||
|
version: 10
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 64ca3a2884aa8954cb1fb6d2ce25a60c
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!84 &8400000
|
||||||
|
RenderTexture:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: MiniMapRenderTexture
|
||||||
|
m_ImageContentsHash:
|
||||||
|
serializedVersion: 2
|
||||||
|
Hash: 00000000000000000000000000000000
|
||||||
|
m_IsAlphaChannelOptional: 0
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Width: 256
|
||||||
|
m_Height: 256
|
||||||
|
m_AntiAliasing: 1
|
||||||
|
m_MipCount: -1
|
||||||
|
m_DepthStencilFormat: 90
|
||||||
|
m_ColorFormat: 4
|
||||||
|
m_MipMap: 1
|
||||||
|
m_GenerateMips: 1
|
||||||
|
m_SRGB: 1
|
||||||
|
m_UseDynamicScale: 0
|
||||||
|
m_UseDynamicScaleExplicit: 0
|
||||||
|
m_BindMS: 0
|
||||||
|
m_EnableCompatibleFormat: 1
|
||||||
|
m_EnableRandomWrite: 0
|
||||||
|
m_TextureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_FilterMode: 1
|
||||||
|
m_Aniso: 0
|
||||||
|
m_MipBias: 0
|
||||||
|
m_WrapU: 1
|
||||||
|
m_WrapV: 1
|
||||||
|
m_WrapW: 1
|
||||||
|
m_Dimension: 2
|
||||||
|
m_VolumeDepth: 1
|
||||||
|
m_ShadowSamplingMode: 2
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 93d78654fc891634d9bbf8c77c58e435
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 8400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OccludeTest
|
||||||
|
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords:
|
||||||
|
- _ALPHAPREMULTIPLY_ON
|
||||||
|
- _SURFACE_TYPE_TRANSPARENT
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap:
|
||||||
|
RenderType: Transparent
|
||||||
|
disabledShaderPasses:
|
||||||
|
- MOTIONVECTORS
|
||||||
|
- DepthOnly
|
||||||
|
- SHADOWCASTER
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BaseMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _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}
|
||||||
|
- _SpecGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_Lightmaps:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_LightmapsInd:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- unity_ShadowMasks:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _AddPrecomputedVelocity: 0
|
||||||
|
- _AlphaClip: 0
|
||||||
|
- _AlphaToMask: 0
|
||||||
|
- _Blend: 0
|
||||||
|
- _BlendModePreserveSpecular: 1
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ClearCoatMask: 0
|
||||||
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _Cull: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailAlbedoMapScale: 1
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 10
|
||||||
|
- _DstBlendAlpha: 10
|
||||||
|
- _EnvironmentReflections: 1
|
||||||
|
- _GlossMapScale: 0
|
||||||
|
- _Glossiness: 0
|
||||||
|
- _GlossyReflections: 0
|
||||||
|
- _Metallic: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.005
|
||||||
|
- _QueueOffset: 0
|
||||||
|
- _ReceiveShadows: 1
|
||||||
|
- _Smoothness: 0.5
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlpha: 1
|
||||||
|
- _Surface: 1
|
||||||
|
- _WorkflowMode: 1
|
||||||
|
- _XRMotionVectorsPass: 1
|
||||||
|
- _ZWrite: 0
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.509434, g: 0.509434, b: 0.509434, a: 1}
|
||||||
|
- _Color: {r: 0.509434, g: 0.509434, b: 0.509434, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
|
m_AllowLocking: 1
|
||||||
|
--- !u!114 &3531991361068812674
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 11
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||||
|
version: 10
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 78be8f8bd251f244ab82d30f189c8824
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+155
-4159
File diff suppressed because it is too large
Load Diff
+60
-4051
File diff suppressed because it is too large
Load Diff
+2644
-117
File diff suppressed because it is too large
Load Diff
@@ -1,53 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using Unity.VisualScripting;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class CameraController : MonoBehaviour
|
|
||||||
{
|
|
||||||
private float camTargetRotation = 0;
|
|
||||||
private bool isCamRotating = false;
|
|
||||||
|
|
||||||
public Transform playerCamHome;
|
|
||||||
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
HandleCamRotation();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Trigger cam rotation
|
|
||||||
/// </summary>
|
|
||||||
public void RotateCam()
|
|
||||||
{
|
|
||||||
if (!isCamRotating)
|
|
||||||
{
|
|
||||||
float currentY = playerCamHome.transform.rotation.eulerAngles.y;
|
|
||||||
camTargetRotation = currentY + 90f;
|
|
||||||
isCamRotating = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Move cam to desired rotation (every frame)
|
|
||||||
/// </summary>
|
|
||||||
void HandleCamRotation()
|
|
||||||
{
|
|
||||||
float currentY = playerCamHome.transform.rotation.eulerAngles.y;
|
|
||||||
|
|
||||||
float step = 200 * Time.deltaTime;
|
|
||||||
|
|
||||||
float newY = Mathf.MoveTowardsAngle(currentY, camTargetRotation, step);
|
|
||||||
|
|
||||||
playerCamHome.RotateAround(
|
|
||||||
transform.position,
|
|
||||||
Vector3.up,
|
|
||||||
newY - currentY
|
|
||||||
);
|
|
||||||
|
|
||||||
if (Mathf.Abs(Mathf.DeltaAngle(newY, camTargetRotation)) < 0.01f)
|
|
||||||
{
|
|
||||||
isCamRotating = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,352 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Unity.VisualScripting;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UIElements;
|
||||||
|
using static Unity.Cinemachine.CinemachineTargetGroup;
|
||||||
|
using static UnityEngine.GraphicsBuffer;
|
||||||
|
|
||||||
|
public class CameraController : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float camTargetRotation { get; private set; } = 0;
|
||||||
|
public CameraControlMode CamControlMode { get; private set; } = CameraControlMode.SnapRotate;
|
||||||
|
public Camera MainCamera;
|
||||||
|
|
||||||
|
private bool isCamRotating = false;
|
||||||
|
|
||||||
|
[Header("Rotation")]
|
||||||
|
public float mouseSensitivity = 200f;
|
||||||
|
public float minPitch = -30f;
|
||||||
|
public float maxPitch = 60f;
|
||||||
|
public float distance = 5f;
|
||||||
|
private float yaw;
|
||||||
|
private float pitch;
|
||||||
|
|
||||||
|
[Header("Zoom")]
|
||||||
|
public float followSpeed = 10f;
|
||||||
|
public float maxDistance = 6f;
|
||||||
|
public float minDistance = 1f;
|
||||||
|
public float zoomSpeed = 5f;
|
||||||
|
public float heightOffset = -0.5f;
|
||||||
|
private float currentDistance;
|
||||||
|
private float distanceVelocity;
|
||||||
|
|
||||||
|
[Header("Collision")]
|
||||||
|
public float collisionRadius = 0.3f;
|
||||||
|
public float collisionOffset = 0.2f;
|
||||||
|
public LayerMask collisionMask;
|
||||||
|
|
||||||
|
[Header("Occlusion Settings")]
|
||||||
|
public LayerMask obstructionMask;
|
||||||
|
public float fadedAlpha = 0.25f;
|
||||||
|
public float fadeSpeed = 5f;
|
||||||
|
|
||||||
|
private Dictionary<Renderer, float> currentAlpha =
|
||||||
|
new Dictionary<Renderer, float>();
|
||||||
|
|
||||||
|
private Dictionary<Renderer, float> targetAlpha =
|
||||||
|
new Dictionary<Renderer, float>();
|
||||||
|
|
||||||
|
public Transform playerCamHome;
|
||||||
|
Transform dougBody;
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
UpdateOcclusion();
|
||||||
|
UpdateFade();
|
||||||
|
|
||||||
|
if (Input.GetMouseButton(1))
|
||||||
|
{
|
||||||
|
HandleFreeCamRotation();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CamAvoidCollisions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
Vector3 angles = playerCamHome.transform.eulerAngles;
|
||||||
|
|
||||||
|
yaw = angles.y;
|
||||||
|
pitch = angles.x;
|
||||||
|
currentDistance = distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Trigger cam rotation
|
||||||
|
/// </summary>
|
||||||
|
public void RotateCam()
|
||||||
|
{
|
||||||
|
if (!isCamRotating)
|
||||||
|
{
|
||||||
|
float currentY = playerCamHome.transform.rotation.eulerAngles.y;
|
||||||
|
camTargetRotation = currentY + 90f;
|
||||||
|
isCamRotating = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set cam rotation immediately
|
||||||
|
/// </summary>
|
||||||
|
void SnapToRotation(float rotation)
|
||||||
|
{
|
||||||
|
if (CamControlMode == CameraControlMode.SnapRotate)
|
||||||
|
{
|
||||||
|
playerCamHome.RotateAround(
|
||||||
|
transform.position,
|
||||||
|
Vector3.up,
|
||||||
|
rotation
|
||||||
|
);
|
||||||
|
|
||||||
|
camTargetRotation = rotation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Move cam to desired rotation (every frame)
|
||||||
|
/// </summary>
|
||||||
|
void HandleSnapCamRotation()
|
||||||
|
{
|
||||||
|
float currentY = playerCamHome.transform.rotation.eulerAngles.y;
|
||||||
|
float step = 200 * Time.deltaTime;
|
||||||
|
float newY = Mathf.MoveTowardsAngle(currentY, camTargetRotation, step);
|
||||||
|
|
||||||
|
playerCamHome.RotateAround(
|
||||||
|
transform.position,
|
||||||
|
Vector3.up,
|
||||||
|
newY - currentY
|
||||||
|
);
|
||||||
|
|
||||||
|
if (Mathf.Abs(Mathf.DeltaAngle(newY, camTargetRotation)) < 0.01f)
|
||||||
|
{
|
||||||
|
isCamRotating = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Move cam to desired free rotation (every frame)
|
||||||
|
/// </summary>
|
||||||
|
void HandleFreeCamRotation()
|
||||||
|
{
|
||||||
|
if (dougBody == null)
|
||||||
|
{
|
||||||
|
if (GameManager.Instance.PlayerController.DougBody != null)
|
||||||
|
dougBody = GameManager.Instance.PlayerController.DougBody.transform;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 target = new Vector3(dougBody.position.x, dougBody.position.y + heightOffset, dougBody.position.z);
|
||||||
|
|
||||||
|
// Mouse Input
|
||||||
|
float mouseX = Input.GetAxis("Mouse X");
|
||||||
|
float mouseY = Input.GetAxis("Mouse Y");
|
||||||
|
|
||||||
|
yaw += mouseX * mouseSensitivity * Time.deltaTime;
|
||||||
|
pitch -= mouseY * mouseSensitivity * Time.deltaTime;
|
||||||
|
|
||||||
|
pitch = Mathf.Clamp(pitch, minPitch, maxPitch);
|
||||||
|
|
||||||
|
// Rotation
|
||||||
|
Quaternion rotation = Quaternion.Euler(pitch, yaw, 0);
|
||||||
|
|
||||||
|
// Zoom
|
||||||
|
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||||
|
|
||||||
|
if (Mathf.Abs(scroll) > 0.0001f)
|
||||||
|
{
|
||||||
|
distance -= scroll * zoomSpeed;
|
||||||
|
distance = Mathf.Clamp(distance, minDistance, maxDistance);
|
||||||
|
}
|
||||||
|
|
||||||
|
currentDistance = Mathf.SmoothDamp(
|
||||||
|
currentDistance,
|
||||||
|
distance,
|
||||||
|
ref distanceVelocity,
|
||||||
|
0.05f);
|
||||||
|
|
||||||
|
float adjustedDistance = currentDistance;
|
||||||
|
|
||||||
|
Vector3 desiredDirection =
|
||||||
|
rotation * Vector3.back;
|
||||||
|
|
||||||
|
// Camera obstruction handling
|
||||||
|
if (Physics.SphereCast(
|
||||||
|
target,
|
||||||
|
collisionRadius,
|
||||||
|
desiredDirection,
|
||||||
|
out RaycastHit hit,
|
||||||
|
currentDistance,
|
||||||
|
collisionMask,
|
||||||
|
QueryTriggerInteraction.Ignore))
|
||||||
|
{
|
||||||
|
adjustedDistance =
|
||||||
|
Mathf.Max(
|
||||||
|
hit.distance - collisionOffset,
|
||||||
|
minDistance);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Desired Position
|
||||||
|
Vector3 offset = rotation * Vector3.forward * -adjustedDistance;
|
||||||
|
Vector3 desiredPosition = target + offset;
|
||||||
|
|
||||||
|
if (desiredPosition.y < dougBody.position.y)
|
||||||
|
{
|
||||||
|
desiredPosition.y = dougBody.position.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Smooth Follow
|
||||||
|
playerCamHome.transform.position = Vector3.Lerp(
|
||||||
|
playerCamHome.transform.position,
|
||||||
|
desiredPosition,
|
||||||
|
followSpeed * Time.deltaTime
|
||||||
|
);
|
||||||
|
|
||||||
|
// Look at player
|
||||||
|
playerCamHome.transform.LookAt(target + Vector3.up);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CamAvoidCollisions()
|
||||||
|
{
|
||||||
|
if (dougBody == null)
|
||||||
|
{
|
||||||
|
if (GameManager.Instance.PlayerController.DougBody != null)
|
||||||
|
dougBody = GameManager.Instance.PlayerController.DougBody.transform;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 target = new Vector3(dougBody.position.x, dougBody.position.y + heightOffset, dougBody.position.z);
|
||||||
|
Quaternion rotation = Quaternion.Euler(pitch, yaw, 0);
|
||||||
|
Vector3 desiredDirection = rotation * Vector3.back;
|
||||||
|
|
||||||
|
float adjustedDistance = currentDistance;
|
||||||
|
|
||||||
|
if (Physics.SphereCast(
|
||||||
|
target,
|
||||||
|
collisionRadius,
|
||||||
|
desiredDirection,
|
||||||
|
out RaycastHit hit,
|
||||||
|
currentDistance,
|
||||||
|
collisionMask,
|
||||||
|
QueryTriggerInteraction.Ignore))
|
||||||
|
{
|
||||||
|
adjustedDistance =
|
||||||
|
Mathf.Max(
|
||||||
|
hit.distance - collisionOffset,
|
||||||
|
minDistance);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Desired Position
|
||||||
|
Vector3 offset = rotation * Vector3.forward * -adjustedDistance;
|
||||||
|
Vector3 desiredPosition = target + offset;
|
||||||
|
|
||||||
|
if (desiredPosition.y < dougBody.position.y)
|
||||||
|
{
|
||||||
|
desiredPosition.y = dougBody.position.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Smooth Follow
|
||||||
|
playerCamHome.transform.position = Vector3.Lerp(
|
||||||
|
playerCamHome.transform.position,
|
||||||
|
desiredPosition,
|
||||||
|
followSpeed * Time.deltaTime
|
||||||
|
);
|
||||||
|
|
||||||
|
// Look at player
|
||||||
|
playerCamHome.transform.LookAt(target + Vector3.up);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateOcclusion()
|
||||||
|
{
|
||||||
|
if (dougBody == null)
|
||||||
|
{
|
||||||
|
if (GameManager.Instance.PlayerController.DougBody != null)
|
||||||
|
dougBody = GameManager.Instance.PlayerController.DougBody.transform;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset all renderers to visible
|
||||||
|
foreach (Renderer r in new List<Renderer>(targetAlpha.Keys))
|
||||||
|
{
|
||||||
|
targetAlpha[r] = 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 dir =
|
||||||
|
MainCamera.transform.position - dougBody.position;
|
||||||
|
|
||||||
|
float dist = dir.magnitude;
|
||||||
|
|
||||||
|
RaycastHit[] hits = Physics.RaycastAll(
|
||||||
|
dougBody.position,
|
||||||
|
dir.normalized,
|
||||||
|
dist,
|
||||||
|
obstructionMask,
|
||||||
|
QueryTriggerInteraction.Ignore);
|
||||||
|
|
||||||
|
foreach (RaycastHit hit in hits)
|
||||||
|
{
|
||||||
|
Renderer r = hit.collider.GetComponent<Renderer>();
|
||||||
|
|
||||||
|
if (r == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!currentAlpha.ContainsKey(r))
|
||||||
|
{
|
||||||
|
currentAlpha[r] = 1f;
|
||||||
|
targetAlpha[r] = 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
targetAlpha[r] = fadedAlpha;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateFade()
|
||||||
|
{
|
||||||
|
List<Renderer> renderers =
|
||||||
|
new List<Renderer>(currentAlpha.Keys);
|
||||||
|
|
||||||
|
foreach (Renderer r in renderers)
|
||||||
|
{
|
||||||
|
float current = currentAlpha[r];
|
||||||
|
float target = targetAlpha[r];
|
||||||
|
|
||||||
|
current = Mathf.Lerp(
|
||||||
|
current,
|
||||||
|
target,
|
||||||
|
Time.deltaTime * fadeSpeed);
|
||||||
|
|
||||||
|
currentAlpha[r] = current;
|
||||||
|
|
||||||
|
foreach (Material mat in r.materials)
|
||||||
|
{
|
||||||
|
Color c = mat.color;
|
||||||
|
c.a = current;
|
||||||
|
|
||||||
|
if (Mathf.Abs(current - targetAlpha[r]) < 0.05f)
|
||||||
|
{
|
||||||
|
c.a = targetAlpha[r];
|
||||||
|
}
|
||||||
|
|
||||||
|
mat.color = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cleanup once fully restored
|
||||||
|
if (Mathf.Abs(current - 1f) < 0.01f &&
|
||||||
|
Mathf.Abs(target - 1f) < 0.01f)
|
||||||
|
{
|
||||||
|
currentAlpha.Remove(r);
|
||||||
|
targetAlpha.Remove(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CameraControlMode
|
||||||
|
{
|
||||||
|
SnapRotate,
|
||||||
|
FreeRotate
|
||||||
|
}
|
||||||
@@ -14,11 +14,14 @@ public class GameManager : MonoBehaviour
|
|||||||
public PlayerManager PlayerManager { get; private set; }
|
public PlayerManager PlayerManager { get; private set; }
|
||||||
public Inventory Inventory { get; private set; }
|
public Inventory Inventory { get; private set; }
|
||||||
public Storybools Storybools { get; private set; }
|
public Storybools Storybools { get; private set; }
|
||||||
|
public MenuController MenuController { get; private set; }
|
||||||
|
public SoundSettingManager SoundSettingManager { get; private set; }
|
||||||
|
public PlayerController PlayerController { get; private set; }
|
||||||
|
public Image BlackScreen { get; private set; }
|
||||||
|
|
||||||
// Are we currently in a scene transition?
|
// Are we currently in a scene transition?
|
||||||
private bool isTransitioningScenes = false;
|
private bool isTransitioningScenes = false;
|
||||||
private Image blackScreen;
|
|
||||||
private PlayerController playerController;
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -37,9 +40,11 @@ private void Awake()
|
|||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
|
|
||||||
ReloadReferences();
|
ReloadReferences();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
SaveSystem.Load();
|
SaveSystem.Load();
|
||||||
SaveSystem.Save(); // save off any corruption fixes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -47,16 +52,109 @@ private void Awake()
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void ReloadReferences()
|
private void ReloadReferences()
|
||||||
{
|
{
|
||||||
Instance.blackScreen = GameObject.FindWithTag("BlackScreen").GetComponent<Image>();
|
Instance.BlackScreen = GameObject.FindWithTag("BlackScreen").GetComponent<Image>();
|
||||||
Instance.playerController = GameObject.FindWithTag("Player").GetComponent<PlayerController>();
|
Instance.PlayerController = GameObject.FindWithTag("Player").GetComponent<PlayerController>();
|
||||||
Instance.DialogueManager = GetComponent<DialogueManager>();
|
Instance.DialogueManager = GetComponent<DialogueManager>();
|
||||||
Instance.DialogueManager.ReloadReferences();
|
Instance.DialogueManager.ReloadReferences();
|
||||||
|
|
||||||
Instance.Inventory = GetComponent<Inventory>();
|
Instance.Inventory = GetComponent<Inventory>();
|
||||||
Instance.TimeManager = GetComponent<TimeManager>();
|
Instance.TimeManager = GetComponent<TimeManager>();
|
||||||
Instance.PlayerManager = GetComponent<PlayerManager>();
|
Instance.PlayerManager = GetComponent<PlayerManager>();
|
||||||
|
|
||||||
|
Instance.SoundSettingManager = GetComponent<SoundSettingManager>();
|
||||||
|
Instance.SoundSettingManager.ReloadReferences();
|
||||||
|
|
||||||
|
Instance.MenuController = GameObject.FindWithTag("MenuController").GetComponent<MenuController>();
|
||||||
|
Instance.MenuController.HideAllScreens();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Map Load Handling
|
||||||
|
/// <summary>
|
||||||
|
/// Triggers transition to a map point
|
||||||
|
/// </summary>
|
||||||
|
public void GoToMapPoint(MapPoint mapPoint, bool instantBlackScreen = false)
|
||||||
|
{
|
||||||
|
StartCoroutine(GoToMapPointCoroutine(mapPoint, instantBlackScreen));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Executes transition to map point (scene and location)
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator GoToMapPointCoroutine(MapPoint mapPoint, bool instantBlackScreen)
|
||||||
|
{
|
||||||
|
Instance.isTransitioningScenes = true;
|
||||||
|
Instance.PlayerController.SetCharacterControl(false);
|
||||||
|
|
||||||
|
// Fade to black
|
||||||
|
float fadeDuration = 0.2f; // how long to fade to/from black
|
||||||
|
float moveDuration = 0.4f; // how long to auto walk into room from the door
|
||||||
|
float fadeTime = 0;
|
||||||
|
Color blackScreenColor = Color.black;
|
||||||
|
|
||||||
|
// Fade to black when instantBlackScreen is false
|
||||||
|
if (!instantBlackScreen)
|
||||||
|
{
|
||||||
|
while (fadeTime < fadeDuration)
|
||||||
|
{
|
||||||
|
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
fadeTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
fadeTime = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// instantly make screen black before scene transition
|
||||||
|
blackScreenColor.a = 1;
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(mapPoint.Scene);
|
||||||
|
while (!asyncLoad.isDone)
|
||||||
|
{
|
||||||
|
// Optional: Update a loading bar with asyncLoad.progress
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReloadReferences();
|
||||||
|
|
||||||
|
// Make sure screen is black in new scene
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
|
||||||
|
if (Instance.PlayerController != null && GameSceneManager.Instance != null)
|
||||||
|
{
|
||||||
|
Instance.PlayerController.CharacterControllerMove(mapPoint.SpawnPosition - PlayerController.transform.position);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fade back in
|
||||||
|
while (fadeTime < fadeDuration)
|
||||||
|
{
|
||||||
|
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
fadeTime += Time.deltaTime;
|
||||||
|
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
blackScreenColor.a = 0;
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
|
||||||
|
// move character a little more
|
||||||
|
while (fadeTime < moveDuration)
|
||||||
|
{
|
||||||
|
fadeTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
fadeTime = 0;
|
||||||
|
|
||||||
|
Instance.isTransitioningScenes = false;
|
||||||
|
Instance.PlayerController.SetCharacterControl(true);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Scene Door Handling
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggers transition to specified scene at the door with the specified ID
|
/// Triggers transition to specified scene at the door with the specified ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -71,7 +169,7 @@ public void EnterSceneDoor(string scene, int door)
|
|||||||
private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
||||||
{
|
{
|
||||||
Instance.isTransitioningScenes = true;
|
Instance.isTransitioningScenes = true;
|
||||||
Instance.playerController.SetCharacterControl(false);
|
Instance.PlayerController.SetCharacterControl(false);
|
||||||
|
|
||||||
// Fade to black
|
// Fade to black
|
||||||
float fadeDuration = 0.2f; // how long to fade to/from black
|
float fadeDuration = 0.2f; // how long to fade to/from black
|
||||||
@@ -82,7 +180,7 @@ private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
|||||||
while (fadeTime < fadeDuration)
|
while (fadeTime < fadeDuration)
|
||||||
{
|
{
|
||||||
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
||||||
blackScreen.color = blackScreenColor;
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
fadeTime += Time.deltaTime;
|
fadeTime += Time.deltaTime;
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
@@ -99,16 +197,17 @@ private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
|||||||
ReloadReferences();
|
ReloadReferences();
|
||||||
|
|
||||||
// Make sure screen is black in new scene
|
// Make sure screen is black in new scene
|
||||||
blackScreen.color = blackScreenColor;
|
blackScreenColor.a = 1;
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
|
||||||
SceneDoor door = GameSceneManager.Instance.GetDoorWithId(doorId);
|
SceneDoor door = GameSceneManager.Instance.GetDoorWithId(doorId);
|
||||||
|
|
||||||
if (Instance.playerController != null && GameSceneManager.Instance != null)
|
if (Instance.PlayerController != null && GameSceneManager.Instance != null)
|
||||||
{
|
{
|
||||||
if (door != null)
|
if (door != null)
|
||||||
{
|
{
|
||||||
Instance.playerController.CharacterControllerMove(door.gameObject.transform.position - playerController.transform.position);
|
Instance.PlayerController.CharacterControllerMove(door.gameObject.transform.position - PlayerController.transform.position);
|
||||||
Instance.playerController.DougBody.transform.rotation = door.gameObject.transform.rotation;
|
Instance.PlayerController.DougBody.transform.rotation = door.gameObject.transform.rotation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,17 +215,20 @@ private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
|||||||
while (fadeTime < fadeDuration)
|
while (fadeTime < fadeDuration)
|
||||||
{
|
{
|
||||||
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
||||||
Instance.blackScreen.color = blackScreenColor;
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
fadeTime += Time.deltaTime;
|
fadeTime += Time.deltaTime;
|
||||||
|
|
||||||
Instance.playerController.WalkInDirection((door.WalkDirection.position - playerController.transform.position).normalized);
|
Instance.PlayerController.WalkInDirection((door.WalkDirection.position - PlayerController.transform.position).normalized);
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blackScreenColor.a = 0;
|
||||||
|
Instance.BlackScreen.color = blackScreenColor;
|
||||||
|
|
||||||
// move character a little more
|
// move character a little more
|
||||||
while (fadeTime < moveDuration)
|
while (fadeTime < moveDuration)
|
||||||
{
|
{
|
||||||
Instance.playerController.WalkInDirection((door.WalkDirection.position - playerController.transform.position).normalized);
|
Instance.PlayerController.WalkInDirection((door.WalkDirection.position - PlayerController.transform.position).normalized);
|
||||||
fadeTime += Time.deltaTime;
|
fadeTime += Time.deltaTime;
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
@@ -134,8 +236,9 @@ private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
|
|||||||
fadeTime = 0;
|
fadeTime = 0;
|
||||||
|
|
||||||
Instance.isTransitioningScenes = false;
|
Instance.isTransitioningScenes = false;
|
||||||
Instance.playerController.SetCharacterControl(true);
|
Instance.PlayerController.SetCharacterControl(true);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Are we currently in the middle of a scene transition?
|
/// Are we currently in the middle of a scene transition?
|
||||||
@@ -145,22 +248,6 @@ public bool InSceneTransition()
|
|||||||
return Instance.isTransitioningScenes;
|
return Instance.isTransitioningScenes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get the blackscreen object reference
|
|
||||||
/// </summary>
|
|
||||||
public Image GetBlackScreen()
|
|
||||||
{
|
|
||||||
return Instance.blackScreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get the playerContoller object reference
|
|
||||||
/// </summary>
|
|
||||||
public PlayerController GetPlayerController()
|
|
||||||
{
|
|
||||||
return Instance.playerController;
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Storybool Save/Load
|
#region Storybool Save/Load
|
||||||
public void SaveStoryBools(ref StoryboolSaveData data)
|
public void SaveStoryBools(ref StoryboolSaveData data)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ MonoImporter:
|
|||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
defaultReferences: []
|
defaultReferences: []
|
||||||
executionOrder: -1
|
executionOrder: -500
|
||||||
icon: {instanceID: 0}
|
icon: {instanceID: 0}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
// Gives a location to be teleported to and displayed on a map. This will be used by
|
||||||
|
// the game manager to allow for fast travel
|
||||||
|
[System.Serializable]
|
||||||
|
public class MapPoint
|
||||||
|
{
|
||||||
|
public string Scene;
|
||||||
|
public Vector3 SpawnPosition;
|
||||||
|
|
||||||
|
public MapPoint(string scene, Vector3 spawnPosition)
|
||||||
|
{
|
||||||
|
this.Scene = scene;
|
||||||
|
this.SpawnPosition = spawnPosition;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5c03ccad2a919f74d95b0d3a409412b9
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using Unity.VisualScripting.Antlr3.Runtime;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEngine.GraphicsBuffer;
|
using static UnityEngine.GraphicsBuffer;
|
||||||
|
|
||||||
@@ -14,11 +15,13 @@ public class PlayerController : MonoBehaviour
|
|||||||
public float gravity = 10;
|
public float gravity = 10;
|
||||||
|
|
||||||
Interactable nearestInteractable;
|
Interactable nearestInteractable;
|
||||||
|
public CameraController cameraController;
|
||||||
private CharacterController characterController;
|
private CharacterController characterController;
|
||||||
private CameraController cameraController;
|
|
||||||
private Vector3 moveDir;
|
private Vector3 moveDir;
|
||||||
private bool hasControl = true; // set this to false if we want to stop reading player inputs
|
private bool hasControl = true; // set this to false if we want to stop reading player inputs
|
||||||
|
private bool canUseTools = true; // set this to false if we want to stop reading player tool use
|
||||||
private bool isSprinting = false;
|
private bool isSprinting = false;
|
||||||
|
private bool paused = false;
|
||||||
|
|
||||||
// Mathematical plane used to catch the raycast from camera to get direction for
|
// Mathematical plane used to catch the raycast from camera to get direction for
|
||||||
// looking at the mouse
|
// looking at the mouse
|
||||||
@@ -39,6 +42,28 @@ void Update()
|
|||||||
moveDir = Vector3.zero;
|
moveDir = Vector3.zero;
|
||||||
groundPlane.distance = -DougBody.transform.position.y;
|
groundPlane.distance = -DougBody.transform.position.y;
|
||||||
|
|
||||||
|
// TODO: Move input detection somewhere else
|
||||||
|
if (Input.GetKeyDown(KeyCode.Escape))
|
||||||
|
{
|
||||||
|
if (!paused)
|
||||||
|
{
|
||||||
|
Cursor.lockState = CursorLockMode.None;
|
||||||
|
Time.timeScale = 0;
|
||||||
|
canUseTools = false;
|
||||||
|
hasControl = false;
|
||||||
|
GameManager.Instance.MenuController.ShowScreen("Pause");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Time.timeScale = 1;
|
||||||
|
canUseTools = true;
|
||||||
|
hasControl = true;
|
||||||
|
GameManager.Instance.MenuController.HideAllScreens();
|
||||||
|
}
|
||||||
|
|
||||||
|
paused = !paused;
|
||||||
|
}
|
||||||
|
|
||||||
if (hasControl)
|
if (hasControl)
|
||||||
{
|
{
|
||||||
if (!tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse)
|
if (!tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse)
|
||||||
@@ -47,23 +72,15 @@ void Update()
|
|||||||
TryInteract();
|
TryInteract();
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolUseDetector();
|
CheckWeaponChange();
|
||||||
ApplyWalk();
|
ApplyWalk();
|
||||||
|
|
||||||
// TODO: This is just for testing, remove or clean up if used
|
|
||||||
if (Input.GetKeyDown(KeyCode.Q))
|
|
||||||
{
|
|
||||||
cameraController.RotateCam();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Add actual save feature later, this is just for test
|
|
||||||
if (Input.GetKeyDown(KeyCode.I))
|
|
||||||
{
|
|
||||||
SaveSystem.Save();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckWeaponChange();
|
if (canUseTools)
|
||||||
|
{
|
||||||
|
ToolUseDetector();
|
||||||
|
}
|
||||||
|
|
||||||
CheckSprint();
|
CheckSprint();
|
||||||
ApplyGravity();
|
ApplyGravity();
|
||||||
DoMovement();
|
DoMovement();
|
||||||
@@ -89,13 +106,16 @@ private void CheckSprint()
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void CheckWeaponChange()
|
private void CheckWeaponChange()
|
||||||
{
|
{
|
||||||
if (Input.mouseScrollDelta.y > 0)
|
if (!Input.GetMouseButton(1))
|
||||||
{
|
{
|
||||||
SwitchTools(true);
|
if (Input.mouseScrollDelta.y > 0)
|
||||||
}
|
{
|
||||||
else if (Input.mouseScrollDelta.y < 0)
|
SwitchTools(true);
|
||||||
{
|
}
|
||||||
SwitchTools(false);
|
else if (Input.mouseScrollDelta.y < 0)
|
||||||
|
{
|
||||||
|
SwitchTools(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,6 +277,14 @@ public void SetCharacterControl(bool hasControl)
|
|||||||
this.hasControl = hasControl;
|
this.hasControl = hasControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the character's "canUseTools" bool. Tool use input is ignored when false
|
||||||
|
/// </summary>
|
||||||
|
public void SetCharacterCanUseTools(bool canUseTools)
|
||||||
|
{
|
||||||
|
this.canUseTools = canUseTools;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the character's "hasControl" bool. All input is ignored when false
|
/// Gets the character's "hasControl" bool. All input is ignored when false
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
// Handles scene-persistent player data
|
// Handles scene-persistent player data
|
||||||
public class PlayerManager : MonoBehaviour
|
public class PlayerManager : MonoBehaviour
|
||||||
@@ -9,11 +10,21 @@ public class PlayerManager : MonoBehaviour
|
|||||||
public void SavePlayerData(ref PlayerSaveData data)
|
public void SavePlayerData(ref PlayerSaveData data)
|
||||||
{
|
{
|
||||||
data.activeToolIndex = GameManager.Instance.PlayerManager.CurrentToolIndex;
|
data.activeToolIndex = GameManager.Instance.PlayerManager.CurrentToolIndex;
|
||||||
|
data.dougPosition = GameManager.Instance.PlayerController.transform.position;
|
||||||
|
data.currentScene = SceneManager.GetActiveScene().name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadPlayerData(PlayerSaveData data)
|
public void LoadPlayerData(PlayerSaveData data)
|
||||||
{
|
{
|
||||||
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
|
if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
|
||||||
|
{
|
||||||
|
GameManager.Instance.GoToMapPoint(new MapPoint(data.currentScene, data.dougPosition), true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
|
||||||
|
GameManager.Instance.PlayerController.transform.position = data.dougPosition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -22,4 +33,6 @@ public void LoadPlayerData(PlayerSaveData data)
|
|||||||
public struct PlayerSaveData
|
public struct PlayerSaveData
|
||||||
{
|
{
|
||||||
public int activeToolIndex;
|
public int activeToolIndex;
|
||||||
|
public Vector3 dougPosition;
|
||||||
|
public string currentScene;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,12 +60,12 @@ private void Awake()
|
|||||||
QuestBool[] QID2_List = new QuestBool[1];
|
QuestBool[] QID2_List = new QuestBool[1];
|
||||||
|
|
||||||
// QID2_1_completedQuest3
|
// QID2_1_completedQuest3
|
||||||
QID1_List[0] = new QuestBool(() =>
|
QID2_List[0] = new QuestBool(() =>
|
||||||
{
|
{
|
||||||
return CompletedQuests.Contains(3);
|
return CompletedQuests.Contains(3);
|
||||||
});
|
});
|
||||||
|
|
||||||
questBoolMap.Add(2, QID1_List);
|
questBoolMap.Add(2, QID2_List);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 3 - (Story Quest #1.5) First Paycheck
|
#region 3 - (Story Quest #1.5) First Paycheck
|
||||||
@@ -75,17 +75,18 @@ private void Awake()
|
|||||||
QuestBool[] QID3_List = new QuestBool[1];
|
QuestBool[] QID3_List = new QuestBool[1];
|
||||||
|
|
||||||
// QID3_1_hasEnoughStarshards
|
// QID3_1_hasEnoughStarshards
|
||||||
QID1_List[0] = new QuestBool(() =>
|
QID3_List[0] = new QuestBool(() =>
|
||||||
{
|
{
|
||||||
return GameManager.Instance.Inventory.GetItemQuantity(ItemIdEnum.STAR_SHARD) > 0;
|
return GameManager.Instance.Inventory.GetItemQuantity(ItemIdEnum.STAR_SHARD) > 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
questBoolMap.Add(3, QID1_List);
|
questBoolMap.Add(3, QID3_List);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
return questBoolMap;
|
return questBoolMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Save/Load Quest Data
|
||||||
// Save completed quests to disk
|
// Save completed quests to disk
|
||||||
public void SaveQuestData(ref QuestSaveData data)
|
public void SaveQuestData(ref QuestSaveData data)
|
||||||
{
|
{
|
||||||
@@ -113,6 +114,7 @@ public void LoadQuestData(QuestSaveData data)
|
|||||||
Instance.CompletedQuests = new List<int>();
|
Instance.CompletedQuests = new List<int>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
public class QuestBool
|
public class QuestBool
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ MonoImporter:
|
|||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
defaultReferences: []
|
defaultReferences: []
|
||||||
executionOrder: -2
|
executionOrder: -501
|
||||||
icon: {instanceID: 0}
|
icon: {instanceID: 0}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public struct SaveData
|
|||||||
public InventorySaveData InventorySaveData;
|
public InventorySaveData InventorySaveData;
|
||||||
public TimeSaveData TimeSaveData;
|
public TimeSaveData TimeSaveData;
|
||||||
public PlayerSaveData PlayerSaveData;
|
public PlayerSaveData PlayerSaveData;
|
||||||
|
public SoundSettingSaveData SoundSettingSaveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string SaveFileName()
|
public static string SaveFileName()
|
||||||
@@ -41,6 +42,19 @@ public static void Save()
|
|||||||
File.WriteAllText(SaveFileName(), JsonUtility.ToJson(_saveData, true));
|
File.WriteAllText(SaveFileName(), JsonUtility.ToJson(_saveData, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ClearSave()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.Delete(SaveFileName());
|
||||||
|
Debug.Log("File deleted successfully. Stop and restart player.");
|
||||||
|
}
|
||||||
|
catch (FileNotFoundException)
|
||||||
|
{
|
||||||
|
// file doesn't exist, don't need to do anything
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void HandleSaveData()
|
private static void HandleSaveData()
|
||||||
{
|
{
|
||||||
GameManager.Instance.SaveStoryBools(ref _saveData.StoryboolData);
|
GameManager.Instance.SaveStoryBools(ref _saveData.StoryboolData);
|
||||||
@@ -48,6 +62,7 @@ private static void HandleSaveData()
|
|||||||
GameManager.Instance.TimeManager.SaveTime(ref _saveData.TimeSaveData);
|
GameManager.Instance.TimeManager.SaveTime(ref _saveData.TimeSaveData);
|
||||||
GameManager.Instance.PlayerManager.SavePlayerData(ref _saveData.PlayerSaveData);
|
GameManager.Instance.PlayerManager.SavePlayerData(ref _saveData.PlayerSaveData);
|
||||||
QuestRegistry.Instance.SaveQuestData(ref _saveData.QuestData);
|
QuestRegistry.Instance.SaveQuestData(ref _saveData.QuestData);
|
||||||
|
GameManager.Instance.SoundSettingManager.SaveSoundSettingsData(ref _saveData.SoundSettingSaveData);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Load()
|
public static void Load()
|
||||||
@@ -88,5 +103,6 @@ public static void HandleLoadData()
|
|||||||
GameManager.Instance.TimeManager.LoadTime(_saveData.TimeSaveData);
|
GameManager.Instance.TimeManager.LoadTime(_saveData.TimeSaveData);
|
||||||
GameManager.Instance.PlayerManager.LoadPlayerData(_saveData.PlayerSaveData);
|
GameManager.Instance.PlayerManager.LoadPlayerData(_saveData.PlayerSaveData);
|
||||||
QuestRegistry.Instance.LoadQuestData(_saveData.QuestData);
|
QuestRegistry.Instance.LoadQuestData(_saveData.QuestData);
|
||||||
|
GameManager.Instance.SoundSettingManager.LoadSoundSettingsData(_saveData.SoundSettingSaveData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Audio;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class SoundSettingManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public AudioMixer audioMixer;
|
||||||
|
|
||||||
|
float masterVolume;
|
||||||
|
float musicVolume;
|
||||||
|
float sfxVolume;
|
||||||
|
|
||||||
|
Slider MasterSlider;
|
||||||
|
Slider SfxSlider;
|
||||||
|
Slider MusicSlider;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
MasterSlider.value = masterVolume;
|
||||||
|
SfxSlider.value = sfxVolume;
|
||||||
|
MusicSlider.value = musicVolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReloadReferences()
|
||||||
|
{
|
||||||
|
MasterSlider = GameObject.FindWithTag("MasterSlider").GetComponent<Slider>();
|
||||||
|
SfxSlider = GameObject.FindWithTag("SfxSlider").GetComponent<Slider>();
|
||||||
|
MusicSlider = GameObject.FindWithTag("MusicSlider").GetComponent<Slider>();
|
||||||
|
|
||||||
|
MasterSlider.onValueChanged.AddListener(OnMasterValueChanged);
|
||||||
|
SfxSlider.onValueChanged.AddListener(OnSfxValueChanged);
|
||||||
|
MusicSlider.onValueChanged.AddListener(OnMusicValueChanged);
|
||||||
|
|
||||||
|
MasterSlider.value = masterVolume;
|
||||||
|
SfxSlider.value = sfxVolume;
|
||||||
|
MusicSlider.value = musicVolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnMasterValueChanged(float newValue)
|
||||||
|
{
|
||||||
|
masterVolume = newValue;
|
||||||
|
SetVolumeFloat(newValue, "MasterVolume");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnSfxValueChanged(float newValue)
|
||||||
|
{
|
||||||
|
sfxVolume = newValue;
|
||||||
|
SetVolumeFloat(newValue, "SFXVolume");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnMusicValueChanged(float newValue)
|
||||||
|
{
|
||||||
|
musicVolume = newValue;
|
||||||
|
SetVolumeFloat(newValue, "MusicVolume");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetVolumeFloat(float sliderVal, string mixerGroup)
|
||||||
|
{
|
||||||
|
// Convert linear 0-1 to dB (-80 to 0 range)
|
||||||
|
float dbValue = Mathf.Log10(sliderVal) * 20;
|
||||||
|
if (sliderVal == 0)
|
||||||
|
{
|
||||||
|
dbValue = -80;
|
||||||
|
}
|
||||||
|
|
||||||
|
audioMixer.SetFloat(mixerGroup, dbValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Sound Settings Data Save/Load
|
||||||
|
public void SaveSoundSettingsData(ref SoundSettingSaveData data)
|
||||||
|
{
|
||||||
|
data.musicVolume = musicVolume;
|
||||||
|
data.sfxVolume = sfxVolume;
|
||||||
|
data.masterVolume = masterVolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadSoundSettingsData(SoundSettingSaveData data)
|
||||||
|
{
|
||||||
|
musicVolume = data.musicVolume;
|
||||||
|
sfxVolume = data.sfxVolume;
|
||||||
|
masterVolume = data.masterVolume;
|
||||||
|
|
||||||
|
MasterSlider.value = masterVolume;
|
||||||
|
SfxSlider.value = sfxVolume;
|
||||||
|
MusicSlider.value = musicVolume;
|
||||||
|
|
||||||
|
SetVolumeFloat(masterVolume, "MasterVolume");
|
||||||
|
SetVolumeFloat(musicVolume, "MusicVolume");
|
||||||
|
SetVolumeFloat(sfxVolume, "SFXVolume");
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Serializable]
|
||||||
|
public struct SoundSettingSaveData
|
||||||
|
{
|
||||||
|
public float musicVolume;
|
||||||
|
public float sfxVolume;
|
||||||
|
public float masterVolume;
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ab14394efecbd6540af369ced75e81d0
|
||||||
@@ -41,7 +41,7 @@ IEnumerator EnterRoomCoroutine(RoomDoor door)
|
|||||||
while (fadeTime < fadeDuration)
|
while (fadeTime < fadeDuration)
|
||||||
{
|
{
|
||||||
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
||||||
GameManager.Instance.GetBlackScreen().color = blackScreenColor;
|
GameManager.Instance.BlackScreen.color = blackScreenColor;
|
||||||
fadeTime += Time.deltaTime;
|
fadeTime += Time.deltaTime;
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ IEnumerator EnterRoomCoroutine(RoomDoor door)
|
|||||||
while (fadeTime < fadeDuration)
|
while (fadeTime < fadeDuration)
|
||||||
{
|
{
|
||||||
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
||||||
GameManager.Instance.GetBlackScreen().color = blackScreenColor;
|
GameManager.Instance.BlackScreen.color = blackScreenColor;
|
||||||
playerController.WalkInDirection((door.linkedDoor.WalkDirection.position - playerController.transform.position).normalized);
|
playerController.WalkInDirection((door.linkedDoor.WalkDirection.position - playerController.transform.position).normalized);
|
||||||
|
|
||||||
fadeTime += Time.deltaTime;
|
fadeTime += Time.deltaTime;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public override void Use()
|
|||||||
newBall.transform.position = transform.position;
|
newBall.transform.position = transform.position;
|
||||||
|
|
||||||
Vector3 direction = transform.forward * shootForce;
|
Vector3 direction = transform.forward * shootForce;
|
||||||
direction += GameManager.Instance.GetPlayerController().GetVelocity();
|
direction += GameManager.Instance.PlayerController.GetVelocity();
|
||||||
|
|
||||||
newBall.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);
|
newBall.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,128 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class GrappleGun : Tool
|
||||||
|
{
|
||||||
|
[Header("Grapple Gun Parameters")]
|
||||||
|
public float range;
|
||||||
|
public float hookStickTime;
|
||||||
|
public GameObject hook;
|
||||||
|
|
||||||
|
bool isMoving = false;
|
||||||
|
bool stuckInTarget = false;
|
||||||
|
private Vector3 hookBaseLocation;
|
||||||
|
private Transform hookParent;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
hookBaseLocation = hook.transform.localPosition;
|
||||||
|
hookParent = hook.transform.parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator GoToTarget(Vector3 target)
|
||||||
|
{
|
||||||
|
GameManager.Instance.PlayerController.SetCharacterControl(false);
|
||||||
|
isMoving = true;
|
||||||
|
Vector3 startPosition = hook.transform.position;
|
||||||
|
float elapsedTime = 0f;
|
||||||
|
|
||||||
|
while (elapsedTime < hookStickTime)
|
||||||
|
{
|
||||||
|
float t = elapsedTime / hookStickTime;
|
||||||
|
hook.transform.position = Vector3.Lerp(startPosition, target, t);
|
||||||
|
elapsedTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure final position is exact
|
||||||
|
hook.transform.position = target;
|
||||||
|
hook.transform.parent = null;
|
||||||
|
isMoving = false;
|
||||||
|
stuckInTarget = true;
|
||||||
|
|
||||||
|
StartCoroutine(MovePlayerToTarget(target));
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator MovePlayerToTarget(Vector3 target)
|
||||||
|
{
|
||||||
|
Transform player = GameManager.Instance.PlayerController.transform;
|
||||||
|
Vector3 startPosition = player.position;
|
||||||
|
float elapsedTime = 0f;
|
||||||
|
|
||||||
|
while (elapsedTime < hookStickTime)
|
||||||
|
{
|
||||||
|
float t = elapsedTime / hookStickTime;
|
||||||
|
player.position = Vector3.Lerp(startPosition, target, t);
|
||||||
|
elapsedTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure final position is exact
|
||||||
|
player.position = target;
|
||||||
|
stuckInTarget = false;
|
||||||
|
|
||||||
|
hook.transform.parent = hookParent;
|
||||||
|
hook.transform.localPosition = hookBaseLocation;
|
||||||
|
isMoving = false;
|
||||||
|
stuckInTarget = false;
|
||||||
|
|
||||||
|
GameManager.Instance.PlayerController.SetCharacterControl(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator ShootAndMiss()
|
||||||
|
{
|
||||||
|
GameManager.Instance.PlayerController.SetCharacterControl(false);
|
||||||
|
|
||||||
|
isMoving = true;
|
||||||
|
|
||||||
|
// move to edge of range and don't stick anywhere
|
||||||
|
Vector3 startPosition = hook.transform.position;
|
||||||
|
Vector3 target = transform.position + (transform.forward * range);
|
||||||
|
float elapsedTime = 0f;
|
||||||
|
|
||||||
|
while (elapsedTime < hookStickTime)
|
||||||
|
{
|
||||||
|
float t = elapsedTime / hookStickTime;
|
||||||
|
hook.transform.position = Vector3.Lerp(startPosition, target, t);
|
||||||
|
elapsedTime += Time.deltaTime;
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
hook.transform.localPosition = hookBaseLocation;
|
||||||
|
isMoving = false;
|
||||||
|
stuckInTarget = false;
|
||||||
|
|
||||||
|
GameManager.Instance.PlayerController.SetCharacterControl(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Use()
|
||||||
|
{
|
||||||
|
if (stuckInTarget || isMoving)
|
||||||
|
{
|
||||||
|
StopAllCoroutines();
|
||||||
|
hook.transform.parent = hookParent;
|
||||||
|
hook.transform.localPosition = hookBaseLocation;
|
||||||
|
isMoving = false;
|
||||||
|
stuckInTarget = false;
|
||||||
|
|
||||||
|
GameManager.Instance.PlayerController.SetCharacterControl(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RaycastHit hit;
|
||||||
|
if (Physics.Raycast(transform.position, transform.forward, out hit, range))
|
||||||
|
{
|
||||||
|
StartCoroutine(GoToTarget(hit.point));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StartCoroutine(ShootAndMiss());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UseAlt()
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 70102eddcaad3044d9ac0ec62519caad
|
||||||
@@ -18,7 +18,7 @@ public class ThrowableHand : Tool
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (GameManager.Instance.GetPlayerController() != null)
|
if (GameManager.Instance.PlayerController != null)
|
||||||
{
|
{
|
||||||
SetGroundPlane();
|
SetGroundPlane();
|
||||||
DrawTargetProjection();
|
DrawTargetProjection();
|
||||||
@@ -29,10 +29,10 @@ private void SetGroundPlane()
|
|||||||
{
|
{
|
||||||
if (handGroundPlane == null)
|
if (handGroundPlane == null)
|
||||||
{
|
{
|
||||||
handGroundPlane = new Plane(Vector3.up, -GameManager.Instance.GetPlayerController().DougBody.transform.position.y);
|
handGroundPlane = new Plane(Vector3.up, -GameManager.Instance.PlayerController.DougBody.transform.position.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
handGroundPlane.distance = -GameManager.Instance.GetPlayerController().DougBody.transform.position.y;
|
handGroundPlane.distance = -GameManager.Instance.PlayerController.DougBody.transform.position.y;
|
||||||
handGroundPlane.normal = Vector3.up;
|
handGroundPlane.normal = Vector3.up;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ public override void Use()
|
|||||||
newBomb.transform.position = transform.position;
|
newBomb.transform.position = transform.position;
|
||||||
|
|
||||||
Vector3 direction = transform.forward * throwForce * forceModifier;
|
Vector3 direction = transform.forward * throwForce * forceModifier;
|
||||||
direction += GameManager.Instance.GetPlayerController().GetVelocity();
|
direction += GameManager.Instance.PlayerController.GetVelocity();
|
||||||
direction.y = loft;
|
direction.y = loft;
|
||||||
|
|
||||||
newBomb.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);
|
newBomb.GetComponent<Rigidbody>().AddForce(direction, ForceMode.Impulse);
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 83ac1cbbc254d804499b8f2508119340
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class MenuController : MonoBehaviour
|
||||||
|
{
|
||||||
|
public List<MenuScreen> screens;
|
||||||
|
|
||||||
|
public void ShowScreen(string screenName)
|
||||||
|
{
|
||||||
|
HideAllScreens();
|
||||||
|
|
||||||
|
MenuScreen selScreen = screens.Find(x => x.screenName == screenName);
|
||||||
|
if (selScreen != null)
|
||||||
|
{
|
||||||
|
selScreen.Show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new System.Exception("Screen name was not found in list of screens!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideAllScreens()
|
||||||
|
{
|
||||||
|
foreach (var screen in screens)
|
||||||
|
{
|
||||||
|
screen.Hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2289f767f0db35c459c4aae4d94b05c5
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class MenuScreen : MonoBehaviour
|
||||||
|
{
|
||||||
|
public string screenName;
|
||||||
|
|
||||||
|
public void Show()
|
||||||
|
{
|
||||||
|
gameObject.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Hide()
|
||||||
|
{
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3ba23d5f6c337c34caaac9a4d8aab191
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class MiniMapCam : MonoBehaviour
|
||||||
|
{
|
||||||
|
Transform playerTransform;
|
||||||
|
Transform camHomeTransform;
|
||||||
|
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
if (playerTransform == null)
|
||||||
|
{
|
||||||
|
playerTransform = GameManager.Instance.PlayerController.transform;
|
||||||
|
}
|
||||||
|
if (camHomeTransform == null)
|
||||||
|
{
|
||||||
|
camHomeTransform = GameManager.Instance.PlayerController.cameraController.playerCamHome;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 newPosition = playerTransform.position;
|
||||||
|
newPosition.y = transform.position.y;
|
||||||
|
transform.position = newPosition;
|
||||||
|
|
||||||
|
transform.rotation = Quaternion.Euler(90, camHomeTransform.eulerAngles.y, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 64af30c5f595a904b9beb633d468cbff
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class PauseMenu : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Button SaveButton;
|
||||||
|
public Button DeleteSaveButton;
|
||||||
|
public Button QuitButton;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
SaveButton.onClick.AddListener(SaveSystem.Save);
|
||||||
|
DeleteSaveButton.onClick.AddListener(SaveSystem.ClearSave);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9657fbe2c0c3ae74b8f542c62a1f38a2
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6a123f00b4942dc4091340ce72744309
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -342,6 +342,9 @@ MonoBehaviour:
|
|||||||
skyOcclusionIntensityMultiplier:
|
skyOcclusionIntensityMultiplier:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 1
|
m_Value: 1
|
||||||
|
worldOffset:
|
||||||
|
m_OverrideState: 1
|
||||||
|
m_Value: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &-1216621516061285780
|
--- !u!114 &-1216621516061285780
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 3
|
m_ObjectHideFlags: 3
|
||||||
@@ -376,6 +379,9 @@ MonoBehaviour:
|
|||||||
highQualityFiltering:
|
highQualityFiltering:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 0
|
m_Value: 0
|
||||||
|
filter:
|
||||||
|
m_OverrideState: 1
|
||||||
|
m_Value: 0
|
||||||
downscale:
|
downscale:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 0
|
m_Value: 0
|
||||||
@@ -462,8 +468,6 @@ MonoBehaviour:
|
|||||||
- {fileID: -6288072647309666549}
|
- {fileID: -6288072647309666549}
|
||||||
- {fileID: 7518938298396184218}
|
- {fileID: 7518938298396184218}
|
||||||
- {fileID: -1410297666881709256}
|
- {fileID: -1410297666881709256}
|
||||||
- {fileID: -7750755424749557576}
|
|
||||||
- {fileID: -5139089513906902183}
|
|
||||||
--- !u!114 &853819529557874667
|
--- !u!114 &853819529557874667
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 3
|
m_ObjectHideFlags: 3
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -0,0 +1,110 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dd94efce2613467429ba62d5e1847e88
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 24200
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
materials:
|
||||||
|
materialImportMode: 2
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
materialLocation: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
resampleCurves: 1
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
removeConstantScaleCurves: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationImportErrors:
|
||||||
|
animationImportWarnings:
|
||||||
|
animationRetargetingWarnings:
|
||||||
|
animationDoRetargetingWarnings: 0
|
||||||
|
importAnimatedCustomProperties: 0
|
||||||
|
importConstraints: 0
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: 0.5
|
||||||
|
animationPositionError: 0.5
|
||||||
|
animationScaleError: 0.5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
extraUserProperties: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 0
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
useSRGBMaterialColor: 1
|
||||||
|
sortHierarchyByName: 1
|
||||||
|
importPhysicalCameras: 1
|
||||||
|
importVisibility: 1
|
||||||
|
importBlendShapes: 1
|
||||||
|
importCameras: 1
|
||||||
|
importLights: 1
|
||||||
|
nodeNameCollisionStrategy: 1
|
||||||
|
fileIdsGeneration: 2
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
keepQuads: 0
|
||||||
|
weldVertices: 1
|
||||||
|
bakeAxisConversion: 0
|
||||||
|
preserveHierarchy: 0
|
||||||
|
skinWeightsMode: 0
|
||||||
|
maxBonesPerVertex: 4
|
||||||
|
minBoneWeight: 0.001
|
||||||
|
optimizeBones: 1
|
||||||
|
generateMeshLods: 0
|
||||||
|
meshLodGenerationFlags: 0
|
||||||
|
maximumMeshLod: -1
|
||||||
|
meshOptimizationFlags: -1
|
||||||
|
indexFormat: 0
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVMarginMethod: 1
|
||||||
|
secondaryUVMinLightmapResolution: 40
|
||||||
|
secondaryUVMinObjectScale: 1
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
useFileScale: 1
|
||||||
|
strictVertexDataChecks: 0
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 3
|
||||||
|
normalCalculationMode: 4
|
||||||
|
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||||
|
blendShapeNormalImportMode: 1
|
||||||
|
normalSmoothingSource: 0
|
||||||
|
referencedClips: []
|
||||||
|
importAnimation: 1
|
||||||
|
humanDescription:
|
||||||
|
serializedVersion: 3
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: 0.5
|
||||||
|
foreArmTwist: 0.5
|
||||||
|
upperLegTwist: 0.5
|
||||||
|
legTwist: 0.5
|
||||||
|
armStretch: 0.05
|
||||||
|
legStretch: 0.05
|
||||||
|
feetSpacing: 0
|
||||||
|
globalScale: 1
|
||||||
|
rootMotionBoneName:
|
||||||
|
hasTranslationDoF: 0
|
||||||
|
hasExtraRoot: 0
|
||||||
|
skeletonHasParents: 1
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
autoGenerateAvatarMappingIfUnspecified: 1
|
||||||
|
animationType: 2
|
||||||
|
humanoidOversampling: 1
|
||||||
|
avatarSetup: 0
|
||||||
|
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||||
|
importBlendShapeDeformPercent: 1
|
||||||
|
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+9987
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d1ef2b53d3ef0446852da522af66b73
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ai.navigation": "2.0.9",
|
"com.unity.ai.navigation": "2.0.9",
|
||||||
|
"com.unity.cinemachine": "3.1.6",
|
||||||
"com.unity.collab-proxy": "2.10.2",
|
"com.unity.collab-proxy": "2.10.2",
|
||||||
"com.unity.ide.visualstudio": "2.0.25",
|
"com.unity.ide.visualstudio": "2.0.25",
|
||||||
"com.unity.render-pipelines.universal": "17.3.0",
|
"com.unity.render-pipelines.universal": "17.3.0",
|
||||||
|
|||||||
@@ -19,6 +19,16 @@
|
|||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.cinemachine": {
|
||||||
|
"version": "3.1.6",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.splines": "2.0.0",
|
||||||
|
"com.unity.modules.imgui": "1.0.0"
|
||||||
|
},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.collab-proxy": {
|
"com.unity.collab-proxy": {
|
||||||
"version": "2.10.2",
|
"version": "2.10.2",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
@@ -107,6 +117,13 @@
|
|||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.settings-manager": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"depth": 2,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.shadergraph": {
|
"com.unity.shadergraph": {
|
||||||
"version": "17.3.0",
|
"version": "17.3.0",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
@@ -116,6 +133,17 @@
|
|||||||
"com.unity.searcher": "4.9.3"
|
"com.unity.searcher": "4.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"com.unity.splines": {
|
||||||
|
"version": "2.8.2",
|
||||||
|
"depth": 1,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.mathematics": "1.2.1",
|
||||||
|
"com.unity.modules.imgui": "1.0.0",
|
||||||
|
"com.unity.settings-manager": "1.0.3"
|
||||||
|
},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.test-framework": {
|
"com.unity.test-framework": {
|
||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
|
|||||||
@@ -13,11 +13,15 @@ TagManager:
|
|||||||
- DialogItemText
|
- DialogItemText
|
||||||
- ItemPickupText
|
- ItemPickupText
|
||||||
- DialogContainer
|
- DialogContainer
|
||||||
|
- MasterSlider
|
||||||
|
- SfxSlider
|
||||||
|
- MusicSlider
|
||||||
|
- MenuController
|
||||||
layers:
|
layers:
|
||||||
- Default
|
- Default
|
||||||
- TransparentFX
|
- TransparentFX
|
||||||
- Ignore Raycast
|
- Ignore Raycast
|
||||||
-
|
- CameraObstructions
|
||||||
- Water
|
- Water
|
||||||
- UI
|
- UI
|
||||||
-
|
-
|
||||||
|
|||||||
Reference in New Issue
Block a user