save tool between scenes and in save file

This commit is contained in:
2026-03-25 18:46:07 -05:00
parent 40af32939e
commit 1e0ea14ae2
9 changed files with 779 additions and 704 deletions
+562
View File
@@ -0,0 +1,562 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2847588586743557754
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3234985867044947891}
- component: {fileID: 2327288061446170596}
- component: {fileID: 6609718028819421532}
- component: {fileID: 4920865001359101263}
- component: {fileID: 1290228147892549875}
m_Layer: 0
m_Name: DialogVoiceSources
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3234985867044947891
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2847588586743557754}
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: []
m_Father: {fileID: 5519027142145697695}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &2327288061446170596
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2847588586743557754}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!82 &6609718028819421532
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2847588586743557754}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!82 &4920865001359101263
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2847588586743557754}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!82 &1290228147892549875
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2847588586743557754}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &8685480739473632986
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5519027142145697695}
- component: {fileID: 7627266791993751843}
- component: {fileID: 1126747780593280214}
- component: {fileID: 6896780435732746551}
- component: {fileID: 7681847596368765025}
- component: {fileID: 4444498079052879519}
- component: {fileID: 5173819118098093347}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5519027142145697695
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8685480739473632986}
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: 3234985867044947891}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7627266791993751843
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: 65dc1a5d5b17b874087eb45227f838f2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1126747780593280214
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: 9741c059777b7a74681122aa761e2dee, type: 3}
m_Name:
m_EditorClassIdentifier:
nameText: {fileID: 0}
dialogueText: {fileID: 0}
itemText: {fileID: 0}
pickupHint: {fileID: 0}
animator: {fileID: 0}
--- !u!114 &6896780435732746551
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: cf9658f7202522245b3ac80235b98b50, type: 3}
m_Name:
m_EditorClassIdentifier:
CompletedQuests:
ActiveQuests:
--- !u!114 &7681847596368765025
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: 1b892c02d92dd70419f61cf0ae34b9d8, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::TimeManager
currentHour: 12
--- !u!114 &4444498079052879519
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: 40e5d5183cb59cf4d8603dca70c1a9b5, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Inventory
itemSlots:
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
ownedBackpackType: 0
--- !u!114 &5173819118098093347
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: f9c9dde58f68b5e4d9fc0036b990c481, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerManager
CurrentToolIndex: 0
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9f59bbee72927d649b032622c1c0f2f5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+79 -563
View File
@@ -4281,17 +4281,6 @@ Transform:
m_Children: []
m_Father: {fileID: 1055802463}
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!114 &1095744520 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1217545746741926108, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
m_PrefabInstance: {fileID: 5777350187431524276}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 21ea1f4973209f34aa1bfb2f1dda5454, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1114011169
GameObject:
m_ObjectHideFlags: 0
@@ -4811,552 +4800,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a9ab60ad80ee08f4eb031540a5744ab5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1230830888
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1230830891}
- component: {fileID: 1230830890}
- component: {fileID: 1230830889}
- component: {fileID: 1230830892}
- component: {fileID: 1230830894}
- component: {fileID: 1230830893}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1230830889
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1230830888}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9741c059777b7a74681122aa761e2dee, type: 3}
m_Name:
m_EditorClassIdentifier:
nameText: {fileID: 343477994}
dialogueText: {fileID: 2063514703}
itemText: {fileID: 434479293}
pickupHint: {fileID: 1475998730}
animator: {fileID: 1187986794}
--- !u!114 &1230830890
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1230830888}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 65dc1a5d5b17b874087eb45227f838f2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1230830891
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1230830888}
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: 1268265872}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1230830892
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1230830888}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf9658f7202522245b3ac80235b98b50, type: 3}
m_Name:
m_EditorClassIdentifier:
CompletedQuests:
ActiveQuests:
--- !u!114 &1230830893
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1230830888}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 40e5d5183cb59cf4d8603dca70c1a9b5, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Inventory
itemSlots:
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
ownedBackpackType: 0
--- !u!114 &1230830894
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1230830888}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1b892c02d92dd70419f61cf0ae34b9d8, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::TimeManager
currentHour: 12
--- !u!1 &1268265871
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1268265872}
- component: {fileID: 1268265874}
- component: {fileID: 1268265873}
- component: {fileID: 1268265876}
- component: {fileID: 1268265875}
m_Layer: 0
m_Name: DialogVoiceSources
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1268265872
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1268265871}
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: []
m_Father: {fileID: 1230830891}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &1268265873
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1268265871}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!82 &1268265874
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1268265871}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!82 &1268265875
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1268265871}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!82 &1268265876
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1268265871}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!1 &1281708046
GameObject:
m_ObjectHideFlags: 0
@@ -8394,7 +7837,7 @@ Transform:
- {fileID: 208561167}
m_Father: {fileID: 1854015638}
m_LocalEulerAnglesHint: {x: 0, y: -45.476, z: 0}
--- !u!1001 &5777350187431524276
--- !u!1001 &4756260184839797824
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
@@ -8402,10 +7845,83 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1480974628599415149, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
propertyPath: activeTool
- target: {fileID: 1126747780593280214, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: animator
value:
objectReference: {fileID: 1095744520}
objectReference: {fileID: 1187986794}
- target: {fileID: 1126747780593280214, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: itemText
value:
objectReference: {fileID: 434479293}
- target: {fileID: 1126747780593280214, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: nameText
value:
objectReference: {fileID: 343477994}
- target: {fileID: 1126747780593280214, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: pickupHint
value:
objectReference: {fileID: 1475998730}
- target: {fileID: 1126747780593280214, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: dialogueText
value:
objectReference: {fileID: 2063514703}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8685480739473632986, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_Name
value: GameManager
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
--- !u!1001 &7959480261809233915
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5526037850913171920, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
propertyPath: m_LocalPosition.x
value: -0.60945
@@ -8459,13 +7975,13 @@ PrefabInstance:
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 1230830891}
- {fileID: 4756260184839797824}
- {fileID: 410087041}
- {fileID: 1704696510}
- {fileID: 832575519}
- {fileID: 1433016472}
- {fileID: 200551575}
- {fileID: 5777350187431524276}
- {fileID: 7959480261809233915}
- {fileID: 430850203}
- {fileID: 265036979}
- {fileID: 1892268943}
+58 -123
View File
@@ -818,6 +818,63 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 343477992}
m_CullTransparentMesh: 1
--- !u!1001 &363975418
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.x
value: 4.2323
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.z
value: -5.13823
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8685480739473632986, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_Name
value: GameManager
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
--- !u!1 &410087039
GameObject:
m_ObjectHideFlags: 0
@@ -2308,128 +2365,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 902781401}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &954594189
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 954594194}
- component: {fileID: 954594193}
- component: {fileID: 954594192}
- component: {fileID: 954594191}
- component: {fileID: 954594190}
- component: {fileID: 954594195}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &954594190
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 954594189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 40e5d5183cb59cf4d8603dca70c1a9b5, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Inventory
itemSlots:
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
- quantity: 0
item: 0
ownedBackpackType: 0
--- !u!114 &954594191
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 954594189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf9658f7202522245b3ac80235b98b50, type: 3}
m_Name:
m_EditorClassIdentifier:
CompletedQuests:
ActiveQuests:
--- !u!114 &954594192
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 954594189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9741c059777b7a74681122aa761e2dee, type: 3}
m_Name:
m_EditorClassIdentifier:
nameText: {fileID: 0}
dialogueText: {fileID: 0}
itemText: {fileID: 0}
pickupHint: {fileID: 0}
animator: {fileID: 0}
--- !u!114 &954594193
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 954594189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 65dc1a5d5b17b874087eb45227f838f2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &954594194
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 954594189}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 595.15234, y: 0.00001, z: -129.2475}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &954594195
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 954594189}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1b892c02d92dd70419f61cf0ae34b9d8, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::TimeManager
currentHour: 12
--- !u!1 &986462055
GameObject:
m_ObjectHideFlags: 0
@@ -5416,7 +5351,7 @@ CanvasRenderer:
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 954594194}
- {fileID: 363975418}
- {fileID: 410087041}
- {fileID: 1704696510}
- {fileID: 832575519}
+3
View File
@@ -11,6 +11,7 @@ public class GameManager : MonoBehaviour
public static GameManager Instance { get; private set; }
public DialogueManager DialogueManager { get; private set; }
public TimeManager TimeManager { get; private set; }
public PlayerManager PlayerManager { get; private set; }
public Inventory Inventory { get; private set; }
public Storybools Storybools { get; private set; }
@@ -26,6 +27,7 @@ private void Awake()
if (Instance != null && Instance != this)
{
Destroy(this.gameObject);
return;
}
else
{
@@ -52,6 +54,7 @@ private void ReloadReferences()
Instance.Inventory = GetComponent<Inventory>();
Instance.TimeManager = GetComponent<TimeManager>();
Instance.PlayerManager = GetComponent<PlayerManager>();
}
/// <summary>
@@ -0,0 +1,25 @@
using UnityEngine;
// Handles scene-persistent player data
public class PlayerManager : MonoBehaviour
{
public int CurrentToolIndex;
#region Player Data Save/Load
public void SavePlayerData(ref PlayerSaveData data)
{
data.activeToolIndex = GameManager.Instance.PlayerManager.CurrentToolIndex;
}
public void LoadPlayerData(PlayerSaveData data)
{
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
}
#endregion
}
[System.Serializable]
public struct PlayerSaveData
{
public int activeToolIndex;
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f9c9dde58f68b5e4d9fc0036b990c481
+3
View File
@@ -13,6 +13,7 @@ public struct SaveData
public StoryboolSaveData StoryboolData;
public InventorySaveData InventorySaveData;
public TimeSaveData TimeSaveData;
public PlayerSaveData PlayerSaveData;
}
public static string SaveFileName()
@@ -45,6 +46,7 @@ private static void HandleSaveData()
GameManager.Instance.SaveStoryBools(ref _saveData.StoryboolData);
GameManager.Instance.Inventory.SaveInventory(ref _saveData.InventorySaveData);
GameManager.Instance.TimeManager.SaveTime(ref _saveData.TimeSaveData);
GameManager.Instance.PlayerManager.SavePlayerData(ref _saveData.PlayerSaveData);
QuestRegistry.Instance.SaveQuestData(ref _saveData.QuestData);
}
@@ -84,6 +86,7 @@ public static void HandleLoadData()
GameManager.Instance.LoadStoryBools(_saveData.StoryboolData);
GameManager.Instance.Inventory.LoadInventory(_saveData.InventorySaveData);
GameManager.Instance.TimeManager.LoadTime(_saveData.TimeSaveData);
GameManager.Instance.PlayerManager.LoadPlayerData(_saveData.PlayerSaveData);
QuestRegistry.Instance.LoadQuestData(_saveData.QuestData);
}
}
+40 -18
View File
@@ -7,8 +7,6 @@ public class PlayerController : MonoBehaviour
public GameObject DougBody;
public Tool[] tools;
int activeToolIndex;
float toolUseTimestamp = 0;
public float walkSpeed;
@@ -25,9 +23,9 @@ public class PlayerController : MonoBehaviour
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
activeToolIndex = 0;
characterController = GetComponent<CharacterController>();
cameraController = GetComponent<CameraController>();
SwitchTools(GameManager.Instance.PlayerManager.CurrentToolIndex);
}
// Update is called once per frame
@@ -37,7 +35,7 @@ void Update()
if (hasControl)
{
if (!tools[activeToolIndex].inUse)
if (!tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse)
{
RotatePlayerTowardMouse();
TryInteract();
@@ -103,7 +101,7 @@ void ApplyWalk()
float verticalMovement = 0;
float horizontalMovement = 0;
if (!tools[activeToolIndex].inUse)
if (!tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse)
{
verticalMovement = Input.GetAxisRaw("Vertical");
horizontalMovement = Input.GetAxisRaw("Horizontal");
@@ -173,26 +171,26 @@ public void WalkInDirection(Vector3 direction)
/// </summary>
void ToolUseDetector()
{
if (!tools[activeToolIndex].inUse)
if (!tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse)
{
if (Input.GetMouseButtonDown(0))
{
tools[activeToolIndex].Use();
tools[activeToolIndex].inUse = true;
toolUseTimestamp = Time.time + tools[activeToolIndex].useTimeSec; // fuck coroutines fr fr
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].Use();
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse = true;
toolUseTimestamp = Time.time + tools[GameManager.Instance.PlayerManager.CurrentToolIndex].useTimeSec; // fuck coroutines fr fr
}
else if (Input.GetMouseButtonDown(1))
{
tools[activeToolIndex].UseAlt();
tools[activeToolIndex].inUse = true;
toolUseTimestamp = Time.time + tools[activeToolIndex].altUseTimeSec;
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].UseAlt();
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse = true;
toolUseTimestamp = Time.time + tools[GameManager.Instance.PlayerManager.CurrentToolIndex].altUseTimeSec;
}
}
else
{
if (Time.time > toolUseTimestamp)
{
tools[activeToolIndex].inUse = false;
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].inUse = false;
}
}
}
@@ -270,14 +268,37 @@ public bool GetCharacterHasControl()
}
/// <summary>
/// Switches the tools in hand.
/// Switches the tools in hand by taking an index
///
/// <param name="toolIndex">Index of the tool to switch to</param>
/// </summary>
private void SwitchTools(int toolIndex)
{
if (toolIndex < 0 || toolIndex >= tools.Length)
{
toolIndex = 0;
}
// disable all tools
foreach (Tool tool in tools)
{
tool.gameObject.SetActive(false);
}
// load new tool
GameManager.Instance.PlayerManager.CurrentToolIndex = toolIndex;
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].gameObject.SetActive(true);
}
/// <summary>
/// Switches the tools in hand by moving up or down the list
///
/// <param name="up">Are we moving up (-1) the list?</param>
/// </summary>
private void SwitchTools(bool up)
{
// calculate index of next tool
int newIndex = up ? activeToolIndex - 1 : activeToolIndex + 1;
int newIndex = up ? GameManager.Instance.PlayerManager.CurrentToolIndex - 1 : GameManager.Instance.PlayerManager.CurrentToolIndex + 1;
if (newIndex < 0)
{
@@ -289,10 +310,11 @@ private void SwitchTools(bool up)
}
// disable current tool
tools[activeToolIndex].gameObject.SetActive(false);
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].gameObject.SetActive(false);
// load new tool
activeToolIndex = newIndex;
tools[activeToolIndex].gameObject.SetActive(true);
GameManager.Instance.PlayerManager.CurrentToolIndex = newIndex;
tools[GameManager.Instance.PlayerManager.CurrentToolIndex].gameObject.SetActive(true);
}
}