Refactoring of the interaction system and preliminary integration of save/load functionality across the game. (#44)
### Interactables Architecture Refactor - Converted composition to inheritance, moved from component-based to class-based interactables. No more requirement for chain of "Interactable -> Item" etc. - Created `InteractableBase` abstract base class with common functionality that replaces the old component - Specialized child classes: `Pickup`, `ItemSlot`, `LevelSwitch`, `MinigameSwitch`, `CombinationItem`, `OneClickInteraction` are now children classes - Light updates to the interactable inspector, moved some things arround, added collapsible inspector sections in the UI for better editor experience ### State Machine Integration - Custom `AppleMachine` inheritong from Pixelplacement's StateMachine which implements our own interface for saving, easy place for future improvements - Replaced all previous StateMachines by `AppleMachine` - Custom `AppleState` extends from default `State`. Added serialization, split state logic into "EnterState", "RestoreState", "ExitState" allowing for separate logic when triggering in-game vs loading game - Restores directly to target state without triggering transitional logic - Migration tool converts existing instances ### Prefab Organization - Saved changes from scenes into prefabs - Cleaned up duplicated components, confusing prefabs hierarchies - Created prefab variants where possible - Consolidated Environment prefabs and moved them out of Placeholders subfolder into main Environment folder - Organized item prefabs from PrefabsPLACEHOLDER into proper Items folder - Updated prefab references - All scene references updated to new locations - Removed placeholder files from Characters, Levels, UI, and Minigames folders ### Scene Updates - Quarry scene with major updates - Saved multiple working versions (Quarry, Quarry_Fixed, Quarry_OLD) - Added proper lighting data - Updated all interactable components to new architecture ### Minor editor tools - New tool for testing cards from an editor window (no in-scene object required) - Updated Interactable Inspector - New debug option to opt in-and-out of the save/load system - Tooling for easier migration Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com> Reviewed-on: #44
This commit is contained in:
279
Assets/Prefabs/Items/BurgerBuns.prefab
Normal file
279
Assets/Prefabs/Items/BurgerBuns.prefab
Normal file
@@ -0,0 +1,279 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &3266354364519034742
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 592045584872845087, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: itemData
|
||||
value:
|
||||
objectReference: {fileID: 11400000, guid: 0c6986639ca176a419c92f5a327d95ce, type: 2}
|
||||
- target: {fileID: 859535282245879918, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SortingOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1123190335639748903, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.19
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1123190335639748903, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 0.45000002
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.45000002
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.112500004
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -20.839
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -20.43
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Size.x
|
||||
value: 17
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Size.y
|
||||
value: 15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.newSize.x
|
||||
value: 1.76
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.newSize.y
|
||||
value: 0.75
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.oldSize.x
|
||||
value: 13.33
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.oldSize.y
|
||||
value: 5.63
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3070149615425714466, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteTilingProperty.adaptiveTilingThreshold
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6822963659154049764, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.03
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BurgerBuns
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Size.x
|
||||
value: 1.76
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Size.y
|
||||
value: 0.75
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: 7029408211075050325, guid: 00637ce2d8f2923419b6ed4e91792dc0, type: 3}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SortingOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_SpriteSortPoint
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7494677664706785084, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_WasSpriteAssigned
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 4848152958083303482}
|
||||
- targetCorrespondingSourceObject: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1554702161509479097}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
--- !u!1 &5336239774528417475 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7447346505753002421, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
m_PrefabInstance: {fileID: 3266354364519034742}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!82 &4848152958083303482
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5336239774528417475}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 6418180475301049370, guid: ee2166600ebe2b84ea8b22d20e34a691, type: 2}
|
||||
m_PlayOnAwake: 0
|
||||
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!114 &1554702161509479097
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5336239774528417475}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 242e6101be071f44fb14c3c12641c833, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::AppleAudioSource
|
||||
audioSourceType: 3
|
||||
audioSource: {fileID: 0}
|
||||
clipPriority: 0
|
||||
sourcePriority: 0
|
||||
Reference in New Issue
Block a user