├── Assets ├── leveleditorprefabs.txt ├── Resources │ ├── ggg.png │ ├── Levels.meta │ ├── Levels │ │ ├── my level name.json.meta │ │ └── my level name.json │ ├── DOTweenSettings.asset.meta │ ├── DOTweenSettings.asset │ └── ggg.png.meta ├── Prefabs │ ├── Wall.prefab.meta │ ├── Crate L.prefab.meta │ ├── Crate.prefab.meta │ ├── Player.prefab.meta │ ├── Target.prefab.meta │ ├── WallAlt.prefab.meta │ ├── Player.prefab │ ├── Crate.prefab │ ├── Wall.prefab │ ├── WallAlt.prefab │ ├── Target.prefab │ └── Crate L.prefab ├── Scenes │ └── LevelScene.unity.meta ├── Examples │ ├── PipePushParadise │ │ ├── Scripts │ │ │ ├── OutletEnd.cs │ │ │ ├── OutletStart.cs │ │ │ ├── Pipe.cs.meta │ │ │ ├── Spout.cs.meta │ │ │ ├── OutletEnd.cs.meta │ │ │ ├── PipeUtils.cs.meta │ │ │ ├── OutletStart.cs.meta │ │ │ ├── PipePushParadise.cs.meta │ │ │ ├── PipeUtils.cs │ │ │ ├── Pipe.cs │ │ │ ├── Spout.cs │ │ │ └── PipePushParadise.cs │ │ ├── ppp.unity.meta │ │ ├── Prefabs │ │ │ ├── Pipe-L.prefab.meta │ │ │ ├── Pipe-S.prefab.meta │ │ │ ├── Pipe.prefab.meta │ │ │ ├── Water.prefab.meta │ │ │ ├── OutletEnd.prefab.meta │ │ │ ├── OutletStart.prefab.meta │ │ │ └── OutletStart.prefab │ │ ├── Materials.meta │ │ ├── Prefabs.meta │ │ ├── Scripts.meta │ │ └── Materials │ │ │ ├── Water.mat.meta │ │ │ └── Water.mat │ ├── Sokoban │ │ ├── sokoban.unity.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ │ ├── Sokoban.cs.meta │ │ │ └── Sokoban.cs │ ├── Sokoban.meta │ └── PipePushParadise.meta ├── Prefabs.meta ├── Scenes.meta ├── Scripts.meta ├── leveleditorprefabs.txt.meta ├── Examples.meta ├── Materials.meta ├── Resources.meta ├── Scripts │ ├── Editor.meta │ ├── Tile.cs │ ├── Game.cs.meta │ ├── Mover.cs.meta │ ├── State.cs.meta │ ├── Tile.cs.meta │ ├── Utils.cs.meta │ ├── Wall.cs.meta │ ├── LevelGizmo.cs.meta │ ├── LevelLoader.cs.meta │ ├── LogicalGrid.cs.meta │ ├── Player.cs.meta │ ├── SaveData.cs.meta │ ├── WaitFor.cs.meta │ ├── Editor │ │ ├── TagHelper.cs.meta │ │ ├── LevelEditor.cs.meta │ │ ├── LevelPlayModePersistence.cs.meta │ │ ├── TagHelper.cs │ │ └── LevelPlayModePersistence.cs │ ├── EventManager.cs.meta │ ├── LevelManager.cs.meta │ ├── LevelSerialization.cs.meta │ ├── EventManager.cs │ ├── Wall.cs │ ├── LevelGizmo.cs │ ├── LevelSerialization.cs │ ├── LogicalGrid.cs │ ├── LevelManager.cs │ ├── WaitFor.cs │ ├── LevelLoader.cs │ ├── SaveData.cs │ ├── State.cs │ ├── Player.cs │ ├── Mover.cs │ ├── Game.cs │ └── Utils.cs └── Materials │ ├── Plane.mat.meta │ ├── Target.mat.meta │ ├── Crate.mat.meta │ ├── Player.mat.meta │ ├── Wall.mat.meta │ ├── WallAlt.mat.meta │ ├── Target.mat │ ├── Player.mat │ ├── Plane.mat │ ├── Crate.mat │ ├── Wall.mat │ └── WallAlt.mat ├── ggg-demo.gif ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── NetworkManager.asset ├── EditorBuildSettings.asset ├── XRSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── PresetManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── EditorSettings.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── InputManager.asset └── QualitySettings.asset ├── LICENSE ├── .gitignore ├── .vscode └── settings.json ├── Packages ├── manifest.json └── packages-lock.json └── README.md /Assets/leveleditorprefabs.txt: -------------------------------------------------------------------------------- 1 | Crate 2 | Crate L 3 | Player 4 | Wall 5 | WallAlt 6 | Target -------------------------------------------------------------------------------- /ggg-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corey-martin/grid-game-groundwork/HEAD/ggg-demo.gif -------------------------------------------------------------------------------- /Assets/Resources/ggg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/corey-martin/grid-game-groundwork/HEAD/Assets/Resources/ggg.png -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.10f1 2 | m_EditorVersionWithRevision: 2019.4.10f1 (5311b3af6f69) 3 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Assets/Prefabs/Wall.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d9ee17d9cf96a949a386f130ee66d24 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Crate L.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93cebaef7318dcf44b3bdf30a29047c6 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Crate.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc13721be0b71cb40bbaed27b39f1e7d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a95e24bd87ff454f93485d5315c861e 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Target.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01752823398271649b2a1a04f7c74b81 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/WallAlt.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48769eba6cd6fb54aa60ff6593314f3d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/LevelScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: beb57e3c6ba8dc3459364e7d99ed11e9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/OutletEnd.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class OutletEnd : Pipe 4 | { 5 | public override bool CanMoveToward(Vector3Int dir) { 6 | return false; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d1520c8ab835e544a5c2884caf26675 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d77aae9ee309bdf4aa10450ffbc8ca84 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb69efc42b3d9f7418cc18ae2a1705b0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/leveleditorprefabs.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b661132a3416d764ab06dedb252f844b 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a9c13fef4b48c647b342b466b0ee63d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/OutletStart.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class OutletStart : Pipe { 4 | 5 | public override bool CanMoveToward(Vector3Int dir) { 6 | return false; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Assets/Examples/Sokoban/sokoban.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52ff4ccf88c4f90448865b7a32342518 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76e31e45854e49a4599fb37a93d9f349 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb8bb998998c1e84bb68fbc3b5898df2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/ppp.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8e97c40a8ee45d409dd27a4352a49e2 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/Sokoban.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cbd6b39037bd25498fd8b2ab30d6da9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Levels.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bff2f448dbfb47240b203304577072ef 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Levels/my level name.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab6c7f6e743b046f29323bf2dc959255 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9a5da4f2737f984290e84eff0b86af5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b8a1dd0cd8be9844a736457bfffb98a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/Pipe-L.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43af90134a10ff74ba83325cd51e994d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/Pipe-S.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3bd1f7546feb8cd4aa678790c3529b5a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/Pipe.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 022f72424d1ed6840b13fe0048ec5faa 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/Water.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec9c3b606a8009d41851532f8d17c210 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/Sokoban/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1ead8b5fabb27645b6d159214fdd9f8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/OutletEnd.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8435fa7b649515f479b6b885061ee172 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/OutletStart.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f20a4da70b12fdc42aef4979a13607c8 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Materials/Plane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef2c652f61f0aa54190cb30d0f635f58 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Target.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58547b2b93cb32648935da54e1786127 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Tile.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Tile { 4 | public Transform t; 5 | public Vector3Int pos { get { return Vector3Int.RoundToInt(t.position); } } 6 | public Vector3 rot { get { return t.eulerAngles; } } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57af361c8c83fa64296de397c90d16e5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c1aaa9b10d6c514ba27c49b9c56e2b4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffa80b1c0cc71d147aa7fb2607fc8ce5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Crate.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 637c8ab5e44416d428d7b0a5bc60342a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Player.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 621289ea652466b43a21e2684628488a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Wall.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21388ff69936f6e45ac36e0570c22cbe 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/WallAlt.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 470a0e52db2e6c94e81795671c4272d6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/DOTweenSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fddce1cd6c0f6947bd51a5a3904c12e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Materials/Water.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78958449807387e43936da9b5ce4148d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Game.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b0b61caf6bb99548be0894d114d48eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -90 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Mover.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b1ed8a0cca287042822fec34f4a0355 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/State.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4777ddcf991e17d48bed12dd4a842ba1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Tile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7353197bd83970459b5edadabb7d2eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f889382f393b87d498e1ab0e9e1094db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Wall.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1452f68fd32741e4bb8a0456d52aa658 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelGizmo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 957e23f9f550de4408edd7d9145916ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ff76b3df8353dc40ba39d665e6fe351 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LogicalGrid.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33f885f08bb454bb2972b5884ed1acc4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc8093f936db2cc4280fa562d94bb49a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: -25 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/SaveData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d086d89ad0f53d742beb80566463fbd6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/WaitFor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65f0354da388312479513d7be166c077 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/TagHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78e4ca767439ffd4abf3652656be661a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/EventManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 166d8b4148d93424bbfc515166477672 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91a7003bb3167604b9bfbf6f5674a1ec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/LevelEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f52f97f37b06b0498e9b26e989e941f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelSerialization.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 576eec73f5fb6dd42b16697cf2b63538 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Examples/Sokoban/Scripts/Sokoban.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f38d7bf356de58740816169acedd5ada 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/Pipe.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a26fa1c62f5d6b428316f4cbc556fd2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/Spout.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd20a4bfbba722349b807e57431ffeb6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/LevelPlayModePersistence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be5dcd462e041914e822b21443be1bef 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/OutletEnd.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab90d0734b28da9458198d77204e3108 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/PipeUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faaeecb58415e1b41b9c95c70da839d9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/OutletStart.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e178d4527c789249ab5641d16e33400 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/PipePushParadise.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f773328a8086f245957fb77bc9e0bd1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Assets/Scripts/EventManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | public class EventManager 5 | { 6 | public static Action onLevelStarted; 7 | public static Action onLevelQuit; 8 | public static Action onLevelComplete; 9 | public static Action onMoveStart; 10 | public static Action onMoveComplete; 11 | public static Action onPush; 12 | public static Action onUndo; 13 | public static Action onReset; 14 | public static Action onUISelect; 15 | public static Action onUISubmit; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/PipeUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public class PipeUtils 5 | { 6 | static List spouts = new List(); 7 | 8 | public static Spout[] GetSpoutsAtPos(Vector3 pos) { 9 | spouts.Clear(); 10 | foreach (Pipe pipe in PipePushParadise.pipes) { 11 | foreach (Spout spout in pipe.spouts) { 12 | if (Utils.VectorRoughly(pos, spout.transform.position)) { 13 | spouts.Add(spout); 14 | } 15 | } 16 | } 17 | return spouts.ToArray(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: 7 | - Tile 8 | - Level 9 | - Target 10 | layers: 11 | - Default 12 | - TransparentFX 13 | - Ignore Raycast 14 | - 15 | - Water 16 | - UI 17 | - 18 | - 19 | - PostProcessing 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | - 41 | - 42 | - 43 | m_SortingLayers: 44 | - name: Default 45 | uniqueID: 0 46 | locked: 0 47 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/Pipe.cs: -------------------------------------------------------------------------------- 1 | 2 | public class Pipe : Mover 3 | { 4 | public Spout[] spouts; 5 | public bool isFlowing; 6 | 7 | public void StartFlow(Spout originSpout = null) { 8 | if (isFlowing) return; 9 | isFlowing = true; 10 | foreach (Spout spout in spouts) { 11 | if (spout == originSpout) continue; 12 | spout.StartFlow(); 13 | } 14 | } 15 | 16 | public void StopFlow() { 17 | isFlowing = false; 18 | foreach (Spout spout in spouts) { 19 | spout.StopFlow(); 20 | } 21 | } 22 | 23 | public void DisableWater() { 24 | foreach (Spout spout in spouts) { 25 | spout.water.SetActive(false); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Scripts/Wall.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public class Wall : MonoBehaviour 5 | { 6 | public bool isStatic = true; 7 | public List tiles = new List(); 8 | 9 | void OnValidate() { 10 | CreateTiles(); 11 | } 12 | 13 | void CreateTiles() { 14 | tiles.Clear(); 15 | foreach (Transform child in transform) { 16 | if (child.gameObject.CompareTag("Tile")) { 17 | tiles.Add(child); 18 | } 19 | } 20 | } 21 | 22 | void OnDrawGizmosSelected() { 23 | if (!Application.isPlaying) { 24 | CreateTiles(); 25 | } 26 | Gizmos.color = Color.yellow; 27 | foreach (Transform tile in tiles) { 28 | Gizmos.DrawWireCube(tile.position, tile.localScale); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelGizmo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class LevelGizmo : MonoBehaviour 4 | { 5 | #if UNITY_EDITOR 6 | public static Vector3 pos { get; private set; } 7 | static Color color = new Color(2f, 2f, 2f); 8 | public static bool drawEnabled { get; private set; } 9 | 10 | public static void UpdateGizmo(Vector3 v, Color c) { 11 | pos = v; 12 | color = c; 13 | } 14 | 15 | public static void Enable(bool b) { 16 | drawEnabled = b; 17 | } 18 | 19 | void OnDrawGizmos() { 20 | if (drawEnabled) { 21 | Gizmos.color = color; 22 | Gizmos.DrawWireCube(pos, Vector3.one); 23 | Gizmos.DrawWireCube(pos + (Vector3.one * 0.01f), Vector3.one); 24 | Gizmos.DrawWireCube(pos - (Vector3.one * 0.01f), Vector3.one); 25 | } 26 | } 27 | #endif 28 | } -------------------------------------------------------------------------------- /Assets/Scripts/LevelSerialization.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | 6 | [System.Serializable] 7 | public class SerializedLevel 8 | { 9 | public List LevelObjects; 10 | 11 | public SerializedLevel(GameObject level) 12 | { 13 | LevelObjects = new List(); 14 | foreach (Transform child in level.transform) 15 | { 16 | LevelObjects.Add(new SerializedLevelObject(child)); 17 | } 18 | } 19 | } 20 | 21 | [System.Serializable] 22 | public class SerializedLevelObject 23 | { 24 | public string prefab; 25 | public Vector3 pos; 26 | public Vector3 angles; 27 | public SerializedLevelObject(Transform t) 28 | { 29 | prefab = t.name; 30 | pos = t.localPosition; 31 | angles = t.localEulerAngles; 32 | } 33 | } -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/Spout.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Spout : MonoBehaviour 4 | { 5 | public Pipe pipe; 6 | public Transform target; 7 | public Transform origin; 8 | public GameObject water; 9 | public bool debug = false; 10 | bool isFlowing; 11 | 12 | public Vector3Int direction { 13 | get { 14 | return Utils.Vec3ToInt(target.position - origin.position); 15 | } 16 | } 17 | 18 | public void StartFlow() { 19 | if (isFlowing) return; 20 | isFlowing = true; 21 | water.SetActive(true); 22 | pipe.StartFlow(this); 23 | Spout[] spouts = PipeUtils.GetSpoutsAtPos(target.position); 24 | foreach (Spout s in spouts) { 25 | if (s != null && s.direction == -direction) { 26 | s.StartFlow(); 27 | } 28 | } 29 | } 30 | 31 | public void StopFlow() { 32 | isFlowing = false; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/TagHelper.cs: -------------------------------------------------------------------------------- 1 | // borrowed from https://answers.unity.com/questions/33597/is-it-possible-to-create-a-tag-programmatically.html 2 | // via users yoyo, Leslie-Young & LiWa 3 | using UnityEditor; 4 | 5 | public static class TagHelper { 6 | 7 | public static void AddTag(string tagname) { 8 | UnityEngine.Object[] asset = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/TagManager.asset"); 9 | 10 | if (asset != null && asset.Length > 0) { 11 | SerializedObject so = new SerializedObject(asset[0]); 12 | SerializedProperty tags = so.FindProperty("tags"); 13 | 14 | for (int i = 0; i < tags.arraySize; i++) { 15 | if (tags.GetArrayElementAtIndex(i).stringValue == tagname) return; 16 | } 17 | 18 | tags.InsertArrayElementAtIndex(tags.arraySize); 19 | tags.GetArrayElementAtIndex(tags.arraySize - 1).stringValue = tagname; 20 | so.ApplyModifiedProperties(); 21 | so.Update(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Assets/Scripts/LogicalGrid.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class LogicalGrid 6 | { 7 | private Dictionary> Contents; 8 | 9 | public LogicalGrid() 10 | { 11 | Contents = new Dictionary>(); 12 | } 13 | 14 | public void SyncContents(GameObject[] tiles) 15 | { 16 | foreach (var kv in Contents) 17 | kv.Value.Clear(); 18 | foreach (var tile in tiles) 19 | { 20 | var pos = Vector3Int.RoundToInt(tile.transform.position); 21 | if (!Contents.ContainsKey(pos)) 22 | Contents[pos] = new HashSet(); 23 | Contents[pos].Add(tile); 24 | } 25 | } 26 | 27 | public HashSet GetContentsAt(Vector3Int pos) 28 | { 29 | if (!Contents.ContainsKey(pos)) 30 | Contents[pos] = new HashSet(); // weird side effect... 31 | return Contents[pos]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Examples/Sokoban/Scripts/Sokoban.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | 4 | public class Sokoban : MonoBehaviour 5 | { 6 | public GameObject winText; 7 | 8 | void Start() { 9 | Game.isPolyban = false; 10 | winText.SetActive(false); 11 | } 12 | 13 | void OnEnable() { 14 | EventManager.onMoveComplete += CheckWinCondition; 15 | EventManager.onUndo += CheckWinCondition; 16 | EventManager.onReset += CheckWinCondition; 17 | } 18 | 19 | void OnDisable() { 20 | EventManager.onMoveComplete -= CheckWinCondition; 21 | EventManager.onUndo -= CheckWinCondition; 22 | EventManager.onReset -= CheckWinCondition; 23 | } 24 | 25 | void CheckWinCondition() { 26 | winText.SetActive(won); 27 | } 28 | 29 | private static bool won { 30 | get 31 | { 32 | return Game.movers.All(m => m.isPlayer || MoverOnTarget(m)); 33 | } 34 | } 35 | 36 | private static bool MoverOnTarget(Mover m) 37 | { 38 | return m.tiles.Any(t => Utils.TaggedObjIsAtPos(t.pos, "Target")); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Corey Martin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | [Dd]emigiant/ 13 | *[Dd]emigiant* 14 | 15 | # Asset meta data should only be ignored when the corresponding asset is also ignored 16 | !/[Aa]ssets/**/*.meta 17 | 18 | # Uncomment this line if you wish to ignore the asset store tools plugin 19 | # /[Aa]ssets/AssetStoreTools* 20 | 21 | # Autogenerated Jetbrains Rider plugin 22 | [Aa]ssets/Plugins/Editor/JetBrains* 23 | 24 | # Visual Studio cache directory 25 | .vs/ 26 | 27 | # Gradle cache directory 28 | .gradle/ 29 | 30 | # Autogenerated VS/MD/Consulo solution and project files 31 | ExportedObj/ 32 | .consulo/ 33 | *.csproj 34 | *.unityproj 35 | *.sln 36 | *.suo 37 | *.tmp 38 | *.user 39 | *.userprefs 40 | *.pidb 41 | *.booproj 42 | *.svd 43 | *.pdb 44 | *.mdb 45 | *.opendb 46 | *.VC.db 47 | 48 | # Unity3D generated meta files 49 | *.pidb.meta 50 | *.pdb.meta 51 | *.mdb.meta 52 | 53 | # Unity3D generated file on crash reports 54 | sysinfo.txt 55 | 56 | # Builds 57 | *.apk 58 | *.unitypackage 59 | 60 | # Crashlytics generated file 61 | crashlytics-build.properties 62 | 63 | Assets/Plugins/Demigiant.meta 64 | Assets/Plugins.meta 65 | -------------------------------------------------------------------------------- /Assets/Resources/DOTweenSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 16995157, guid: a811bde74b26b53498b4f6d872b09b6d, type: 3} 13 | m_Name: DOTweenSettings 14 | m_EditorClassIdentifier: 15 | useSafeMode: 1 16 | safeModeOptions: 17 | nestedTweenFailureBehaviour: 0 18 | timeScale: 1 19 | useSmoothDeltaTime: 0 20 | maxSmoothUnscaledTime: 0.15 21 | rewindCallbackMode: 0 22 | showUnityEditorReport: 0 23 | logBehaviour: 0 24 | drawGizmos: 1 25 | defaultRecyclable: 0 26 | defaultAutoPlay: 3 27 | defaultUpdateType: 0 28 | defaultTimeScaleIndependent: 0 29 | defaultEaseType: 6 30 | defaultEaseOvershootOrAmplitude: 1.70158 31 | defaultEasePeriod: 0 32 | defaultAutoKill: 1 33 | defaultLoopType: 0 34 | debugMode: 0 35 | debugStoreTargetId: 0 36 | showPreviewPanel: 1 37 | storeSettingsLocation: 0 38 | modules: 39 | showPanel: 0 40 | audioEnabled: 1 41 | physicsEnabled: 1 42 | physics2DEnabled: 1 43 | spriteEnabled: 1 44 | uiEnabled: 1 45 | textMeshProEnabled: 0 46 | tk2DEnabled: 0 47 | deAudioEnabled: 0 48 | deUnityExtendedEnabled: 0 49 | showPlayingTweens: 0 50 | showPausedTweens: 0 51 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitignore":true, 7 | "**/.gitmodules":true, 8 | "**/*.booproj":true, 9 | "**/*.pidb":true, 10 | "**/*.suo":true, 11 | "**/*.user":true, 12 | "**/*.userprefs":true, 13 | "**/*.unityproj":true, 14 | "**/*.dll":true, 15 | "**/*.exe":true, 16 | "**/*.pdf":true, 17 | "**/*.mid":true, 18 | "**/*.midi":true, 19 | "**/*.wav":true, 20 | "**/*.gif":true, 21 | "**/*.ico":true, 22 | "**/*.jpg":true, 23 | "**/*.jpeg":true, 24 | "**/*.png":true, 25 | "**/*.psd":true, 26 | "**/*.tga":true, 27 | "**/*.tif":true, 28 | "**/*.tiff":true, 29 | "**/*.3ds":true, 30 | "**/*.3DS":true, 31 | "**/*.fbx":true, 32 | "**/*.FBX":true, 33 | "**/*.lxo":true, 34 | "**/*.LXO":true, 35 | "**/*.ma":true, 36 | "**/*.MA":true, 37 | "**/*.obj":true, 38 | "**/*.OBJ":true, 39 | "**/*.asset":true, 40 | "**/*.cubemap":true, 41 | "**/*.flare":true, 42 | "**/*.mat":true, 43 | "**/*.meta":true, 44 | "**/*.prefab":true, 45 | "**/*.unity":true, 46 | "build/":true, 47 | "Build/":true, 48 | "Library/":true, 49 | "library/":true, 50 | "obj/":true, 51 | "Obj/":true, 52 | "ProjectSettings/":true, 53 | "temp/":true, 54 | "Temp/":true 55 | } 56 | } -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_ReuseCollisionCallbacks: 1 28 | m_AutoSyncTransforms: 0 29 | m_AlwaysShowColliders: 0 30 | m_ShowColliderSleep: 1 31 | m_ShowColliderContacts: 0 32 | m_ShowColliderAABB: 0 33 | m_ContactArrowScale: 0.2 34 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 35 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 36 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 37 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 38 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 39 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class LevelManager : MonoBehaviour 4 | { 5 | public static LevelManager instance { get; private set; } 6 | public GameObject[] prefabs; 7 | public static string currentLevelName = ""; 8 | static bool isLoading = false; 9 | [SerializeField] string levelToLoad; 10 | 11 | void Awake() { 12 | if (instance == null) { 13 | instance = this; 14 | } else { 15 | Destroy(gameObject); 16 | } 17 | } 18 | 19 | void Start() { 20 | if (!string.IsNullOrWhiteSpace(levelToLoad)) { 21 | LoadLevel(levelToLoad); 22 | } 23 | } 24 | 25 | public void LoadLevel(string levelName, bool clear = true) { 26 | 27 | if (isLoading || string.IsNullOrWhiteSpace(levelName)) { 28 | return; 29 | } 30 | if (clear) { 31 | for (int i = transform.childCount - 1; i >= 0; i--) { 32 | Destroy(transform.GetChild(i).gameObject); 33 | } 34 | } 35 | currentLevelName = levelName; 36 | SerializedLevel serializedLevel = LevelLoader.LoadLevel(currentLevelName); 37 | GameObject newLevelObj = new GameObject(); 38 | newLevelObj.transform.name = currentLevelName; 39 | newLevelObj.transform.parent = transform; 40 | LevelLoader.InstantiateLevel(serializedLevel, prefabs, newLevelObj.transform); 41 | 42 | EventManager.onLevelStarted?.Invoke(currentLevelName); 43 | } 44 | 45 | public void QuitLevel() { 46 | EventManager.onLevelQuit?.Invoke(currentLevelName); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Scripts/PipePushParadise.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class PipePushParadise : MonoBehaviour 4 | { 5 | public GameObject winText; 6 | public static Pipe[] pipes; 7 | OutletStart[] outletStarts; 8 | OutletEnd[] outletEnds; 9 | 10 | void Awake() { 11 | pipes = FindObjectsOfType(); 12 | outletStarts = FindObjectsOfType(); 13 | outletEnds = FindObjectsOfType(); 14 | } 15 | 16 | void Start() { 17 | CheckWinCondition(); 18 | } 19 | 20 | void OnEnable() { 21 | EventManager.onMoveComplete += CheckWinCondition; 22 | EventManager.onUndo += CheckWinCondition; 23 | EventManager.onReset += CheckWinCondition; 24 | } 25 | 26 | void OnDisable() { 27 | EventManager.onMoveComplete -= CheckWinCondition; 28 | EventManager.onUndo -= CheckWinCondition; 29 | EventManager.onReset -= CheckWinCondition; 30 | } 31 | 32 | void CheckWinCondition() { 33 | foreach (Pipe pipe in pipes) { 34 | pipe.StopFlow(); 35 | } 36 | foreach (OutletStart outlet in outletStarts) { 37 | outlet.StartFlow(); 38 | } 39 | foreach (Pipe pipe in pipes) { 40 | if (!pipe.isFlowing) { 41 | pipe.DisableWater(); 42 | } 43 | } 44 | winText.SetActive(won); 45 | } 46 | 47 | bool won { 48 | get { 49 | foreach(OutletEnd outlet in outletEnds) { 50 | if (!outlet.isFlowing) { 51 | return false; 52 | } 53 | } 54 | return true; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/Scripts/WaitFor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | public static class WaitFor 5 | { 6 | class FloatComparer : IEqualityComparer 7 | { 8 | bool IEqualityComparer.Equals(float x, float y) 9 | { 10 | return x == y; 11 | } 12 | int IEqualityComparer.GetHashCode(float obj) 13 | { 14 | return obj.GetHashCode(); 15 | } 16 | } 17 | 18 | static Dictionary _timeInterval = new Dictionary(100, new FloatComparer()); 19 | public static WaitForSeconds Seconds(float seconds) 20 | { 21 | WaitForSeconds wfs; 22 | if (!_timeInterval.TryGetValue(seconds, out wfs)) 23 | _timeInterval.Add(seconds, wfs = new WaitForSeconds(seconds)); 24 | return wfs; 25 | } 26 | 27 | static Dictionary _realtimeInterval = new Dictionary(100, new FloatComparer()); 28 | public static WaitForSecondsRealtime SecondsRealtime(float seconds) 29 | { 30 | WaitForSecondsRealtime wfs; 31 | if (!_realtimeInterval.TryGetValue(seconds, out wfs)) 32 | _realtimeInterval.Add(seconds, wfs = new WaitForSecondsRealtime(seconds)); 33 | return wfs; 34 | } 35 | 36 | static WaitForEndOfFrame _endOfFrame = new WaitForEndOfFrame(); 37 | public static WaitForEndOfFrame EndOfFrame 38 | { 39 | get { return _endOfFrame; } 40 | } 41 | 42 | static WaitForFixedUpdate _fixedUpdate = new WaitForFixedUpdate(); 43 | public static WaitForFixedUpdate FixedUpdate 44 | { 45 | get { return _fixedUpdate; } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/Scripts/LevelLoader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public class LevelLoader 5 | { 6 | static int levelIndex = 0; 7 | static List allLevels => Utils.allLevels; 8 | 9 | public static SerializedLevel LoadLevel(string levelName) { 10 | SetLevelIndexByName(levelName); 11 | TextAsset textFile = Resources.Load("Levels/" + levelName); 12 | return JsonUtility.FromJson(textFile.text); 13 | } 14 | 15 | public static void InstantiateLevel(SerializedLevel level, GameObject[] prefabs, Transform parent) { 16 | foreach (var slo in level.LevelObjects) { 17 | foreach (GameObject prefab in prefabs) { 18 | if (prefab.transform.name == slo.prefab) { 19 | var go = GameObject.Instantiate(prefab) as GameObject; 20 | go.transform.parent = parent; 21 | go.transform.localPosition = slo.pos; 22 | go.transform.localEulerAngles = slo.angles; 23 | } 24 | } 25 | } 26 | } 27 | 28 | public static SerializedLevel LoadNextLevel() { 29 | levelIndex++; 30 | if (levelIndex >= allLevels.Count) { 31 | levelIndex = 0; 32 | } 33 | if (allLevels[levelIndex].Contains("test")) { 34 | return LoadNextLevel(); 35 | } else { 36 | return LoadLevel(allLevels[levelIndex]); 37 | } 38 | } 39 | 40 | static void SetLevelIndexByName(string levelName) { 41 | for (int i = 0; i < allLevels.Count; i++) { 42 | if (allLevels[i] == levelName) { 43 | levelIndex = i; 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Scripts/SaveData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.Serialization.Formatters.Binary; 4 | using System.IO; 5 | using UnityEngine; 6 | 7 | public class SaveData { 8 | 9 | public static bool initialized { get; private set; } = false; 10 | private static int gameNumber = 1; 11 | private static BinaryFormatter bf = new BinaryFormatter(); 12 | private static PlayerData playerData = new PlayerData(); 13 | 14 | private static string Path(int i) { 15 | return Application.persistentDataPath + "/" + i + ".dat"; 16 | } 17 | 18 | public static bool GameExists(int i) { 19 | return File.Exists(Path(i)); 20 | } 21 | 22 | static PlayerData FileData(int i) { 23 | FileStream file = File.Open(Path(i), FileMode.Open); 24 | PlayerData data = (PlayerData)bf.Deserialize(file); 25 | file.Close(); 26 | return data; 27 | } 28 | 29 | public static void LoadGame(int i) { 30 | initialized = true; 31 | gameNumber = i; 32 | 33 | PlayerData data = new PlayerData(); 34 | if (GameExists(gameNumber)) { 35 | data = FileData(gameNumber); 36 | } 37 | playerData = data; 38 | } 39 | 40 | public static void DeleteGame(int i) { 41 | if (File.Exists(Path(i))) { 42 | File.Delete(Path(i)); 43 | } 44 | } 45 | 46 | public static void SaveGame() { 47 | FileStream file; 48 | if (File.Exists(Path(gameNumber))) { 49 | file = File.Open(Path(gameNumber), FileMode.Open); 50 | } else { 51 | file = File.Create(Path(gameNumber)); 52 | } 53 | bf.Serialize(file, playerData); 54 | file.Close(); 55 | } 56 | 57 | public static void BeatLevel(string level) { 58 | if (!playerData.levelsBeaten.Contains(level)) { 59 | playerData.levelsBeaten.Add(level); 60 | } 61 | } 62 | } 63 | 64 | [Serializable] 65 | public class PlayerData { 66 | public List levelsBeaten = new List(); 67 | } 68 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.ads": "3.4.9", 6 | "com.unity.analytics": "3.3.5", 7 | "com.unity.collab-proxy": "1.2.16", 8 | "com.unity.ide.rider": "1.1.4", 9 | "com.unity.ide.vscode": "1.1.3", 10 | "com.unity.multiplayer-hlapi": "1.0.6", 11 | "com.unity.purchasing": "2.1.0", 12 | "com.unity.test-framework": "1.1.16", 13 | "com.unity.textmeshpro": "2.0.1", 14 | "com.unity.timeline": "1.2.6", 15 | "com.unity.ugui": "1.0.0", 16 | "com.unity.xr.legacyinputhelpers": "2.1.4", 17 | "com.unity.modules.ai": "1.0.0", 18 | "com.unity.modules.androidjni": "1.0.0", 19 | "com.unity.modules.animation": "1.0.0", 20 | "com.unity.modules.assetbundle": "1.0.0", 21 | "com.unity.modules.audio": "1.0.0", 22 | "com.unity.modules.cloth": "1.0.0", 23 | "com.unity.modules.director": "1.0.0", 24 | "com.unity.modules.imageconversion": "1.0.0", 25 | "com.unity.modules.imgui": "1.0.0", 26 | "com.unity.modules.jsonserialize": "1.0.0", 27 | "com.unity.modules.particlesystem": "1.0.0", 28 | "com.unity.modules.physics": "1.0.0", 29 | "com.unity.modules.physics2d": "1.0.0", 30 | "com.unity.modules.screencapture": "1.0.0", 31 | "com.unity.modules.terrain": "1.0.0", 32 | "com.unity.modules.terrainphysics": "1.0.0", 33 | "com.unity.modules.tilemap": "1.0.0", 34 | "com.unity.modules.ui": "1.0.0", 35 | "com.unity.modules.uielements": "1.0.0", 36 | "com.unity.modules.umbra": "1.0.0", 37 | "com.unity.modules.unityanalytics": "1.0.0", 38 | "com.unity.modules.unitywebrequest": "1.0.0", 39 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 40 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 41 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 42 | "com.unity.modules.unitywebrequestwww": "1.0.0", 43 | "com.unity.modules.vehicles": "1.0.0", 44 | "com.unity.modules.video": "1.0.0", 45 | "com.unity.modules.vr": "1.0.0", 46 | "com.unity.modules.wind": "1.0.0", 47 | "com.unity.modules.xr": "1.0.0" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Materials/Target.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Target 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.735849, g: 0.6563319, b: 0.5900676, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Grid Game Groundwork for Unity 2 | 3 | A Unity project & level editor for making grid-based/block-pushing/Sokoban-like games. 4 | Made with Unity 2019.x LTS 5 | 6 | ![Example GIF](https://raw.githubusercontent.com/mytoboggan/grid-game-groundwork/master/ggg-demo.gif) 7 | 8 | ## Dependencies: 9 | DOTween by Demigiant 10 | http://dotween.demigiant.com/ 11 | https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676 12 | 13 | ## Setting Up Scenes: 14 | - Add the "GameController" prefab to the scene 15 | See "Example.unity" 16 | 17 | ## Using the Editor: 18 | The editor window can be found under "Window" -> "Level Editor". 19 | - Define the list of prefabs at `Assets/leveleditorprefabs.txt`, or assign prefabs manually to the "Prefabs" dropdown 20 | - Select a game object (prefab) 21 | - Left-click anywhere in the scene to paint in the selected gameObject 22 | - Hold left-click to paint continuously 23 | 24 | _Note: Selecting "Erase" will clear any objects at that position._ 25 | 26 | ## Deeper Dive: 27 | 28 | The project assumes plenty about what kind of game you want to make, but there are no rules about friction or win conditions. There are two main object types that you can use in scenes, Wall and Mover. 29 | 30 | I typically make objects derive from the Mover class (as the Player class does). Walls and Movers both need child gameObjects with a Box Collider component and tagged with "Tile". See the prefabs "Crate" and "Crate L" under `Assets/Resources` for examples of single-tile and multi-tile Movers. 31 | 32 | ## Class Breakdown: 33 | 34 | ### Mover: 35 | Things that can move and fall and that should be tracked for the undo system. 36 | 37 | ### Wall: 38 | Static things you should not be able to move and that should stop you from moving, including the ground. 39 | 40 | ### Player: 41 | Derives from Mover, handles character movement input. There should only be one Player in the scene. 42 | 43 | ### Game: 44 | Manages movers, walls and undo/reset input. 45 | 46 | ### SaveData: 47 | For saving persistent data, like a list of beaten levels by name/string. 48 | 49 | ### State: 50 | Tracks the undo stack. 51 | 52 | ### Utils: 53 | General utilities class 54 | 55 | ### WaitFor: 56 | For caching yield instructions, borrowed from... somewhere on the internet years ago. 57 | 58 | ### LevelEditor: 59 | The EditorWindow class (see "Using the Editor" above) 60 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Materials/Water.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Water 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0.27355617, b: 0.5849056, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Materials/Player.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Player 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 0 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 0 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Materials/Plane.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Plane 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 0 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 0 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.909804, g: 0.909804, b: 0.8745099, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Materials/Crate.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Crate 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 0 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 0 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.4433962, g: 0.34227517, b: 0.2007832, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Materials/Wall.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Wall 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 0 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 0 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.3647059, g: 0.48627454, b: 0.28235295, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Materials/WallAlt.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: WallAlt 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 0 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 0 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.6190815, g: 0.6981132, b: 0.48077607, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /Assets/Scripts/State.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public class State 5 | { 6 | public struct MoverToTrack { 7 | public Mover mover; 8 | public Vector3 initialPos; 9 | public Vector3 initialRot; 10 | public List positions; 11 | public List rotations; 12 | } 13 | 14 | public static List moversToTrack = new List(); 15 | public static int undoIndex; 16 | 17 | public static void AddMover(Mover mover) { 18 | MoverToTrack newMover = new MoverToTrack(); 19 | newMover.mover = mover; 20 | newMover.initialPos = mover.transform.position; 21 | newMover.initialRot = mover.transform.eulerAngles; 22 | newMover.positions = new List(); 23 | newMover.rotations = new List(); 24 | moversToTrack.Add(newMover); 25 | } 26 | 27 | public static void Init() { 28 | undoIndex = 0; 29 | moversToTrack.Clear(); 30 | } 31 | 32 | public static void AddToUndoStack() { 33 | foreach (MoverToTrack m in moversToTrack) { 34 | m.positions.Add(Vector3Int.RoundToInt(m.mover.transform.position)); 35 | m.rotations.Add(Vector3Int.RoundToInt(m.mover.transform.eulerAngles)); 36 | } 37 | } 38 | 39 | public static void RemoveFromUndoStack() { 40 | foreach (MoverToTrack m in moversToTrack) { 41 | m.positions.RemoveAt(m.positions.Count - 1); 42 | m.rotations.RemoveAt(m.rotations.Count - 1); 43 | m.mover.transform.position = m.positions[m.positions.Count - 1]; 44 | m.mover.transform.eulerAngles = m.rotations[m.rotations.Count - 1]; 45 | } 46 | } 47 | 48 | public static void OnMoveComplete() { 49 | undoIndex++; 50 | AddToUndoStack(); 51 | } 52 | 53 | public static void DoUndo() { 54 | if (undoIndex > 0) { 55 | undoIndex--; 56 | RemoveFromUndoStack(); 57 | foreach (var item in Game.movers) 58 | { 59 | item.isFalling = false; 60 | } 61 | } 62 | } 63 | 64 | public static void DoReset() { 65 | foreach (MoverToTrack m in moversToTrack) { 66 | m.mover.transform.position = m.initialPos; 67 | m.mover.transform.eulerAngles = m.initialRot; 68 | } 69 | OnMoveComplete(); 70 | foreach (var item in Game.movers) 71 | { 72 | item.isFalling = false; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Scripts/Editor/LevelPlayModePersistence.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | public class LevelPlayModePersistence 7 | { 8 | static string textFilePath { get { return Application.persistentDataPath + "/playmodechanges.txt"; } } 9 | 10 | public struct Job { 11 | public string name; 12 | public Vector3 position; 13 | public Vector3 eulerAngles; 14 | } 15 | 16 | public static Job[] GetJobs() { 17 | List jobs = new List(); 18 | if (File.Exists(textFilePath)) { 19 | string[] lines = File.ReadAllLines(textFilePath); 20 | foreach (string line in lines) { 21 | string[] split = line.Split('|'); 22 | Job newJob = new Job(); 23 | if (line.Contains("clear")) { 24 | newJob.name = split[0]; 25 | newJob.position = Vec3FromStrings(split[1], split[2], split[3]); 26 | } else if (line.Contains("newobject")) { 27 | newJob.name = split[1]; 28 | newJob.position = Vec3FromStrings(split[2], split[3], split[4]); 29 | newJob.eulerAngles = Vec3FromStrings(split[5], split[6], split[7]); 30 | } 31 | jobs.Add(newJob); 32 | } 33 | File.Delete(textFilePath); 34 | } 35 | return jobs.ToArray(); 36 | } 37 | 38 | static Vector3 Vec3FromStrings(string stringX, string stringY, string stringZ) { 39 | int x, y, z; 40 | if (Int32.TryParse(stringX, out x)) { 41 | if (Int32.TryParse(stringY, out y)) { 42 | if (Int32.TryParse(stringZ, out z)) { 43 | return new Vector3(x, y, z); 44 | } 45 | } 46 | } 47 | return Vector3.zero; 48 | } 49 | 50 | public static void SaveNewObject(GameObject go) { 51 | Vector3Int p = Utils.Vec3ToInt(go.transform.position); 52 | Vector3Int r = Utils.Vec3ToInt(go.transform.eulerAngles); 53 | string s = "newobject|" + go.transform.name + "|" + p.x + "|" + p.y + "|" + p.z + "|" + r.x + "|" + r.y + "|" + r.z; 54 | WriteText(s); 55 | } 56 | 57 | public static void ClearAtPosition(Vector3 vector3) { 58 | Vector3Int v = Utils.Vec3ToInt(vector3); 59 | string s = "clear|" + v.x + "|" + v.y + "|" + v.z; 60 | WriteText(s); 61 | } 62 | 63 | static void WriteText(string newText) { 64 | List lines = new List(); 65 | lines.Add(newText); 66 | File.AppendAllLines(textFilePath, lines); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Assets/Resources/ggg.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83fbbdb88d9345444a836e65d6f766fc 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 32 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 32 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 1 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | spriteSheet: 87 | serializedVersion: 2 88 | sprites: [] 89 | outline: [] 90 | physicsShape: [] 91 | bones: [] 92 | spriteID: 93 | internalID: 0 94 | vertices: [] 95 | indices: 96 | edges: [] 97 | weights: [] 98 | secondaryTextures: [] 99 | spritePackingTag: 100 | pSDRemoveMatte: 0 101 | pSDShowRemoveMatteOption: 0 102 | userData: 103 | assetBundleName: 104 | assetBundleVariant: 105 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | public class Player : Mover { 6 | 7 | public static Player instance { get; private set; } 8 | Vector3Int direction = Vector3Int.zero; 9 | 10 | float prevHorInput = 0; 11 | float prevVerInput = 0; 12 | 13 | public List InputBuffer = new List(); 14 | 15 | void Awake() { 16 | instance = this; 17 | } 18 | 19 | void Update() { 20 | if (!Game.instance.holdingUndo) { 21 | BufferInput(); 22 | } 23 | 24 | if (CanInput()) { 25 | CheckBufferedInput(); 26 | } 27 | } 28 | 29 | public bool CanInput() { 30 | return !Game.instance.isMoving && !Game.instance.holdingUndo; 31 | } 32 | 33 | public void ClearInputBuffer() { 34 | InputBuffer.Clear(); 35 | prevHorInput = 0; 36 | prevVerInput = 0; 37 | direction = Vector3Int.zero; 38 | } 39 | 40 | public void BufferInput() { 41 | 42 | float newHor = Input.GetAxisRaw("Horizontal"); 43 | float newVer = Input.GetAxisRaw("Vertical"); 44 | 45 | bool shouldBufferInput = 46 | (newHor != prevHorInput || newVer != prevVerInput) && //input is different from last time it was checked 47 | !((newHor == 0 && newVer == prevVerInput) || (newVer == 0 && newHor == prevHorInput)); //the change isn't just due to releasing a key 48 | 49 | Vector3Int dir = Vector3Int.zero; 50 | 51 | if (InputBuffer.Count == 0) 52 | { 53 | if (shouldBufferInput || CanInput() ) { 54 | dir = CalculateNewDirFromInput(direction); 55 | } 56 | } 57 | else 58 | { 59 | if (shouldBufferInput) { 60 | dir = CalculateNewDirFromInput(InputBuffer.Last()); 61 | } 62 | } 63 | 64 | if (dir != Vector3Int.zero) { 65 | InputBuffer.Add(dir); 66 | } 67 | 68 | prevHorInput = newHor; 69 | prevVerInput = newVer; 70 | } 71 | 72 | public void CheckBufferedInput() { 73 | 74 | if (InputBuffer.Count == 0) { 75 | return; 76 | } 77 | 78 | direction = InputBuffer.First(); 79 | InputBuffer.RemoveAt(0); 80 | 81 | if (TryPlanMove(direction)) { 82 | Game.instance.MoveStart(); 83 | } 84 | 85 | } 86 | 87 | public Vector3Int CalculateNewDirFromInput(Vector3Int currentDir) { 88 | 89 | float hor = Input.GetAxisRaw("Horizontal"); 90 | float ver = Input.GetAxisRaw("Vertical"); 91 | 92 | if (hor == 0 && ver == 0) { 93 | return Vector3Int.zero; 94 | } 95 | 96 | if (hor != 0 && ver != 0) { 97 | if (currentDir == Vector3Int.right || currentDir == Vector3Int.left) { 98 | hor = 0; 99 | } 100 | else { 101 | ver = 0; 102 | } 103 | } 104 | 105 | if (hor == 1) { 106 | return Vector3Int.right; 107 | } 108 | else if (hor == -1) { 109 | return Vector3Int.left; 110 | } 111 | else if (ver == -1) { 112 | return Vector3Int.down; 113 | } 114 | else if (ver == 1) { 115 | return Vector3Int.up; 116 | } 117 | 118 | return Vector3Int.zero; 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /Assets/Scripts/Mover.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections; 3 | using UnityEngine; 4 | using DG.Tweening; 5 | 6 | public class Mover : MonoBehaviour { 7 | 8 | public List tiles = new List(); 9 | [HideInInspector] public bool isFalling = false; 10 | public bool isPlayer { get { return CompareTag("Player"); }} 11 | 12 | // During a movement cycle, what's the next move (as a difference 13 | // from its current position) that this Mover will try to make? 14 | private Vector3Int PlannedMove; 15 | 16 | void Start() { 17 | CreateTiles(); 18 | } 19 | 20 | void CreateTiles() { 21 | tiles.Clear(); 22 | foreach (Transform child in transform) { 23 | if (child.gameObject.CompareTag("Tile")) { 24 | Tile tile = new Tile(); 25 | tile.t = child; 26 | tiles.Add(tile); 27 | } 28 | } 29 | } 30 | 31 | public void Stop() 32 | { 33 | PlannedMove = Vector3Int.zero; 34 | } 35 | 36 | public Vector3Int Pos() 37 | { 38 | return Vector3Int.RoundToInt(transform.position); 39 | } 40 | 41 | // Try to plan a move in the indicated direction, if that move 42 | // is valid. 43 | public bool TryPlanMove(Vector3Int dir) 44 | { 45 | if (!CanMoveToward(dir)) 46 | return false; 47 | PlanMove(dir); 48 | return true; 49 | } 50 | 51 | private void PlanMove(Vector3Int dir) 52 | { 53 | // Optional optimization - avoid redundant pushes 54 | // with many multi-tile movers. Slightly fragile. 55 | if (PlannedMove == dir) return; 56 | 57 | PlannedMove = dir; 58 | PlanPushes(dir); 59 | } 60 | 61 | public bool HasPlannedMove() 62 | { 63 | return PlannedMove != Vector3Int.zero; 64 | } 65 | 66 | // If there are other movers in the given direction, 67 | // push them in the same direction. Does not check whether 68 | // the move is possible - assumes that CanMoveToward() 69 | // already checked. 70 | private void PlanPushes(Vector3Int dir) 71 | { 72 | foreach (Tile tile in tiles) { 73 | Vector3Int posToCheck = tile.pos + dir; 74 | Mover m = Utils.GetMoverAtPos(posToCheck); 75 | if (m == null || m == this) continue; 76 | m.PlanMove(dir); 77 | } 78 | } 79 | 80 | // Perform the currently planned move (if any). 81 | public bool ExecuteLogicalMove() 82 | { 83 | if (PlannedMove == Vector3Int.zero) 84 | return false; 85 | 86 | transform.position = Pos() + PlannedMove; 87 | PlannedMove = Vector3Int.zero; 88 | return true; 89 | } 90 | 91 | // Handle effects that happen after moving, such as 92 | // planning to fall. 93 | public void DoPostMoveEffects() 94 | { 95 | if (ShouldFall()) 96 | PlanMove(Utils.forward); 97 | } 98 | 99 | public virtual bool CanMoveToward(Vector3Int dir) { 100 | foreach (Tile tile in tiles) { 101 | Vector3Int posToCheck = tile.pos + dir; 102 | if (Utils.WallIsAtPos(posToCheck)) { 103 | return false; 104 | } 105 | Mover m = Utils.GetMoverAtPos(posToCheck); 106 | // Movers don't block themselves. 107 | if (m == null || m == this) 108 | continue; 109 | // Only the player can push other movers, 110 | // unless we're in polyban mode. 111 | if (!isPlayer && !Game.isPolyban) 112 | return false; 113 | // XXX: could this cause an infinite loop with, say, 114 | // a U-shaped block and a single block inside, or two 115 | // interlocking U-blocks? We can fix this by passing 116 | // in (& ignoring) the set of already checked movers. 117 | if (!m.CanMoveToward(dir)) 118 | return false; 119 | } 120 | 121 | return true; 122 | } 123 | 124 | public virtual bool ShouldFall() { 125 | if (GroundBelow()) { 126 | return false; 127 | } 128 | return true; 129 | } 130 | 131 | public bool GroundBelow() { 132 | foreach (Tile tile in tiles) 133 | { 134 | if (tile.pos.z == 0) 135 | return true; 136 | if (GroundBelowTile(tile)) { 137 | return true; 138 | } 139 | } 140 | return false; 141 | } 142 | 143 | bool GroundBelowTile(Tile tile) { 144 | Vector3Int posToCheck = tile.pos + Utils.forward; 145 | if (Utils.WallIsAtPos(posToCheck)) { 146 | return true; 147 | } 148 | Mover m = Utils.GetMoverAtPos(posToCheck); 149 | if (m != null && m != this && !m.isFalling) { 150 | return true; 151 | } 152 | return false; 153 | } 154 | 155 | void OnDrawGizmosSelected() { 156 | if (!Application.isPlaying) { 157 | CreateTiles(); 158 | } 159 | Gizmos.color = Color.blue; 160 | foreach (Tile tile in tiles) { 161 | Gizmos.DrawWireCube(tile.pos, Vector3.one); 162 | } 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /Assets/Prefabs/Player.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1901100930070865470 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4974908124504097106} 12 | - component: {fileID: 7471294423147614930} 13 | m_Layer: 0 14 | m_Name: Tile (1) 15 | m_TagString: Tile 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4974908124504097106 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 1901100930070865470} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 8509588148537724625} 32 | m_RootOrder: 1 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!65 &7471294423147614930 35 | BoxCollider: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 1901100930070865470} 41 | m_Material: {fileID: 0} 42 | m_IsTrigger: 0 43 | m_Enabled: 1 44 | serializedVersion: 2 45 | m_Size: {x: 1, y: 1, z: 1} 46 | m_Center: {x: 0, y: 0, z: 0} 47 | --- !u!1 &5253667524764959070 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 7114157101527145265} 56 | - component: {fileID: 1047433341729590893} 57 | - component: {fileID: 1530213638444738615} 58 | m_Layer: 0 59 | m_Name: Cube 60 | m_TagString: Untagged 61 | m_Icon: {fileID: 0} 62 | m_NavMeshLayer: 0 63 | m_StaticEditorFlags: 0 64 | m_IsActive: 1 65 | --- !u!4 &7114157101527145265 66 | Transform: 67 | m_ObjectHideFlags: 0 68 | m_CorrespondingSourceObject: {fileID: 0} 69 | m_PrefabInstance: {fileID: 0} 70 | m_PrefabAsset: {fileID: 0} 71 | m_GameObject: {fileID: 5253667524764959070} 72 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 73 | m_LocalPosition: {x: 0, y: 0, z: 0} 74 | m_LocalScale: {x: 1, y: 1, z: 1} 75 | m_Children: [] 76 | m_Father: {fileID: 8509588148537724625} 77 | m_RootOrder: 0 78 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 79 | --- !u!33 &1047433341729590893 80 | MeshFilter: 81 | m_ObjectHideFlags: 0 82 | m_CorrespondingSourceObject: {fileID: 0} 83 | m_PrefabInstance: {fileID: 0} 84 | m_PrefabAsset: {fileID: 0} 85 | m_GameObject: {fileID: 5253667524764959070} 86 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 87 | --- !u!23 &1530213638444738615 88 | MeshRenderer: 89 | m_ObjectHideFlags: 0 90 | m_CorrespondingSourceObject: {fileID: 0} 91 | m_PrefabInstance: {fileID: 0} 92 | m_PrefabAsset: {fileID: 0} 93 | m_GameObject: {fileID: 5253667524764959070} 94 | m_Enabled: 1 95 | m_CastShadows: 1 96 | m_ReceiveShadows: 1 97 | m_DynamicOccludee: 1 98 | m_MotionVectors: 1 99 | m_LightProbeUsage: 1 100 | m_ReflectionProbeUsage: 1 101 | m_RayTracingMode: 2 102 | m_RenderingLayerMask: 1 103 | m_RendererPriority: 0 104 | m_Materials: 105 | - {fileID: 2100000, guid: 621289ea652466b43a21e2684628488a, type: 2} 106 | m_StaticBatchInfo: 107 | firstSubMesh: 0 108 | subMeshCount: 0 109 | m_StaticBatchRoot: {fileID: 0} 110 | m_ProbeAnchor: {fileID: 0} 111 | m_LightProbeVolumeOverride: {fileID: 0} 112 | m_ScaleInLightmap: 1 113 | m_ReceiveGI: 1 114 | m_PreserveUVs: 0 115 | m_IgnoreNormalsForChartDetection: 0 116 | m_ImportantGI: 0 117 | m_StitchLightmapSeams: 0 118 | m_SelectedEditorRenderState: 3 119 | m_MinimumChartSize: 4 120 | m_AutoUVMaxDistance: 0.5 121 | m_AutoUVMaxAngle: 89 122 | m_LightmapParameters: {fileID: 0} 123 | m_SortingLayerID: 0 124 | m_SortingLayer: 0 125 | m_SortingOrder: 0 126 | --- !u!1 &8790303023509255344 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 8509588148537724625} 135 | - component: {fileID: 2122996217392361326} 136 | m_Layer: 0 137 | m_Name: Player 138 | m_TagString: Player 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!4 &8509588148537724625 144 | Transform: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 8790303023509255344} 150 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 151 | m_LocalPosition: {x: 0, y: 0, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_Children: 154 | - {fileID: 7114157101527145265} 155 | - {fileID: 4974908124504097106} 156 | m_Father: {fileID: 0} 157 | m_RootOrder: 0 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | --- !u!114 &2122996217392361326 160 | MonoBehaviour: 161 | m_ObjectHideFlags: 0 162 | m_CorrespondingSourceObject: {fileID: 0} 163 | m_PrefabInstance: {fileID: 0} 164 | m_PrefabAsset: {fileID: 0} 165 | m_GameObject: {fileID: 8790303023509255344} 166 | m_Enabled: 1 167 | m_EditorHideFlags: 0 168 | m_Script: {fileID: 11500000, guid: bc8093f936db2cc4280fa562d94bb49a, type: 3} 169 | m_Name: 170 | m_EditorClassIdentifier: 171 | goalPosition: {x: 0, y: 0, z: 0} 172 | isFalling: 0 173 | -------------------------------------------------------------------------------- /Assets/Prefabs/Crate.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4054103116398986468 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7434155334459483016} 12 | - component: {fileID: 3525490266949364210} 13 | m_Layer: 0 14 | m_Name: Tile (1) 15 | m_TagString: Tile 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &7434155334459483016 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 4054103116398986468} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 6068918406776286219} 32 | m_RootOrder: 1 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!65 &3525490266949364210 35 | BoxCollider: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 4054103116398986468} 41 | m_Material: {fileID: 0} 42 | m_IsTrigger: 0 43 | m_Enabled: 1 44 | serializedVersion: 2 45 | m_Size: {x: 1, y: 1, z: 1} 46 | m_Center: {x: 0, y: 0, z: 0} 47 | --- !u!1 &6619286987503457898 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 6068918406776286219} 56 | - component: {fileID: 2878492427237162609} 57 | m_Layer: 0 58 | m_Name: Crate 59 | m_TagString: Untagged 60 | m_Icon: {fileID: 0} 61 | m_NavMeshLayer: 0 62 | m_StaticEditorFlags: 0 63 | m_IsActive: 1 64 | --- !u!4 &6068918406776286219 65 | Transform: 66 | m_ObjectHideFlags: 0 67 | m_CorrespondingSourceObject: {fileID: 0} 68 | m_PrefabInstance: {fileID: 0} 69 | m_PrefabAsset: {fileID: 0} 70 | m_GameObject: {fileID: 6619286987503457898} 71 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 72 | m_LocalPosition: {x: 0, y: 0, z: 0} 73 | m_LocalScale: {x: 1, y: 1, z: 1} 74 | m_Children: 75 | - {fileID: 4655473271013439979} 76 | - {fileID: 7434155334459483016} 77 | m_Father: {fileID: 0} 78 | m_RootOrder: 0 79 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 80 | --- !u!114 &2878492427237162609 81 | MonoBehaviour: 82 | m_ObjectHideFlags: 0 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | m_GameObject: {fileID: 6619286987503457898} 87 | m_Enabled: 1 88 | m_EditorHideFlags: 0 89 | m_Script: {fileID: 11500000, guid: 1b1ed8a0cca287042822fec34f4a0355, type: 3} 90 | m_Name: 91 | m_EditorClassIdentifier: 92 | goalPosition: {x: 0, y: 0, z: 0} 93 | isFalling: 0 94 | --- !u!1 &7694899899188568964 95 | GameObject: 96 | m_ObjectHideFlags: 0 97 | m_CorrespondingSourceObject: {fileID: 0} 98 | m_PrefabInstance: {fileID: 0} 99 | m_PrefabAsset: {fileID: 0} 100 | serializedVersion: 6 101 | m_Component: 102 | - component: {fileID: 4655473271013439979} 103 | - component: {fileID: 3217887234833034423} 104 | - component: {fileID: 3971446193249651437} 105 | m_Layer: 0 106 | m_Name: Cube 107 | m_TagString: Untagged 108 | m_Icon: {fileID: 0} 109 | m_NavMeshLayer: 0 110 | m_StaticEditorFlags: 0 111 | m_IsActive: 1 112 | --- !u!4 &4655473271013439979 113 | Transform: 114 | m_ObjectHideFlags: 0 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInstance: {fileID: 0} 117 | m_PrefabAsset: {fileID: 0} 118 | m_GameObject: {fileID: 7694899899188568964} 119 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 120 | m_LocalPosition: {x: 0, y: 0, z: 0} 121 | m_LocalScale: {x: 0.95, y: 0.95, z: 0.95} 122 | m_Children: [] 123 | m_Father: {fileID: 6068918406776286219} 124 | m_RootOrder: 0 125 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 126 | --- !u!33 &3217887234833034423 127 | MeshFilter: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | m_GameObject: {fileID: 7694899899188568964} 133 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 134 | --- !u!23 &3971446193249651437 135 | MeshRenderer: 136 | m_ObjectHideFlags: 0 137 | m_CorrespondingSourceObject: {fileID: 0} 138 | m_PrefabInstance: {fileID: 0} 139 | m_PrefabAsset: {fileID: 0} 140 | m_GameObject: {fileID: 7694899899188568964} 141 | m_Enabled: 1 142 | m_CastShadows: 1 143 | m_ReceiveShadows: 1 144 | m_DynamicOccludee: 1 145 | m_MotionVectors: 1 146 | m_LightProbeUsage: 1 147 | m_ReflectionProbeUsage: 1 148 | m_RayTracingMode: 2 149 | m_RenderingLayerMask: 1 150 | m_RendererPriority: 0 151 | m_Materials: 152 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 153 | m_StaticBatchInfo: 154 | firstSubMesh: 0 155 | subMeshCount: 0 156 | m_StaticBatchRoot: {fileID: 0} 157 | m_ProbeAnchor: {fileID: 0} 158 | m_LightProbeVolumeOverride: {fileID: 0} 159 | m_ScaleInLightmap: 1 160 | m_ReceiveGI: 1 161 | m_PreserveUVs: 0 162 | m_IgnoreNormalsForChartDetection: 0 163 | m_ImportantGI: 0 164 | m_StitchLightmapSeams: 0 165 | m_SelectedEditorRenderState: 3 166 | m_MinimumChartSize: 4 167 | m_AutoUVMaxDistance: 0.5 168 | m_AutoUVMaxAngle: 89 169 | m_LightmapParameters: {fileID: 0} 170 | m_SortingLayerID: 0 171 | m_SortingLayer: 0 172 | m_SortingOrder: 0 173 | -------------------------------------------------------------------------------- /Assets/Prefabs/Wall.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5692759869958202138 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1099415796666649822} 12 | - component: {fileID: 4954479792080201763} 13 | m_Layer: 0 14 | m_Name: Tile (1) 15 | m_TagString: Tile 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1099415796666649822 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5692759869958202138} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 5973261170498615863} 32 | m_RootOrder: 1 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!65 &4954479792080201763 35 | BoxCollider: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 5692759869958202138} 41 | m_Material: {fileID: 0} 42 | m_IsTrigger: 0 43 | m_Enabled: 1 44 | serializedVersion: 2 45 | m_Size: {x: 1, y: 1, z: 1} 46 | m_Center: {x: 0, y: 0, z: 0} 47 | --- !u!1 &6701363049561620566 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 5973261170498615863} 56 | - component: {fileID: 114034132245833584} 57 | m_Layer: 0 58 | m_Name: Wall 59 | m_TagString: Untagged 60 | m_Icon: {fileID: 0} 61 | m_NavMeshLayer: 0 62 | m_StaticEditorFlags: 0 63 | m_IsActive: 1 64 | --- !u!4 &5973261170498615863 65 | Transform: 66 | m_ObjectHideFlags: 0 67 | m_CorrespondingSourceObject: {fileID: 0} 68 | m_PrefabInstance: {fileID: 0} 69 | m_PrefabAsset: {fileID: 0} 70 | m_GameObject: {fileID: 6701363049561620566} 71 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 72 | m_LocalPosition: {x: 0, y: 0, z: 0} 73 | m_LocalScale: {x: 1, y: 1, z: 1} 74 | m_Children: 75 | - {fileID: 5064289018449637335} 76 | - {fileID: 1099415796666649822} 77 | m_Father: {fileID: 0} 78 | m_RootOrder: 0 79 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 80 | --- !u!114 &114034132245833584 81 | MonoBehaviour: 82 | m_ObjectHideFlags: 0 83 | m_CorrespondingSourceObject: {fileID: 0} 84 | m_PrefabInstance: {fileID: 0} 85 | m_PrefabAsset: {fileID: 0} 86 | m_GameObject: {fileID: 6701363049561620566} 87 | m_Enabled: 1 88 | m_EditorHideFlags: 0 89 | m_Script: {fileID: 11500000, guid: 1452f68fd32741e4bb8a0456d52aa658, type: 3} 90 | m_Name: 91 | m_EditorClassIdentifier: 92 | isStatic: 1 93 | tiles: 94 | - {fileID: 1099415796666649822} 95 | --- !u!1 &7788323482963293624 96 | GameObject: 97 | m_ObjectHideFlags: 0 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInstance: {fileID: 0} 100 | m_PrefabAsset: {fileID: 0} 101 | serializedVersion: 6 102 | m_Component: 103 | - component: {fileID: 5064289018449637335} 104 | - component: {fileID: 3059161469363059339} 105 | - component: {fileID: 3585147897432759505} 106 | m_Layer: 0 107 | m_Name: Cube 108 | m_TagString: Untagged 109 | m_Icon: {fileID: 0} 110 | m_NavMeshLayer: 0 111 | m_StaticEditorFlags: 0 112 | m_IsActive: 1 113 | --- !u!4 &5064289018449637335 114 | Transform: 115 | m_ObjectHideFlags: 0 116 | m_CorrespondingSourceObject: {fileID: 0} 117 | m_PrefabInstance: {fileID: 0} 118 | m_PrefabAsset: {fileID: 0} 119 | m_GameObject: {fileID: 7788323482963293624} 120 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 121 | m_LocalPosition: {x: 0, y: 0, z: 0} 122 | m_LocalScale: {x: 0.98, y: 0.98, z: 0.98} 123 | m_Children: [] 124 | m_Father: {fileID: 5973261170498615863} 125 | m_RootOrder: 0 126 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 127 | --- !u!33 &3059161469363059339 128 | MeshFilter: 129 | m_ObjectHideFlags: 0 130 | m_CorrespondingSourceObject: {fileID: 0} 131 | m_PrefabInstance: {fileID: 0} 132 | m_PrefabAsset: {fileID: 0} 133 | m_GameObject: {fileID: 7788323482963293624} 134 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 135 | --- !u!23 &3585147897432759505 136 | MeshRenderer: 137 | m_ObjectHideFlags: 0 138 | m_CorrespondingSourceObject: {fileID: 0} 139 | m_PrefabInstance: {fileID: 0} 140 | m_PrefabAsset: {fileID: 0} 141 | m_GameObject: {fileID: 7788323482963293624} 142 | m_Enabled: 1 143 | m_CastShadows: 1 144 | m_ReceiveShadows: 1 145 | m_DynamicOccludee: 1 146 | m_MotionVectors: 1 147 | m_LightProbeUsage: 1 148 | m_ReflectionProbeUsage: 1 149 | m_RayTracingMode: 2 150 | m_RenderingLayerMask: 1 151 | m_RendererPriority: 0 152 | m_Materials: 153 | - {fileID: 2100000, guid: 21388ff69936f6e45ac36e0570c22cbe, type: 2} 154 | m_StaticBatchInfo: 155 | firstSubMesh: 0 156 | subMeshCount: 0 157 | m_StaticBatchRoot: {fileID: 0} 158 | m_ProbeAnchor: {fileID: 0} 159 | m_LightProbeVolumeOverride: {fileID: 0} 160 | m_ScaleInLightmap: 1 161 | m_ReceiveGI: 1 162 | m_PreserveUVs: 0 163 | m_IgnoreNormalsForChartDetection: 0 164 | m_ImportantGI: 0 165 | m_StitchLightmapSeams: 0 166 | m_SelectedEditorRenderState: 3 167 | m_MinimumChartSize: 4 168 | m_AutoUVMaxDistance: 0.5 169 | m_AutoUVMaxAngle: 89 170 | m_LightmapParameters: {fileID: 0} 171 | m_SortingLayerID: 0 172 | m_SortingLayer: 0 173 | m_SortingOrder: 0 174 | -------------------------------------------------------------------------------- /Assets/Prefabs/WallAlt.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &753047501161311885 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 2315142954260444386} 12 | - component: {fileID: 5481621139071001022} 13 | - component: {fileID: 6316284473341954020} 14 | m_Layer: 0 15 | m_Name: Cube 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &2315142954260444386 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 753047501161311885} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 0.98, y: 0.98, z: 0.98} 31 | m_Children: [] 32 | m_Father: {fileID: 3784073879146668290} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!33 &5481621139071001022 36 | MeshFilter: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 753047501161311885} 42 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 43 | --- !u!23 &6316284473341954020 44 | MeshRenderer: 45 | m_ObjectHideFlags: 0 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInstance: {fileID: 0} 48 | m_PrefabAsset: {fileID: 0} 49 | m_GameObject: {fileID: 753047501161311885} 50 | m_Enabled: 1 51 | m_CastShadows: 1 52 | m_ReceiveShadows: 1 53 | m_DynamicOccludee: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_RayTracingMode: 2 58 | m_RenderingLayerMask: 1 59 | m_RendererPriority: 0 60 | m_Materials: 61 | - {fileID: 2100000, guid: 470a0e52db2e6c94e81795671c4272d6, type: 2} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_ReceiveGI: 1 70 | m_PreserveUVs: 0 71 | m_IgnoreNormalsForChartDetection: 0 72 | m_ImportantGI: 0 73 | m_StitchLightmapSeams: 0 74 | m_SelectedEditorRenderState: 3 75 | m_MinimumChartSize: 4 76 | m_AutoUVMaxDistance: 0.5 77 | m_AutoUVMaxAngle: 89 78 | m_LightmapParameters: {fileID: 0} 79 | m_SortingLayerID: 0 80 | m_SortingLayer: 0 81 | m_SortingOrder: 0 82 | --- !u!1 &1425795524514105852 83 | GameObject: 84 | m_ObjectHideFlags: 0 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInstance: {fileID: 0} 87 | m_PrefabAsset: {fileID: 0} 88 | serializedVersion: 6 89 | m_Component: 90 | - component: {fileID: 7762913653160938612} 91 | - component: {fileID: 1518659297503261809} 92 | m_Layer: 0 93 | m_Name: Tile (1) 94 | m_TagString: Tile 95 | m_Icon: {fileID: 0} 96 | m_NavMeshLayer: 0 97 | m_StaticEditorFlags: 0 98 | m_IsActive: 1 99 | --- !u!4 &7762913653160938612 100 | Transform: 101 | m_ObjectHideFlags: 0 102 | m_CorrespondingSourceObject: {fileID: 0} 103 | m_PrefabInstance: {fileID: 0} 104 | m_PrefabAsset: {fileID: 0} 105 | m_GameObject: {fileID: 1425795524514105852} 106 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 107 | m_LocalPosition: {x: 0, y: 0, z: 0} 108 | m_LocalScale: {x: 1, y: 1, z: 1} 109 | m_Children: [] 110 | m_Father: {fileID: 3784073879146668290} 111 | m_RootOrder: 1 112 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 113 | --- !u!65 &1518659297503261809 114 | BoxCollider: 115 | m_ObjectHideFlags: 0 116 | m_CorrespondingSourceObject: {fileID: 0} 117 | m_PrefabInstance: {fileID: 0} 118 | m_PrefabAsset: {fileID: 0} 119 | m_GameObject: {fileID: 1425795524514105852} 120 | m_Material: {fileID: 0} 121 | m_IsTrigger: 0 122 | m_Enabled: 1 123 | serializedVersion: 2 124 | m_Size: {x: 1, y: 1, z: 1} 125 | m_Center: {x: 0, y: 0, z: 0} 126 | --- !u!1 &4280377291296971619 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 3784073879146668290} 135 | - component: {fileID: 114917584228478976} 136 | m_Layer: 0 137 | m_Name: WallAlt 138 | m_TagString: Untagged 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!4 &3784073879146668290 144 | Transform: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 4280377291296971619} 150 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 151 | m_LocalPosition: {x: 0, y: 0, z: 0} 152 | m_LocalScale: {x: 1, y: 1, z: 1} 153 | m_Children: 154 | - {fileID: 2315142954260444386} 155 | - {fileID: 7762913653160938612} 156 | m_Father: {fileID: 0} 157 | m_RootOrder: 0 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | --- !u!114 &114917584228478976 160 | MonoBehaviour: 161 | m_ObjectHideFlags: 0 162 | m_CorrespondingSourceObject: {fileID: 0} 163 | m_PrefabInstance: {fileID: 0} 164 | m_PrefabAsset: {fileID: 0} 165 | m_GameObject: {fileID: 4280377291296971619} 166 | m_Enabled: 1 167 | m_EditorHideFlags: 0 168 | m_Script: {fileID: 11500000, guid: 1452f68fd32741e4bb8a0456d52aa658, type: 3} 169 | m_Name: 170 | m_EditorClassIdentifier: 171 | isStatic: 1 172 | tiles: 173 | - {fileID: 7762913653160938612} 174 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 2 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 40 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 1 168 | antiAliasing: 4 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 4 202 | textureQuality: 0 203 | anisotropicTextures: 1 204 | antiAliasing: 4 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Standalone: 0 227 | -------------------------------------------------------------------------------- /Assets/Scripts/Game.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEngine; 5 | using DG.Tweening; 6 | 7 | public class Game : MonoBehaviour { 8 | 9 | private static Game instanceRef; 10 | public static Game instance { 11 | get { 12 | if (instanceRef == null) { 13 | instanceRef = FindObjectOfType(); 14 | } 15 | return instanceRef; 16 | } 17 | } 18 | 19 | public LogicalGrid Grid = new LogicalGrid(); 20 | 21 | public static List movers = new List(); 22 | public static List walls = new List(); 23 | 24 | public float moveTime = 0.18f; // time it takes to move 1 unit 25 | public float fallTime = 0.1f; // time it takes to fall 1 unit 26 | public float moveBufferSpeedupFactor = 0.5f; //degree of speedup due to buffered inputs 27 | 28 | public Ease moveEase = Ease.Linear; 29 | 30 | private int movingCount = 0; 31 | private List> PlannedMoves = new List>(); 32 | 33 | public bool holdingUndo { get; private set; } = false; 34 | public static bool isPolyban = true; 35 | public bool blockInput = false; 36 | 37 | void Awake() { 38 | if (instanceRef == null || instanceRef == this) { 39 | instanceRef = this; 40 | Application.targetFrameRate = 60; 41 | 42 | if (Application.isEditor && !SaveData.initialized) { 43 | SaveData.LoadGame(1); 44 | SyncGrid(); 45 | } 46 | } else { 47 | Debug.LogError("More than 1 Game class in scene"); 48 | } 49 | } 50 | 51 | void Start() { 52 | StartCoroutine(InitAfterFrame()); 53 | } 54 | 55 | IEnumerator InitAfterFrame() { 56 | blockInput = true; 57 | yield return WaitFor.EndOfFrame; 58 | SetReferences(); 59 | State.Init(); 60 | foreach (Mover mover in movers) { 61 | State.AddMover(mover); 62 | } 63 | State.AddToUndoStack(); 64 | blockInput = false; 65 | } 66 | 67 | public void EditorRefresh() { 68 | SetReferences(); 69 | } 70 | 71 | void SetReferences() { 72 | movers.Clear(); 73 | walls.Clear(); 74 | movers = FindObjectsOfType().ToList(); 75 | walls = FindObjectsOfType().ToList(); 76 | SyncGrid(); 77 | } 78 | 79 | void Update() { 80 | if (Input.GetKeyDown(KeyCode.Z)) { 81 | holdingUndo = true; 82 | DoUndo(); 83 | DOVirtual.DelayedCall(0.75f, UndoRepeat); 84 | 85 | } else if (Input.GetKeyDown(KeyCode.R)) { 86 | DoReset(); 87 | } 88 | if (Input.GetKeyUp(KeyCode.Z)) { 89 | StartCoroutine(StopUndoing()); 90 | } 91 | } 92 | 93 | public void Refresh() { 94 | movingCount = 0; 95 | Player.instance.ClearInputBuffer(); 96 | PlannedMoves.Clear(); 97 | foreach (var mover in movers) 98 | mover.Stop(); 99 | SyncGrid(); 100 | } 101 | 102 | public void SyncGrid() 103 | { 104 | var tiles = GameObject.FindGameObjectsWithTag("Tile"); 105 | Grid.SyncContents(tiles); 106 | } 107 | 108 | public bool isMoving { get { return movingCount > 0; } } 109 | 110 | /////////////////////////////////////////////////////////////////// UNDO / RESET 111 | 112 | void DoReset() { 113 | DOTween.KillAll(); 114 | State.DoReset(); 115 | Refresh(); 116 | EventManager.onReset?.Invoke(); 117 | } 118 | 119 | void DoUndo() 120 | { 121 | if (State.undoIndex <= 0) 122 | return; 123 | 124 | DOTween.KillAll(); 125 | if (isMoving) { 126 | CompleteMove(); 127 | } 128 | State.DoUndo(); 129 | Refresh(); 130 | EventManager.onUndo?.Invoke(); 131 | } 132 | 133 | void UndoRepeat() { 134 | if (Input.GetKey(KeyCode.Z) && holdingUndo) { 135 | DoUndo(); 136 | DOVirtual.DelayedCall(0.075f, UndoRepeat); 137 | } 138 | } 139 | 140 | IEnumerator StopUndoing() { 141 | yield return WaitFor.EndOfFrame; 142 | holdingUndo = false; 143 | } 144 | 145 | /////////////////////////////////////////////////////////////////// MOVE 146 | 147 | private struct MoverPos 148 | { 149 | public Mover m; 150 | public Vector3Int Pos; 151 | 152 | public MoverPos(Mover mov) 153 | { 154 | m = mov; 155 | Pos = mov.Pos(); 156 | } 157 | }; 158 | 159 | // Build a list of positions for each mover. 160 | private List GetMoverPositions() 161 | { 162 | var lerps = new List(); 163 | foreach (var mover in movers) { 164 | if (mover != null) { 165 | lerps.Add(new MoverPos(mover)); 166 | } 167 | } 168 | return lerps; 169 | } 170 | 171 | // MoveStart calculates the 'logical' effects of a player action, 172 | // building up a list of movements. Those are executed visually afterward. 173 | public void MoveStart(bool doPostMoveEffects = true) 174 | { 175 | // For each movement 'cycle', we store the positions of all movers. 176 | // If we wanted to, we could compress this down to only those movers which have 177 | // changed positions, though it'd be some extra work to tell when things should 178 | // start moving. (This might be important for large overworlds.) 179 | PlannedMoves.Clear(); 180 | 181 | for (int i = 0; i < 999 /*safety*/ && movers.Any(m => m.HasPlannedMove()); ++i) 182 | { 183 | PlannedMoves.Add(GetMoverPositions()); 184 | bool isPushing = false; 185 | 186 | // Execute planned moves. 187 | var moved = false; 188 | foreach (var mover in movers) { 189 | if (mover.ExecuteLogicalMove()) { 190 | if (!mover.isPlayer) isPushing = true; 191 | moved = true; 192 | } 193 | } 194 | 195 | // Update the contents of the grid. 196 | if (moved) 197 | { 198 | if (isPushing) EventManager.onPush?.Invoke(); 199 | 200 | // NOTE: if we want improved performance, we can track 201 | // which movers have actually moved and pass them in to 202 | // SyncGrid, only changing their previous & new destinations 203 | // rather than regenerating the whole grid. 204 | SyncGrid(); 205 | } 206 | 207 | // Check for follow-ups, like things starting or continuing to fall. 208 | if (doPostMoveEffects) { 209 | foreach (var mover in movers) 210 | mover.DoPostMoveEffects(); 211 | } 212 | } 213 | 214 | PlannedMoves.Add(GetMoverPositions()); 215 | 216 | // Finally, start animating the moves we just calculated. 217 | StartMoveCycle(false); 218 | // After they're all done or cancelled, we'll run CompleteMove(). 219 | } 220 | 221 | public Vector3 GetPlayerPosition() { 222 | if (PlannedMoves.Count > 0) { 223 | foreach (var move in PlannedMoves[0]) { 224 | return move.Pos; 225 | } 226 | } 227 | return Player.instance.transform.position; 228 | } 229 | 230 | private void StartMoveCycle(bool falling) 231 | { 232 | foreach (var move in PlannedMoves[0]) 233 | move.m.transform.position = move.Pos; 234 | PlannedMoves.RemoveAt(0); 235 | if (PlannedMoves.Count == 0) 236 | { 237 | CompleteMove(); 238 | return; 239 | } 240 | 241 | if (falling) { Player.instance.ClearInputBuffer(); } 242 | 243 | float dur; 244 | if (falling) 245 | { 246 | dur = fallTime; 247 | } 248 | else 249 | { 250 | dur = moveTime / (Player.instance.InputBuffer.Count()*moveBufferSpeedupFactor + 1); // increase the animation speed when moves are buffered 251 | } 252 | foreach (var move in PlannedMoves[0]) 253 | { 254 | if (move.Pos == move.m.Pos()) continue; 255 | ++movingCount; 256 | move.m.transform.DOMove(move.Pos, dur).OnComplete(MoveEnd).SetEase(moveEase); 257 | } 258 | } 259 | 260 | public void MoveEnd() { 261 | movingCount--; 262 | if (movingCount == 0) 263 | { 264 | // We assume that all move cycles after the first are falls. 265 | // This won't be true for all games (eg those with conveyors, 266 | // slippery ice, etc), so you'll need to adjust this. 267 | StartMoveCycle(true); 268 | } 269 | } 270 | 271 | public void CompleteMove() { 272 | State.OnMoveComplete(); 273 | EventManager.onMoveComplete?.Invoke(); 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | using System.Linq; 6 | 7 | public class Utils 8 | { 9 | public static List movers = new List(); 10 | 11 | // These are built into newer versions of Unity. 12 | public static Vector3Int forward { get { return new Vector3Int(0, 0, 1); } } 13 | public static Vector3Int back { get { return new Vector3Int(0, 0, -1); } } 14 | 15 | public static IEnumerator LoadScene(string scene) { 16 | yield return WaitFor.EndOfFrame; 17 | SceneManager.LoadScene(scene, LoadSceneMode.Single); 18 | } 19 | 20 | private static List allLevelsRef; 21 | public static List allLevels { 22 | get { 23 | if (allLevelsRef == null) { 24 | allLevelsRef = new List(); 25 | Object[] levels = Resources.LoadAll("Levels"); 26 | foreach (Object t in levels) { 27 | allLevelsRef.Add(t.name); 28 | } 29 | } 30 | return allLevelsRef; 31 | } 32 | } 33 | public static void RefreshLevels() { 34 | allLevelsRef = null; 35 | } 36 | 37 | public static string sceneName => SceneManager.GetActiveScene().name; 38 | public static bool isMetaScene => LevelManager.currentLevelName.Contains("0_"); 39 | 40 | public static int StringToInt(string intString) { 41 | int i = 0; 42 | if (!System.Int32.TryParse(intString, out i)) { 43 | i = 0; 44 | } 45 | return i; 46 | } 47 | 48 | public static bool Roughly(float one, float two, float tolerance = 0.5f) { 49 | return Mathf.Abs(one - two) < tolerance; 50 | } 51 | 52 | public static bool VectorRoughly(Vector3 one, Vector3 two, float t = 0.5f) { 53 | return Roughly(one.x, two.x, t) && Roughly(one.y, two.y, t) && Roughly(one.z, two.z, t); 54 | } 55 | 56 | public static bool VectorRoughly2D(Vector3 one, Vector3 two, float t = 0.5f) { 57 | return Roughly(one.x, two.x, t) && Roughly(one.y, two.y, t); 58 | } 59 | 60 | public static void RoundPosition(Transform t) { 61 | Vector3 p = t.position; 62 | t.position = Vec3ToInt(p); 63 | } 64 | 65 | public static void RoundRotation(Transform t) { 66 | Vector3 r = t.eulerAngles; 67 | r = StandardizeRotation(r); 68 | t.eulerAngles = Vec3ToInt(r); 69 | } 70 | 71 | public static Vector3 StandardizeRotation(Vector3 v) { 72 | 73 | if (v.z < -5) { 74 | float z = v.z; 75 | while (z < 0) { 76 | z += 360; 77 | } 78 | return new Vector3(v.x, v.y, z); 79 | 80 | } else if (v.z > 355) { 81 | float z = v.z; 82 | while (z > 355) { 83 | z -= 360; 84 | } 85 | return new Vector3(v.x, v.y, z); 86 | 87 | } else { 88 | return v; 89 | } 90 | } 91 | 92 | public static void AvoidIntersect(Transform root) { 93 | bool intersecting = true; 94 | while (intersecting) { 95 | intersecting = false; 96 | foreach (Transform tile in root) { 97 | if (tile.gameObject.CompareTag("Tile")) { 98 | Mover m = GetMoverAtPos(tile.position); 99 | if (m != null && m.transform != root) { 100 | root.position += Vector3.back; 101 | intersecting = true; 102 | } else { 103 | Wall wall = GetWallAtPos(tile.position); 104 | if (wall != null && wall.transform != root) { 105 | root.position += Vector3.back; 106 | intersecting = true; 107 | } 108 | } 109 | } 110 | } 111 | } 112 | } 113 | 114 | public static Vector3 AvoidIntersect(Vector3 v) { 115 | bool intersecting = true; 116 | while (intersecting) { 117 | intersecting = false; 118 | 119 | if (!TileIsEmpty(v)) { 120 | v += Vector3.back; 121 | intersecting = true; 122 | } 123 | } 124 | return v; 125 | } 126 | 127 | public static Vector3Int Vec3ToInt(Vector3 v) { 128 | return Vector3Int.RoundToInt(v); 129 | } 130 | 131 | public static bool TileIsEmpty(Vector3 pos, bool ignorePlayer) { 132 | return TileIsEmpty(Vec3ToInt(pos), ignorePlayer); 133 | } 134 | 135 | public static bool TileIsEmpty(Vector3Int pos, bool ignorePlayer) { 136 | if (WallIsAtPos(pos)) return false; 137 | Mover m = GetMoverAtPos(pos); 138 | if (m != null && !m.isPlayer) return false; 139 | return true; 140 | } 141 | 142 | public static bool TileIsEmpty(Vector3 pos) { 143 | return TileIsEmpty(Vec3ToInt(pos)); 144 | } 145 | 146 | public static bool TileIsEmpty(Vector3Int pos) { 147 | return WallIsAtPos(pos) == false && MoverIsAtPos(pos) == false; 148 | } 149 | 150 | private static HashSet GetTilesAt(Vector3Int pos) 151 | { 152 | if (Game.instance == null) return new HashSet(); 153 | return Game.instance.Grid.GetContentsAt(pos); 154 | } 155 | 156 | private static T GetObjAtPos(Vector3Int pos) 157 | { 158 | foreach (var tile in GetTilesAt(pos)) { 159 | var o = tile.GetComponentInParent(); 160 | if (o != null) { 161 | return o; 162 | } 163 | } 164 | 165 | return default; 166 | } 167 | 168 | public static GameObject GetTaggedObjAtPos(Vector3Int pos, string tag) 169 | { 170 | foreach (var tile in GetTilesAt(pos)) { 171 | if (tile.transform.parent.CompareTag(tag)) { 172 | return tile; 173 | } 174 | } 175 | return null; 176 | } 177 | 178 | public static bool TaggedObjIsAtPos(Vector3Int pos, string tag) 179 | { 180 | return GetTaggedObjAtPos(pos, tag) != null; 181 | } 182 | 183 | // WALLS // 184 | 185 | public static Wall GetWallAtPos(Vector3Int pos) 186 | { 187 | return GetObjAtPos(pos); 188 | } 189 | 190 | public static Wall GetWallAtPos(Vector3 pos) { 191 | return GetWallAtPos(Vec3ToInt(pos)); 192 | } 193 | 194 | public static bool WallIsAtPos(Vector3Int pos) { 195 | return GetWallAtPos(pos) != null; 196 | } 197 | 198 | // MOVERS // 199 | 200 | public static Mover GetMoverAtPos(Vector3 pos) { 201 | return GetMoverAtPos(Vec3ToInt(pos)); 202 | } 203 | 204 | public static Mover GetMoverAtPos(Vector3Int pos) { 205 | return GetObjAtPos(pos); 206 | } 207 | 208 | public static bool MoverIsAtPos(Vector3 pos) { 209 | return MoverIsAtPos(Vec3ToInt(pos)); 210 | } 211 | 212 | public static bool MoverIsAtPos(Vector3Int pos) { 213 | return GetMoverAtPos(pos) != null; 214 | } 215 | 216 | public static List MoversAbove(Mover m, bool clear = true) { 217 | if (clear) { 218 | movers.Clear(); 219 | } 220 | foreach (Tile t in m.tiles) { 221 | Mover m2 = GetMoverAtPos(t.pos + Vector3.back); 222 | if (m2 != null && !movers.Contains(m2)) { 223 | movers.Add(m2); 224 | movers.AddRange(MoversAbove(m2, false)); 225 | } 226 | } 227 | return movers.Distinct().ToList(); 228 | } 229 | 230 | public static bool AIsHigherThanB(Transform a, Transform b) { 231 | return a.position.z < b.position.z; 232 | } 233 | 234 | public static bool GroundBelowPosition(Vector3Int v, Mover source = null) { 235 | Vector3Int posToCheck = v + forward; 236 | if (WallIsAtPos(posToCheck)) { 237 | return true; 238 | } 239 | Mover m = GetMoverAtPos(posToCheck); 240 | if (m != null && m != source && !m.isFalling) { 241 | return true; 242 | } 243 | return false; 244 | } 245 | 246 | public static bool GroundBelowTile(Tile tile) { 247 | return GroundBelowPosition(tile.pos); 248 | } 249 | 250 | public static bool GroundBelowPlayer() { 251 | return GroundBelow(Player.instance); 252 | } 253 | 254 | public static bool GroundBelow(Mover m) { 255 | foreach (Tile tile in m.tiles) 256 | { 257 | if (tile.pos.z == 0) 258 | return true; 259 | if (Utils.GroundBelowTile(tile)) { 260 | return true; 261 | } 262 | } 263 | return false; 264 | } 265 | 266 | public static bool PlayerAtPos(Vector3 v) { 267 | Mover m = GetMoverAtPos(v); 268 | if (m != null && m.isPlayer) return true; 269 | return false; 270 | } 271 | 272 | public static Texture2D MakeTex(int width, int height, Color col) { 273 | Color[] pix = new Color[width*height]; 274 | 275 | for(int i = 0; i < pix.Length; i++) 276 | pix[i] = col; 277 | 278 | Texture2D result = new Texture2D(width, height); 279 | result.SetPixels(pix); 280 | result.Apply(); 281 | return result; 282 | } 283 | } 284 | -------------------------------------------------------------------------------- /Assets/Prefabs/Target.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5312118293484781980 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7367032762619788746} 12 | - component: {fileID: 8814889515273811640} 13 | - component: {fileID: 1522955065001657171} 14 | m_Layer: 0 15 | m_Name: Cube (1) 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &7367032762619788746 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 5312118293484781980} 28 | m_LocalRotation: {x: -0, y: -0, z: -0.38268322, w: 0.9238796} 29 | m_LocalPosition: {x: 0, y: 0, z: 0.421} 30 | m_LocalScale: {x: 0.98, y: 0.102998, z: 0.1} 31 | m_Children: [] 32 | m_Father: {fileID: 7177218815125151139} 33 | m_RootOrder: 1 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: -45.000004} 35 | --- !u!33 &8814889515273811640 36 | MeshFilter: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 5312118293484781980} 42 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 43 | --- !u!23 &1522955065001657171 44 | MeshRenderer: 45 | m_ObjectHideFlags: 0 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInstance: {fileID: 0} 48 | m_PrefabAsset: {fileID: 0} 49 | m_GameObject: {fileID: 5312118293484781980} 50 | m_Enabled: 1 51 | m_CastShadows: 1 52 | m_ReceiveShadows: 1 53 | m_DynamicOccludee: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_RayTracingMode: 2 58 | m_RenderingLayerMask: 1 59 | m_RendererPriority: 0 60 | m_Materials: 61 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_ReceiveGI: 1 70 | m_PreserveUVs: 0 71 | m_IgnoreNormalsForChartDetection: 0 72 | m_ImportantGI: 0 73 | m_StitchLightmapSeams: 0 74 | m_SelectedEditorRenderState: 3 75 | m_MinimumChartSize: 4 76 | m_AutoUVMaxDistance: 0.5 77 | m_AutoUVMaxAngle: 89 78 | m_LightmapParameters: {fileID: 0} 79 | m_SortingLayerID: 0 80 | m_SortingLayer: 0 81 | m_SortingOrder: 0 82 | --- !u!1 &5432666503629365069 83 | GameObject: 84 | m_ObjectHideFlags: 0 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInstance: {fileID: 0} 87 | m_PrefabAsset: {fileID: 0} 88 | serializedVersion: 6 89 | m_Component: 90 | - component: {fileID: 7952220335737526240} 91 | m_Layer: 0 92 | m_Name: Tile 93 | m_TagString: Tile 94 | m_Icon: {fileID: 0} 95 | m_NavMeshLayer: 0 96 | m_StaticEditorFlags: 0 97 | m_IsActive: 1 98 | --- !u!4 &7952220335737526240 99 | Transform: 100 | m_ObjectHideFlags: 0 101 | m_CorrespondingSourceObject: {fileID: 0} 102 | m_PrefabInstance: {fileID: 0} 103 | m_PrefabAsset: {fileID: 0} 104 | m_GameObject: {fileID: 5432666503629365069} 105 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 106 | m_LocalPosition: {x: 0, y: 0, z: 0} 107 | m_LocalScale: {x: 1, y: 1, z: 1} 108 | m_Children: [] 109 | m_Father: {fileID: 7177218815125151139} 110 | m_RootOrder: 3 111 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 112 | --- !u!1 &6232018619447324587 113 | GameObject: 114 | m_ObjectHideFlags: 0 115 | m_CorrespondingSourceObject: {fileID: 0} 116 | m_PrefabInstance: {fileID: 0} 117 | m_PrefabAsset: {fileID: 0} 118 | serializedVersion: 6 119 | m_Component: 120 | - component: {fileID: 7789225815030653335} 121 | - component: {fileID: 2766691457955502632} 122 | - component: {fileID: 6423403996407097740} 123 | m_Layer: 0 124 | m_Name: Cube (2) 125 | m_TagString: Untagged 126 | m_Icon: {fileID: 0} 127 | m_NavMeshLayer: 0 128 | m_StaticEditorFlags: 0 129 | m_IsActive: 1 130 | --- !u!4 &7789225815030653335 131 | Transform: 132 | m_ObjectHideFlags: 0 133 | m_CorrespondingSourceObject: {fileID: 0} 134 | m_PrefabInstance: {fileID: 0} 135 | m_PrefabAsset: {fileID: 0} 136 | m_GameObject: {fileID: 6232018619447324587} 137 | m_LocalRotation: {x: -0, y: -0, z: 0.3826832, w: 0.9238797} 138 | m_LocalPosition: {x: 0, y: 0, z: 0.421} 139 | m_LocalScale: {x: 0.98, y: 0.102998, z: 0.1} 140 | m_Children: [] 141 | m_Father: {fileID: 7177218815125151139} 142 | m_RootOrder: 2 143 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45.000004} 144 | --- !u!33 &2766691457955502632 145 | MeshFilter: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 6232018619447324587} 151 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 152 | --- !u!23 &6423403996407097740 153 | MeshRenderer: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 6232018619447324587} 159 | m_Enabled: 1 160 | m_CastShadows: 1 161 | m_ReceiveShadows: 1 162 | m_DynamicOccludee: 1 163 | m_MotionVectors: 1 164 | m_LightProbeUsage: 1 165 | m_ReflectionProbeUsage: 1 166 | m_RayTracingMode: 2 167 | m_RenderingLayerMask: 1 168 | m_RendererPriority: 0 169 | m_Materials: 170 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 171 | m_StaticBatchInfo: 172 | firstSubMesh: 0 173 | subMeshCount: 0 174 | m_StaticBatchRoot: {fileID: 0} 175 | m_ProbeAnchor: {fileID: 0} 176 | m_LightProbeVolumeOverride: {fileID: 0} 177 | m_ScaleInLightmap: 1 178 | m_ReceiveGI: 1 179 | m_PreserveUVs: 0 180 | m_IgnoreNormalsForChartDetection: 0 181 | m_ImportantGI: 0 182 | m_StitchLightmapSeams: 0 183 | m_SelectedEditorRenderState: 3 184 | m_MinimumChartSize: 4 185 | m_AutoUVMaxDistance: 0.5 186 | m_AutoUVMaxAngle: 89 187 | m_LightmapParameters: {fileID: 0} 188 | m_SortingLayerID: 0 189 | m_SortingLayer: 0 190 | m_SortingOrder: 0 191 | --- !u!1 &6731331057722905132 192 | GameObject: 193 | m_ObjectHideFlags: 0 194 | m_CorrespondingSourceObject: {fileID: 0} 195 | m_PrefabInstance: {fileID: 0} 196 | m_PrefabAsset: {fileID: 0} 197 | serializedVersion: 6 198 | m_Component: 199 | - component: {fileID: 8590663673509759043} 200 | - component: {fileID: 1948792253167082783} 201 | - component: {fileID: 53711262626560837} 202 | m_Layer: 0 203 | m_Name: Cube 204 | m_TagString: Untagged 205 | m_Icon: {fileID: 0} 206 | m_NavMeshLayer: 0 207 | m_StaticEditorFlags: 0 208 | m_IsActive: 1 209 | --- !u!4 &8590663673509759043 210 | Transform: 211 | m_ObjectHideFlags: 0 212 | m_CorrespondingSourceObject: {fileID: 0} 213 | m_PrefabInstance: {fileID: 0} 214 | m_PrefabAsset: {fileID: 0} 215 | m_GameObject: {fileID: 6731331057722905132} 216 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 217 | m_LocalPosition: {x: 0, y: 0, z: 0.5} 218 | m_LocalScale: {x: 0.98, y: 0.98, z: 0.1} 219 | m_Children: [] 220 | m_Father: {fileID: 7177218815125151139} 221 | m_RootOrder: 0 222 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 223 | --- !u!33 &1948792253167082783 224 | MeshFilter: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | m_GameObject: {fileID: 6731331057722905132} 230 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 231 | --- !u!23 &53711262626560837 232 | MeshRenderer: 233 | m_ObjectHideFlags: 0 234 | m_CorrespondingSourceObject: {fileID: 0} 235 | m_PrefabInstance: {fileID: 0} 236 | m_PrefabAsset: {fileID: 0} 237 | m_GameObject: {fileID: 6731331057722905132} 238 | m_Enabled: 1 239 | m_CastShadows: 1 240 | m_ReceiveShadows: 1 241 | m_DynamicOccludee: 1 242 | m_MotionVectors: 1 243 | m_LightProbeUsage: 1 244 | m_ReflectionProbeUsage: 1 245 | m_RayTracingMode: 2 246 | m_RenderingLayerMask: 1 247 | m_RendererPriority: 0 248 | m_Materials: 249 | - {fileID: 2100000, guid: 58547b2b93cb32648935da54e1786127, type: 2} 250 | m_StaticBatchInfo: 251 | firstSubMesh: 0 252 | subMeshCount: 0 253 | m_StaticBatchRoot: {fileID: 0} 254 | m_ProbeAnchor: {fileID: 0} 255 | m_LightProbeVolumeOverride: {fileID: 0} 256 | m_ScaleInLightmap: 1 257 | m_ReceiveGI: 1 258 | m_PreserveUVs: 0 259 | m_IgnoreNormalsForChartDetection: 0 260 | m_ImportantGI: 0 261 | m_StitchLightmapSeams: 0 262 | m_SelectedEditorRenderState: 3 263 | m_MinimumChartSize: 4 264 | m_AutoUVMaxDistance: 0.5 265 | m_AutoUVMaxAngle: 89 266 | m_LightmapParameters: {fileID: 0} 267 | m_SortingLayerID: 0 268 | m_SortingLayer: 0 269 | m_SortingOrder: 0 270 | --- !u!1 &7818201877672126402 271 | GameObject: 272 | m_ObjectHideFlags: 0 273 | m_CorrespondingSourceObject: {fileID: 0} 274 | m_PrefabInstance: {fileID: 0} 275 | m_PrefabAsset: {fileID: 0} 276 | serializedVersion: 6 277 | m_Component: 278 | - component: {fileID: 7177218815125151139} 279 | - component: {fileID: 7960729904671047441} 280 | m_Layer: 0 281 | m_Name: Target 282 | m_TagString: Target 283 | m_Icon: {fileID: 0} 284 | m_NavMeshLayer: 0 285 | m_StaticEditorFlags: 0 286 | m_IsActive: 1 287 | --- !u!4 &7177218815125151139 288 | Transform: 289 | m_ObjectHideFlags: 0 290 | m_CorrespondingSourceObject: {fileID: 0} 291 | m_PrefabInstance: {fileID: 0} 292 | m_PrefabAsset: {fileID: 0} 293 | m_GameObject: {fileID: 7818201877672126402} 294 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 295 | m_LocalPosition: {x: 0, y: 0, z: 0} 296 | m_LocalScale: {x: 1, y: 1, z: 1} 297 | m_Children: 298 | - {fileID: 8590663673509759043} 299 | - {fileID: 7367032762619788746} 300 | - {fileID: 7789225815030653335} 301 | - {fileID: 7952220335737526240} 302 | m_Father: {fileID: 0} 303 | m_RootOrder: 0 304 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 305 | --- !u!65 &7960729904671047441 306 | BoxCollider: 307 | m_ObjectHideFlags: 0 308 | m_CorrespondingSourceObject: {fileID: 0} 309 | m_PrefabInstance: {fileID: 0} 310 | m_PrefabAsset: {fileID: 0} 311 | m_GameObject: {fileID: 7818201877672126402} 312 | m_Material: {fileID: 0} 313 | m_IsTrigger: 0 314 | m_Enabled: 1 315 | serializedVersion: 2 316 | m_Size: {x: 1, y: 1, z: 1} 317 | m_Center: {x: 0, y: 0, z: 0} 318 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": { 4 | "version": "1.0.0", 5 | "depth": 0, 6 | "source": "builtin", 7 | "dependencies": {} 8 | }, 9 | "com.unity.2d.tilemap": { 10 | "version": "1.0.0", 11 | "depth": 0, 12 | "source": "builtin", 13 | "dependencies": {} 14 | }, 15 | "com.unity.ads": { 16 | "version": "3.4.9", 17 | "depth": 0, 18 | "source": "registry", 19 | "dependencies": { 20 | "com.unity.ugui": "1.0.0" 21 | }, 22 | "url": "https://packages.unity.com" 23 | }, 24 | "com.unity.analytics": { 25 | "version": "3.3.5", 26 | "depth": 0, 27 | "source": "registry", 28 | "dependencies": { 29 | "com.unity.ugui": "1.0.0" 30 | }, 31 | "url": "https://packages.unity.com" 32 | }, 33 | "com.unity.collab-proxy": { 34 | "version": "1.2.16", 35 | "depth": 0, 36 | "source": "registry", 37 | "dependencies": {}, 38 | "url": "https://packages.unity.com" 39 | }, 40 | "com.unity.ext.nunit": { 41 | "version": "1.0.0", 42 | "depth": 1, 43 | "source": "registry", 44 | "dependencies": {}, 45 | "url": "https://packages.unity.com" 46 | }, 47 | "com.unity.ide.rider": { 48 | "version": "1.1.4", 49 | "depth": 0, 50 | "source": "registry", 51 | "dependencies": { 52 | "com.unity.test-framework": "1.1.1" 53 | }, 54 | "url": "https://packages.unity.com" 55 | }, 56 | "com.unity.ide.vscode": { 57 | "version": "1.1.3", 58 | "depth": 0, 59 | "source": "registry", 60 | "dependencies": {}, 61 | "url": "https://packages.unity.com" 62 | }, 63 | "com.unity.multiplayer-hlapi": { 64 | "version": "1.0.6", 65 | "depth": 0, 66 | "source": "registry", 67 | "dependencies": { 68 | "nuget.mono-cecil": "0.1.6-preview" 69 | }, 70 | "url": "https://packages.unity.com" 71 | }, 72 | "com.unity.purchasing": { 73 | "version": "2.1.0", 74 | "depth": 0, 75 | "source": "registry", 76 | "dependencies": { 77 | "com.unity.ugui": "1.0.0" 78 | }, 79 | "url": "https://packages.unity.com" 80 | }, 81 | "com.unity.test-framework": { 82 | "version": "1.1.16", 83 | "depth": 0, 84 | "source": "registry", 85 | "dependencies": { 86 | "com.unity.ext.nunit": "1.0.0", 87 | "com.unity.modules.imgui": "1.0.0", 88 | "com.unity.modules.jsonserialize": "1.0.0" 89 | }, 90 | "url": "https://packages.unity.com" 91 | }, 92 | "com.unity.textmeshpro": { 93 | "version": "2.0.1", 94 | "depth": 0, 95 | "source": "registry", 96 | "dependencies": { 97 | "com.unity.ugui": "1.0.0" 98 | }, 99 | "url": "https://packages.unity.com" 100 | }, 101 | "com.unity.timeline": { 102 | "version": "1.2.6", 103 | "depth": 0, 104 | "source": "registry", 105 | "dependencies": {}, 106 | "url": "https://packages.unity.com" 107 | }, 108 | "com.unity.ugui": { 109 | "version": "1.0.0", 110 | "depth": 0, 111 | "source": "builtin", 112 | "dependencies": { 113 | "com.unity.modules.ui": "1.0.0", 114 | "com.unity.modules.imgui": "1.0.0" 115 | } 116 | }, 117 | "com.unity.xr.legacyinputhelpers": { 118 | "version": "2.1.4", 119 | "depth": 0, 120 | "source": "registry", 121 | "dependencies": {}, 122 | "url": "https://packages.unity.com" 123 | }, 124 | "nuget.mono-cecil": { 125 | "version": "0.1.6-preview", 126 | "depth": 1, 127 | "source": "registry", 128 | "dependencies": {}, 129 | "url": "https://packages.unity.com" 130 | }, 131 | "com.unity.modules.ai": { 132 | "version": "1.0.0", 133 | "depth": 0, 134 | "source": "builtin", 135 | "dependencies": {} 136 | }, 137 | "com.unity.modules.androidjni": { 138 | "version": "1.0.0", 139 | "depth": 0, 140 | "source": "builtin", 141 | "dependencies": {} 142 | }, 143 | "com.unity.modules.animation": { 144 | "version": "1.0.0", 145 | "depth": 0, 146 | "source": "builtin", 147 | "dependencies": {} 148 | }, 149 | "com.unity.modules.assetbundle": { 150 | "version": "1.0.0", 151 | "depth": 0, 152 | "source": "builtin", 153 | "dependencies": {} 154 | }, 155 | "com.unity.modules.audio": { 156 | "version": "1.0.0", 157 | "depth": 0, 158 | "source": "builtin", 159 | "dependencies": {} 160 | }, 161 | "com.unity.modules.cloth": { 162 | "version": "1.0.0", 163 | "depth": 0, 164 | "source": "builtin", 165 | "dependencies": { 166 | "com.unity.modules.physics": "1.0.0" 167 | } 168 | }, 169 | "com.unity.modules.director": { 170 | "version": "1.0.0", 171 | "depth": 0, 172 | "source": "builtin", 173 | "dependencies": { 174 | "com.unity.modules.audio": "1.0.0", 175 | "com.unity.modules.animation": "1.0.0" 176 | } 177 | }, 178 | "com.unity.modules.imageconversion": { 179 | "version": "1.0.0", 180 | "depth": 0, 181 | "source": "builtin", 182 | "dependencies": {} 183 | }, 184 | "com.unity.modules.imgui": { 185 | "version": "1.0.0", 186 | "depth": 0, 187 | "source": "builtin", 188 | "dependencies": {} 189 | }, 190 | "com.unity.modules.jsonserialize": { 191 | "version": "1.0.0", 192 | "depth": 0, 193 | "source": "builtin", 194 | "dependencies": {} 195 | }, 196 | "com.unity.modules.particlesystem": { 197 | "version": "1.0.0", 198 | "depth": 0, 199 | "source": "builtin", 200 | "dependencies": {} 201 | }, 202 | "com.unity.modules.physics": { 203 | "version": "1.0.0", 204 | "depth": 0, 205 | "source": "builtin", 206 | "dependencies": {} 207 | }, 208 | "com.unity.modules.physics2d": { 209 | "version": "1.0.0", 210 | "depth": 0, 211 | "source": "builtin", 212 | "dependencies": {} 213 | }, 214 | "com.unity.modules.screencapture": { 215 | "version": "1.0.0", 216 | "depth": 0, 217 | "source": "builtin", 218 | "dependencies": { 219 | "com.unity.modules.imageconversion": "1.0.0" 220 | } 221 | }, 222 | "com.unity.modules.subsystems": { 223 | "version": "1.0.0", 224 | "depth": 1, 225 | "source": "builtin", 226 | "dependencies": { 227 | "com.unity.modules.jsonserialize": "1.0.0" 228 | } 229 | }, 230 | "com.unity.modules.terrain": { 231 | "version": "1.0.0", 232 | "depth": 0, 233 | "source": "builtin", 234 | "dependencies": {} 235 | }, 236 | "com.unity.modules.terrainphysics": { 237 | "version": "1.0.0", 238 | "depth": 0, 239 | "source": "builtin", 240 | "dependencies": { 241 | "com.unity.modules.physics": "1.0.0", 242 | "com.unity.modules.terrain": "1.0.0" 243 | } 244 | }, 245 | "com.unity.modules.tilemap": { 246 | "version": "1.0.0", 247 | "depth": 0, 248 | "source": "builtin", 249 | "dependencies": { 250 | "com.unity.modules.physics2d": "1.0.0" 251 | } 252 | }, 253 | "com.unity.modules.ui": { 254 | "version": "1.0.0", 255 | "depth": 0, 256 | "source": "builtin", 257 | "dependencies": {} 258 | }, 259 | "com.unity.modules.uielements": { 260 | "version": "1.0.0", 261 | "depth": 0, 262 | "source": "builtin", 263 | "dependencies": { 264 | "com.unity.modules.imgui": "1.0.0", 265 | "com.unity.modules.jsonserialize": "1.0.0" 266 | } 267 | }, 268 | "com.unity.modules.umbra": { 269 | "version": "1.0.0", 270 | "depth": 0, 271 | "source": "builtin", 272 | "dependencies": {} 273 | }, 274 | "com.unity.modules.unityanalytics": { 275 | "version": "1.0.0", 276 | "depth": 0, 277 | "source": "builtin", 278 | "dependencies": { 279 | "com.unity.modules.unitywebrequest": "1.0.0", 280 | "com.unity.modules.jsonserialize": "1.0.0" 281 | } 282 | }, 283 | "com.unity.modules.unitywebrequest": { 284 | "version": "1.0.0", 285 | "depth": 0, 286 | "source": "builtin", 287 | "dependencies": {} 288 | }, 289 | "com.unity.modules.unitywebrequestassetbundle": { 290 | "version": "1.0.0", 291 | "depth": 0, 292 | "source": "builtin", 293 | "dependencies": { 294 | "com.unity.modules.assetbundle": "1.0.0", 295 | "com.unity.modules.unitywebrequest": "1.0.0" 296 | } 297 | }, 298 | "com.unity.modules.unitywebrequestaudio": { 299 | "version": "1.0.0", 300 | "depth": 0, 301 | "source": "builtin", 302 | "dependencies": { 303 | "com.unity.modules.unitywebrequest": "1.0.0", 304 | "com.unity.modules.audio": "1.0.0" 305 | } 306 | }, 307 | "com.unity.modules.unitywebrequesttexture": { 308 | "version": "1.0.0", 309 | "depth": 0, 310 | "source": "builtin", 311 | "dependencies": { 312 | "com.unity.modules.unitywebrequest": "1.0.0", 313 | "com.unity.modules.imageconversion": "1.0.0" 314 | } 315 | }, 316 | "com.unity.modules.unitywebrequestwww": { 317 | "version": "1.0.0", 318 | "depth": 0, 319 | "source": "builtin", 320 | "dependencies": { 321 | "com.unity.modules.unitywebrequest": "1.0.0", 322 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 323 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 324 | "com.unity.modules.audio": "1.0.0", 325 | "com.unity.modules.assetbundle": "1.0.0", 326 | "com.unity.modules.imageconversion": "1.0.0" 327 | } 328 | }, 329 | "com.unity.modules.vehicles": { 330 | "version": "1.0.0", 331 | "depth": 0, 332 | "source": "builtin", 333 | "dependencies": { 334 | "com.unity.modules.physics": "1.0.0" 335 | } 336 | }, 337 | "com.unity.modules.video": { 338 | "version": "1.0.0", 339 | "depth": 0, 340 | "source": "builtin", 341 | "dependencies": { 342 | "com.unity.modules.audio": "1.0.0", 343 | "com.unity.modules.ui": "1.0.0", 344 | "com.unity.modules.unitywebrequest": "1.0.0" 345 | } 346 | }, 347 | "com.unity.modules.vr": { 348 | "version": "1.0.0", 349 | "depth": 0, 350 | "source": "builtin", 351 | "dependencies": { 352 | "com.unity.modules.jsonserialize": "1.0.0", 353 | "com.unity.modules.physics": "1.0.0", 354 | "com.unity.modules.xr": "1.0.0" 355 | } 356 | }, 357 | "com.unity.modules.wind": { 358 | "version": "1.0.0", 359 | "depth": 0, 360 | "source": "builtin", 361 | "dependencies": {} 362 | }, 363 | "com.unity.modules.xr": { 364 | "version": "1.0.0", 365 | "depth": 0, 366 | "source": "builtin", 367 | "dependencies": { 368 | "com.unity.modules.physics": "1.0.0", 369 | "com.unity.modules.jsonserialize": "1.0.0", 370 | "com.unity.modules.subsystems": "1.0.0" 371 | } 372 | } 373 | } 374 | } 375 | -------------------------------------------------------------------------------- /Assets/Resources/Levels/my level name.json: -------------------------------------------------------------------------------- 1 | {"LevelObjects":[{"prefab":"WallAlt","pos":{"x":7.0,"y":-4.0,"z":-6.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-3.0,"z":-6.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-2.0,"z":-6.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":8.0,"y":0.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":8.0,"y":1.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":8.0,"y":2.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":2.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":6.0,"y":2.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":5.0,"y":2.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":2.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":3.0,"y":2.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":3.0,"y":1.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"WallAlt","pos":{"x":3.0,"y":0.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"Crate L","pos":{"x":6.0,"y":-1.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":270.0}},{"prefab":"Wall","pos":{"x":8.0,"y":2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":-1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":0.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":6.0,"y":2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":5.0,"y":2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":6.0,"y":1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":5.0,"y":1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":0.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":-1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Player","pos":{"x":5.0,"y":-1.0,"z":-11.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":0.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":6.0,"y":0.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":5.0,"y":0.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":0.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":-2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":-1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":6.0,"y":-1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":5.0,"y":-1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":-2.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":-1.0,"z":-10.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-9.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-8.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-7.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-6.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-5.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-4.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-3.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-2.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":7.0,"y":-1.0,"z":-1.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-9.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-8.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-7.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-6.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-5.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-4.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-3.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-2.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"WallAlt","pos":{"x":4.0,"y":-1.0,"z":-1.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Crate","pos":{"x":-5.0,"y":2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Crate","pos":{"x":-3.0,"y":1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Crate","pos":{"x":-3.0,"y":0.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Crate","pos":{"x":-5.0,"y":0.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Crate","pos":{"x":-5.0,"y":-3.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Crate","pos":{"x":-8.0,"y":-3.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-1.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-1.0,"y":0.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-1.0,"y":1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-4.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-2.0,"y":1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-4.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-2.0,"y":2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-3.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-2.0,"y":3.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-3.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-2.0,"y":4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-4.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-3.0,"y":4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-3.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-4.0,"y":4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-2.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-5.0,"y":4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-10.0,"y":-3.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-10.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":3.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-7.0,"y":1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-10.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-8.0,"y":1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-9.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-8.0,"y":0.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-8.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-8.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-7.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-9.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-10.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-6.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-5.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-4.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-3.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-2.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-1.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":0.0,"y":-6.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":0.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":0.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":1.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":2.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":2.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":5.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":6.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":-5.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":-4.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":-3.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":8.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":7.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":6.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":5.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":4.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":-1.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":3.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":2.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":1.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":0.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}},{"prefab":"Wall","pos":{"x":-1.0,"y":-2.0,"z":0.0},"angles":{"x":0.0,"y":0.0,"z":0.0}}]} 2 | -------------------------------------------------------------------------------- /Assets/Prefabs/Crate L.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1441378481461474167 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 2275344125943764758} 12 | - component: {fileID: 2739324220653954194} 13 | m_Layer: 0 14 | m_Name: Tile (3) 15 | m_TagString: Tile 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &2275344125943764758 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 1441378481461474167} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 1, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 5193251116917791219} 32 | m_RootOrder: 4 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!65 &2739324220653954194 35 | BoxCollider: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 1441378481461474167} 41 | m_Material: {fileID: 0} 42 | m_IsTrigger: 0 43 | m_Enabled: 1 44 | serializedVersion: 2 45 | m_Size: {x: 1, y: 1, z: 1} 46 | m_Center: {x: 0, y: 0, z: 0} 47 | --- !u!1 &2623366629386875164 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 8863206805295830640} 56 | - component: {fileID: 902839214631383438} 57 | m_Layer: 0 58 | m_Name: Tile (1) 59 | m_TagString: Tile 60 | m_Icon: {fileID: 0} 61 | m_NavMeshLayer: 0 62 | m_StaticEditorFlags: 0 63 | m_IsActive: 1 64 | --- !u!4 &8863206805295830640 65 | Transform: 66 | m_ObjectHideFlags: 0 67 | m_CorrespondingSourceObject: {fileID: 0} 68 | m_PrefabInstance: {fileID: 0} 69 | m_PrefabAsset: {fileID: 0} 70 | m_GameObject: {fileID: 2623366629386875164} 71 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 72 | m_LocalPosition: {x: 0, y: 0, z: 0} 73 | m_LocalScale: {x: 1, y: 1, z: 1} 74 | m_Children: [] 75 | m_Father: {fileID: 5193251116917791219} 76 | m_RootOrder: 2 77 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 78 | --- !u!65 &902839214631383438 79 | BoxCollider: 80 | m_ObjectHideFlags: 0 81 | m_CorrespondingSourceObject: {fileID: 0} 82 | m_PrefabInstance: {fileID: 0} 83 | m_PrefabAsset: {fileID: 0} 84 | m_GameObject: {fileID: 2623366629386875164} 85 | m_Material: {fileID: 0} 86 | m_IsTrigger: 0 87 | m_Enabled: 1 88 | serializedVersion: 2 89 | m_Size: {x: 1, y: 1, z: 1} 90 | m_Center: {x: 0, y: 0, z: 0} 91 | --- !u!1 &5036960619429022458 92 | GameObject: 93 | m_ObjectHideFlags: 0 94 | m_CorrespondingSourceObject: {fileID: 0} 95 | m_PrefabInstance: {fileID: 0} 96 | m_PrefabAsset: {fileID: 0} 97 | serializedVersion: 6 98 | m_Component: 99 | - component: {fileID: 3275384871728655154} 100 | - component: {fileID: 5338137944736201016} 101 | m_Layer: 0 102 | m_Name: Tile (2) 103 | m_TagString: Tile 104 | m_Icon: {fileID: 0} 105 | m_NavMeshLayer: 0 106 | m_StaticEditorFlags: 0 107 | m_IsActive: 1 108 | --- !u!4 &3275384871728655154 109 | Transform: 110 | m_ObjectHideFlags: 0 111 | m_CorrespondingSourceObject: {fileID: 0} 112 | m_PrefabInstance: {fileID: 0} 113 | m_PrefabAsset: {fileID: 0} 114 | m_GameObject: {fileID: 5036960619429022458} 115 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 116 | m_LocalPosition: {x: -1, y: 0, z: 0} 117 | m_LocalScale: {x: 1, y: 1, z: 1} 118 | m_Children: [] 119 | m_Father: {fileID: 5193251116917791219} 120 | m_RootOrder: 3 121 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 122 | --- !u!65 &5338137944736201016 123 | BoxCollider: 124 | m_ObjectHideFlags: 0 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | m_GameObject: {fileID: 5036960619429022458} 129 | m_Material: {fileID: 0} 130 | m_IsTrigger: 0 131 | m_Enabled: 1 132 | serializedVersion: 2 133 | m_Size: {x: 1, y: 1, z: 1} 134 | m_Center: {x: 0, y: 0, z: 0} 135 | --- !u!1 &5185733562010280850 136 | GameObject: 137 | m_ObjectHideFlags: 0 138 | m_CorrespondingSourceObject: {fileID: 0} 139 | m_PrefabInstance: {fileID: 0} 140 | m_PrefabAsset: {fileID: 0} 141 | serializedVersion: 6 142 | m_Component: 143 | - component: {fileID: 5193251116917791219} 144 | - component: {fileID: 8647704873919646425} 145 | m_Layer: 0 146 | m_Name: Crate L 147 | m_TagString: Untagged 148 | m_Icon: {fileID: 0} 149 | m_NavMeshLayer: 0 150 | m_StaticEditorFlags: 0 151 | m_IsActive: 1 152 | --- !u!4 &5193251116917791219 153 | Transform: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 5185733562010280850} 159 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 160 | m_LocalPosition: {x: 0, y: 0, z: 0} 161 | m_LocalScale: {x: 1, y: 1, z: 1} 162 | m_Children: 163 | - {fileID: 6678999896804494355} 164 | - {fileID: 1718727032976481649} 165 | - {fileID: 8863206805295830640} 166 | - {fileID: 3275384871728655154} 167 | - {fileID: 2275344125943764758} 168 | - {fileID: 6894248883495483601} 169 | m_Father: {fileID: 0} 170 | m_RootOrder: 0 171 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 172 | --- !u!114 &8647704873919646425 173 | MonoBehaviour: 174 | m_ObjectHideFlags: 0 175 | m_CorrespondingSourceObject: {fileID: 0} 176 | m_PrefabInstance: {fileID: 0} 177 | m_PrefabAsset: {fileID: 0} 178 | m_GameObject: {fileID: 5185733562010280850} 179 | m_Enabled: 1 180 | m_EditorHideFlags: 0 181 | m_Script: {fileID: 11500000, guid: 1b1ed8a0cca287042822fec34f4a0355, type: 3} 182 | m_Name: 183 | m_EditorClassIdentifier: 184 | goalPosition: {x: 0, y: 0, z: 0} 185 | isFalling: 0 186 | --- !u!1 &5375008044128394568 187 | GameObject: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | serializedVersion: 6 193 | m_Component: 194 | - component: {fileID: 1718727032976481649} 195 | - component: {fileID: 3379254461103720206} 196 | - component: {fileID: 8721254717221602224} 197 | m_Layer: 0 198 | m_Name: Cube (1) 199 | m_TagString: Untagged 200 | m_Icon: {fileID: 0} 201 | m_NavMeshLayer: 0 202 | m_StaticEditorFlags: 0 203 | m_IsActive: 1 204 | --- !u!4 &1718727032976481649 205 | Transform: 206 | m_ObjectHideFlags: 0 207 | m_CorrespondingSourceObject: {fileID: 0} 208 | m_PrefabInstance: {fileID: 0} 209 | m_PrefabAsset: {fileID: 0} 210 | m_GameObject: {fileID: 5375008044128394568} 211 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 212 | m_LocalPosition: {x: 1, y: -1, z: 0} 213 | m_LocalScale: {x: 1, y: 1, z: 1} 214 | m_Children: [] 215 | m_Father: {fileID: 5193251116917791219} 216 | m_RootOrder: 1 217 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 218 | --- !u!33 &3379254461103720206 219 | MeshFilter: 220 | m_ObjectHideFlags: 0 221 | m_CorrespondingSourceObject: {fileID: 0} 222 | m_PrefabInstance: {fileID: 0} 223 | m_PrefabAsset: {fileID: 0} 224 | m_GameObject: {fileID: 5375008044128394568} 225 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 226 | --- !u!23 &8721254717221602224 227 | MeshRenderer: 228 | m_ObjectHideFlags: 0 229 | m_CorrespondingSourceObject: {fileID: 0} 230 | m_PrefabInstance: {fileID: 0} 231 | m_PrefabAsset: {fileID: 0} 232 | m_GameObject: {fileID: 5375008044128394568} 233 | m_Enabled: 1 234 | m_CastShadows: 1 235 | m_ReceiveShadows: 1 236 | m_DynamicOccludee: 1 237 | m_MotionVectors: 1 238 | m_LightProbeUsage: 1 239 | m_ReflectionProbeUsage: 1 240 | m_RayTracingMode: 2 241 | m_RenderingLayerMask: 1 242 | m_RendererPriority: 0 243 | m_Materials: 244 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 245 | m_StaticBatchInfo: 246 | firstSubMesh: 0 247 | subMeshCount: 0 248 | m_StaticBatchRoot: {fileID: 0} 249 | m_ProbeAnchor: {fileID: 0} 250 | m_LightProbeVolumeOverride: {fileID: 0} 251 | m_ScaleInLightmap: 1 252 | m_ReceiveGI: 1 253 | m_PreserveUVs: 0 254 | m_IgnoreNormalsForChartDetection: 0 255 | m_ImportantGI: 0 256 | m_StitchLightmapSeams: 0 257 | m_SelectedEditorRenderState: 3 258 | m_MinimumChartSize: 4 259 | m_AutoUVMaxDistance: 0.5 260 | m_AutoUVMaxAngle: 89 261 | m_LightmapParameters: {fileID: 0} 262 | m_SortingLayerID: 0 263 | m_SortingLayer: 0 264 | m_SortingOrder: 0 265 | --- !u!1 &8269837499259888839 266 | GameObject: 267 | m_ObjectHideFlags: 0 268 | m_CorrespondingSourceObject: {fileID: 0} 269 | m_PrefabInstance: {fileID: 0} 270 | m_PrefabAsset: {fileID: 0} 271 | serializedVersion: 6 272 | m_Component: 273 | - component: {fileID: 6894248883495483601} 274 | - component: {fileID: 1570478782477470873} 275 | m_Layer: 0 276 | m_Name: Tile (4) 277 | m_TagString: Tile 278 | m_Icon: {fileID: 0} 279 | m_NavMeshLayer: 0 280 | m_StaticEditorFlags: 0 281 | m_IsActive: 1 282 | --- !u!4 &6894248883495483601 283 | Transform: 284 | m_ObjectHideFlags: 0 285 | m_CorrespondingSourceObject: {fileID: 0} 286 | m_PrefabInstance: {fileID: 0} 287 | m_PrefabAsset: {fileID: 0} 288 | m_GameObject: {fileID: 8269837499259888839} 289 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 290 | m_LocalPosition: {x: 1, y: -1, z: 0} 291 | m_LocalScale: {x: 1, y: 1, z: 1} 292 | m_Children: [] 293 | m_Father: {fileID: 5193251116917791219} 294 | m_RootOrder: 5 295 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 296 | --- !u!65 &1570478782477470873 297 | BoxCollider: 298 | m_ObjectHideFlags: 0 299 | m_CorrespondingSourceObject: {fileID: 0} 300 | m_PrefabInstance: {fileID: 0} 301 | m_PrefabAsset: {fileID: 0} 302 | m_GameObject: {fileID: 8269837499259888839} 303 | m_Material: {fileID: 0} 304 | m_IsTrigger: 0 305 | m_Enabled: 1 306 | serializedVersion: 2 307 | m_Size: {x: 1, y: 1, z: 1} 308 | m_Center: {x: 0, y: 0, z: 0} 309 | --- !u!1 &8566627087515981436 310 | GameObject: 311 | m_ObjectHideFlags: 0 312 | m_CorrespondingSourceObject: {fileID: 0} 313 | m_PrefabInstance: {fileID: 0} 314 | m_PrefabAsset: {fileID: 0} 315 | serializedVersion: 6 316 | m_Component: 317 | - component: {fileID: 6678999896804494355} 318 | - component: {fileID: 3495699475061496143} 319 | - component: {fileID: 3113792773670240021} 320 | m_Layer: 0 321 | m_Name: Cube 322 | m_TagString: Untagged 323 | m_Icon: {fileID: 0} 324 | m_NavMeshLayer: 0 325 | m_StaticEditorFlags: 0 326 | m_IsActive: 1 327 | --- !u!4 &6678999896804494355 328 | Transform: 329 | m_ObjectHideFlags: 0 330 | m_CorrespondingSourceObject: {fileID: 0} 331 | m_PrefabInstance: {fileID: 0} 332 | m_PrefabAsset: {fileID: 0} 333 | m_GameObject: {fileID: 8566627087515981436} 334 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 335 | m_LocalPosition: {x: 0, y: 0, z: 0} 336 | m_LocalScale: {x: 3, y: 1, z: 1} 337 | m_Children: [] 338 | m_Father: {fileID: 5193251116917791219} 339 | m_RootOrder: 0 340 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 341 | --- !u!33 &3495699475061496143 342 | MeshFilter: 343 | m_ObjectHideFlags: 0 344 | m_CorrespondingSourceObject: {fileID: 0} 345 | m_PrefabInstance: {fileID: 0} 346 | m_PrefabAsset: {fileID: 0} 347 | m_GameObject: {fileID: 8566627087515981436} 348 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 349 | --- !u!23 &3113792773670240021 350 | MeshRenderer: 351 | m_ObjectHideFlags: 0 352 | m_CorrespondingSourceObject: {fileID: 0} 353 | m_PrefabInstance: {fileID: 0} 354 | m_PrefabAsset: {fileID: 0} 355 | m_GameObject: {fileID: 8566627087515981436} 356 | m_Enabled: 1 357 | m_CastShadows: 1 358 | m_ReceiveShadows: 1 359 | m_DynamicOccludee: 1 360 | m_MotionVectors: 1 361 | m_LightProbeUsage: 1 362 | m_ReflectionProbeUsage: 1 363 | m_RayTracingMode: 2 364 | m_RenderingLayerMask: 1 365 | m_RendererPriority: 0 366 | m_Materials: 367 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 368 | m_StaticBatchInfo: 369 | firstSubMesh: 0 370 | subMeshCount: 0 371 | m_StaticBatchRoot: {fileID: 0} 372 | m_ProbeAnchor: {fileID: 0} 373 | m_LightProbeVolumeOverride: {fileID: 0} 374 | m_ScaleInLightmap: 1 375 | m_ReceiveGI: 1 376 | m_PreserveUVs: 0 377 | m_IgnoreNormalsForChartDetection: 0 378 | m_ImportantGI: 0 379 | m_StitchLightmapSeams: 0 380 | m_SelectedEditorRenderState: 3 381 | m_MinimumChartSize: 4 382 | m_AutoUVMaxDistance: 0.5 383 | m_AutoUVMaxAngle: 89 384 | m_LightmapParameters: {fileID: 0} 385 | m_SortingLayerID: 0 386 | m_SortingLayer: 0 387 | m_SortingOrder: 0 388 | -------------------------------------------------------------------------------- /Assets/Examples/PipePushParadise/Prefabs/OutletStart.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &389044585946567236 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 9012881885513324492} 12 | - component: {fileID: 269094550149377993} 13 | m_Layer: 0 14 | m_Name: Tile 15 | m_TagString: Tile 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &9012881885513324492 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 389044585946567236} 27 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 2462593372607232698} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!65 &269094550149377993 35 | BoxCollider: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 389044585946567236} 41 | m_Material: {fileID: 0} 42 | m_IsTrigger: 0 43 | m_Enabled: 1 44 | serializedVersion: 2 45 | m_Size: {x: 1, y: 1, z: 1} 46 | m_Center: {x: 0, y: 0, z: 0} 47 | --- !u!1 &3299358362680197339 48 | GameObject: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | serializedVersion: 6 54 | m_Component: 55 | - component: {fileID: 2462593372607232698} 56 | - component: {fileID: 3299358362680197338} 57 | m_Layer: 0 58 | m_Name: OutletStart 59 | m_TagString: Untagged 60 | m_Icon: {fileID: 0} 61 | m_NavMeshLayer: 0 62 | m_StaticEditorFlags: 0 63 | m_IsActive: 1 64 | --- !u!4 &2462593372607232698 65 | Transform: 66 | m_ObjectHideFlags: 0 67 | m_CorrespondingSourceObject: {fileID: 0} 68 | m_PrefabInstance: {fileID: 0} 69 | m_PrefabAsset: {fileID: 0} 70 | m_GameObject: {fileID: 3299358362680197339} 71 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 72 | m_LocalPosition: {x: -2, y: -1, z: 0} 73 | m_LocalScale: {x: 1, y: 1, z: 1} 74 | m_Children: 75 | - {fileID: 9012881885513324492} 76 | - {fileID: 8459139867974774284} 77 | - {fileID: 6794278191406387259} 78 | - {fileID: 6518672528045742733} 79 | m_Father: {fileID: 0} 80 | m_RootOrder: 0 81 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 82 | --- !u!114 &3299358362680197338 83 | MonoBehaviour: 84 | m_ObjectHideFlags: 0 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInstance: {fileID: 0} 87 | m_PrefabAsset: {fileID: 0} 88 | m_GameObject: {fileID: 3299358362680197339} 89 | m_Enabled: 1 90 | m_EditorHideFlags: 0 91 | m_Script: {fileID: 11500000, guid: 0e178d4527c789249ab5641d16e33400, type: 3} 92 | m_Name: 93 | m_EditorClassIdentifier: 94 | goalPosition: {x: 0, y: 0, z: 0} 95 | isFalling: 0 96 | spouts: 97 | - {fileID: 8459139867974774283} 98 | isFlowing: 0 99 | --- !u!1 &7310736093848926352 100 | GameObject: 101 | m_ObjectHideFlags: 0 102 | m_CorrespondingSourceObject: {fileID: 0} 103 | m_PrefabInstance: {fileID: 0} 104 | m_PrefabAsset: {fileID: 0} 105 | serializedVersion: 6 106 | m_Component: 107 | - component: {fileID: 6518672528045742733} 108 | - component: {fileID: 5548779150615720762} 109 | - component: {fileID: 4190648879958891649} 110 | m_Layer: 0 111 | m_Name: Cube (2) 112 | m_TagString: Untagged 113 | m_Icon: {fileID: 0} 114 | m_NavMeshLayer: 0 115 | m_StaticEditorFlags: 0 116 | m_IsActive: 1 117 | --- !u!4 &6518672528045742733 118 | Transform: 119 | m_ObjectHideFlags: 0 120 | m_CorrespondingSourceObject: {fileID: 0} 121 | m_PrefabInstance: {fileID: 0} 122 | m_PrefabAsset: {fileID: 0} 123 | m_GameObject: {fileID: 7310736093848926352} 124 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 125 | m_LocalPosition: {x: 0.35, y: 0, z: 0} 126 | m_LocalScale: {x: 0.25, y: 0.8, z: 1} 127 | m_Children: [] 128 | m_Father: {fileID: 2462593372607232698} 129 | m_RootOrder: 3 130 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 131 | --- !u!33 &5548779150615720762 132 | MeshFilter: 133 | m_ObjectHideFlags: 0 134 | m_CorrespondingSourceObject: {fileID: 0} 135 | m_PrefabInstance: {fileID: 0} 136 | m_PrefabAsset: {fileID: 0} 137 | m_GameObject: {fileID: 7310736093848926352} 138 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 139 | --- !u!23 &4190648879958891649 140 | MeshRenderer: 141 | m_ObjectHideFlags: 0 142 | m_CorrespondingSourceObject: {fileID: 0} 143 | m_PrefabInstance: {fileID: 0} 144 | m_PrefabAsset: {fileID: 0} 145 | m_GameObject: {fileID: 7310736093848926352} 146 | m_Enabled: 1 147 | m_CastShadows: 1 148 | m_ReceiveShadows: 1 149 | m_DynamicOccludee: 1 150 | m_MotionVectors: 1 151 | m_LightProbeUsage: 1 152 | m_ReflectionProbeUsage: 1 153 | m_RayTracingMode: 2 154 | m_RenderingLayerMask: 1 155 | m_RendererPriority: 0 156 | m_Materials: 157 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 158 | m_StaticBatchInfo: 159 | firstSubMesh: 0 160 | subMeshCount: 0 161 | m_StaticBatchRoot: {fileID: 0} 162 | m_ProbeAnchor: {fileID: 0} 163 | m_LightProbeVolumeOverride: {fileID: 0} 164 | m_ScaleInLightmap: 1 165 | m_ReceiveGI: 1 166 | m_PreserveUVs: 0 167 | m_IgnoreNormalsForChartDetection: 0 168 | m_ImportantGI: 0 169 | m_StitchLightmapSeams: 0 170 | m_SelectedEditorRenderState: 3 171 | m_MinimumChartSize: 4 172 | m_AutoUVMaxDistance: 0.5 173 | m_AutoUVMaxAngle: 89 174 | m_LightmapParameters: {fileID: 0} 175 | m_SortingLayerID: 0 176 | m_SortingLayer: 0 177 | m_SortingOrder: 0 178 | --- !u!1 &8365567090176821844 179 | GameObject: 180 | m_ObjectHideFlags: 0 181 | m_CorrespondingSourceObject: {fileID: 0} 182 | m_PrefabInstance: {fileID: 0} 183 | m_PrefabAsset: {fileID: 0} 184 | serializedVersion: 6 185 | m_Component: 186 | - component: {fileID: 6794278191406387259} 187 | - component: {fileID: 3637091170823062887} 188 | - component: {fileID: 3012020875611071293} 189 | m_Layer: 0 190 | m_Name: Cube 191 | m_TagString: Untagged 192 | m_Icon: {fileID: 0} 193 | m_NavMeshLayer: 0 194 | m_StaticEditorFlags: 0 195 | m_IsActive: 1 196 | --- !u!4 &6794278191406387259 197 | Transform: 198 | m_ObjectHideFlags: 0 199 | m_CorrespondingSourceObject: {fileID: 0} 200 | m_PrefabInstance: {fileID: 0} 201 | m_PrefabAsset: {fileID: 0} 202 | m_GameObject: {fileID: 8365567090176821844} 203 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 204 | m_LocalPosition: {x: 0.00000011920929, y: 0, z: 0} 205 | m_LocalScale: {x: 0.6, y: 0.6, z: 0.6} 206 | m_Children: [] 207 | m_Father: {fileID: 2462593372607232698} 208 | m_RootOrder: 2 209 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 210 | --- !u!33 &3637091170823062887 211 | MeshFilter: 212 | m_ObjectHideFlags: 0 213 | m_CorrespondingSourceObject: {fileID: 0} 214 | m_PrefabInstance: {fileID: 0} 215 | m_PrefabAsset: {fileID: 0} 216 | m_GameObject: {fileID: 8365567090176821844} 217 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 218 | --- !u!23 &3012020875611071293 219 | MeshRenderer: 220 | m_ObjectHideFlags: 0 221 | m_CorrespondingSourceObject: {fileID: 0} 222 | m_PrefabInstance: {fileID: 0} 223 | m_PrefabAsset: {fileID: 0} 224 | m_GameObject: {fileID: 8365567090176821844} 225 | m_Enabled: 1 226 | m_CastShadows: 1 227 | m_ReceiveShadows: 1 228 | m_DynamicOccludee: 1 229 | m_MotionVectors: 1 230 | m_LightProbeUsage: 1 231 | m_ReflectionProbeUsage: 1 232 | m_RayTracingMode: 2 233 | m_RenderingLayerMask: 1 234 | m_RendererPriority: 0 235 | m_Materials: 236 | - {fileID: 2100000, guid: 637c8ab5e44416d428d7b0a5bc60342a, type: 2} 237 | m_StaticBatchInfo: 238 | firstSubMesh: 0 239 | subMeshCount: 0 240 | m_StaticBatchRoot: {fileID: 0} 241 | m_ProbeAnchor: {fileID: 0} 242 | m_LightProbeVolumeOverride: {fileID: 0} 243 | m_ScaleInLightmap: 1 244 | m_ReceiveGI: 1 245 | m_PreserveUVs: 0 246 | m_IgnoreNormalsForChartDetection: 0 247 | m_ImportantGI: 0 248 | m_StitchLightmapSeams: 0 249 | m_SelectedEditorRenderState: 3 250 | m_MinimumChartSize: 4 251 | m_AutoUVMaxDistance: 0.5 252 | m_AutoUVMaxAngle: 89 253 | m_LightmapParameters: {fileID: 0} 254 | m_SortingLayerID: 0 255 | m_SortingLayer: 0 256 | m_SortingOrder: 0 257 | --- !u!1 &8459139867974774285 258 | GameObject: 259 | m_ObjectHideFlags: 0 260 | m_CorrespondingSourceObject: {fileID: 0} 261 | m_PrefabInstance: {fileID: 0} 262 | m_PrefabAsset: {fileID: 0} 263 | serializedVersion: 6 264 | m_Component: 265 | - component: {fileID: 8459139867974774284} 266 | - component: {fileID: 8459139867974774283} 267 | - component: {fileID: 8459139867974774282} 268 | m_Layer: 0 269 | m_Name: Spout 270 | m_TagString: Untagged 271 | m_Icon: {fileID: 0} 272 | m_NavMeshLayer: 0 273 | m_StaticEditorFlags: 0 274 | m_IsActive: 1 275 | --- !u!4 &8459139867974774284 276 | Transform: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | m_GameObject: {fileID: 8459139867974774285} 282 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 283 | m_LocalPosition: {x: 0, y: 0, z: 0} 284 | m_LocalScale: {x: 1, y: 1, z: 1} 285 | m_Children: 286 | - {fileID: 8459139868601826524} 287 | - {fileID: 8459139868268814148} 288 | m_Father: {fileID: 2462593372607232698} 289 | m_RootOrder: 1 290 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 291 | --- !u!114 &8459139867974774283 292 | MonoBehaviour: 293 | m_ObjectHideFlags: 0 294 | m_CorrespondingSourceObject: {fileID: 0} 295 | m_PrefabInstance: {fileID: 0} 296 | m_PrefabAsset: {fileID: 0} 297 | m_GameObject: {fileID: 8459139867974774285} 298 | m_Enabled: 1 299 | m_EditorHideFlags: 0 300 | m_Script: {fileID: 11500000, guid: cd20a4bfbba722349b807e57431ffeb6, type: 3} 301 | m_Name: 302 | m_EditorClassIdentifier: 303 | pipe: {fileID: 3299358362680197338} 304 | target: {fileID: 8459139868601826524} 305 | origin: {fileID: 8459139867974774284} 306 | water: {fileID: 8459139868268814149} 307 | debug: 0 308 | --- !u!65 &8459139867974774282 309 | BoxCollider: 310 | m_ObjectHideFlags: 0 311 | m_CorrespondingSourceObject: {fileID: 0} 312 | m_PrefabInstance: {fileID: 0} 313 | m_PrefabAsset: {fileID: 0} 314 | m_GameObject: {fileID: 8459139867974774285} 315 | m_Material: {fileID: 0} 316 | m_IsTrigger: 0 317 | m_Enabled: 1 318 | serializedVersion: 2 319 | m_Size: {x: 1, y: 1, z: 1} 320 | m_Center: {x: 0, y: 0, z: 0} 321 | --- !u!1 &8459139868601826525 322 | GameObject: 323 | m_ObjectHideFlags: 0 324 | m_CorrespondingSourceObject: {fileID: 0} 325 | m_PrefabInstance: {fileID: 0} 326 | m_PrefabAsset: {fileID: 0} 327 | serializedVersion: 6 328 | m_Component: 329 | - component: {fileID: 8459139868601826524} 330 | m_Layer: 0 331 | m_Name: T 332 | m_TagString: Untagged 333 | m_Icon: {fileID: 0} 334 | m_NavMeshLayer: 0 335 | m_StaticEditorFlags: 0 336 | m_IsActive: 1 337 | --- !u!4 &8459139868601826524 338 | Transform: 339 | m_ObjectHideFlags: 0 340 | m_CorrespondingSourceObject: {fileID: 0} 341 | m_PrefabInstance: {fileID: 0} 342 | m_PrefabAsset: {fileID: 0} 343 | m_GameObject: {fileID: 8459139868601826525} 344 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 345 | m_LocalPosition: {x: 1, y: 0, z: 0} 346 | m_LocalScale: {x: 1, y: 1, z: 1} 347 | m_Children: [] 348 | m_Father: {fileID: 8459139867974774284} 349 | m_RootOrder: 0 350 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 351 | --- !u!1001 &4743099025215873359 352 | PrefabInstance: 353 | m_ObjectHideFlags: 0 354 | serializedVersion: 2 355 | m_Modification: 356 | m_TransformParent: {fileID: 8459139867974774284} 357 | m_Modifications: 358 | - target: {fileID: 3798286603789516298, guid: ec9c3b606a8009d41851532f8d17c210, 359 | type: 3} 360 | propertyPath: m_Name 361 | value: Water 362 | objectReference: {fileID: 0} 363 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 364 | type: 3} 365 | propertyPath: m_LocalPosition.x 366 | value: 0.5 367 | objectReference: {fileID: 0} 368 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 369 | type: 3} 370 | propertyPath: m_LocalPosition.y 371 | value: 0 372 | objectReference: {fileID: 0} 373 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 374 | type: 3} 375 | propertyPath: m_LocalPosition.z 376 | value: 0 377 | objectReference: {fileID: 0} 378 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 379 | type: 3} 380 | propertyPath: m_LocalRotation.x 381 | value: -0 382 | objectReference: {fileID: 0} 383 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 384 | type: 3} 385 | propertyPath: m_LocalRotation.y 386 | value: -0 387 | objectReference: {fileID: 0} 388 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 389 | type: 3} 390 | propertyPath: m_LocalRotation.z 391 | value: -0 392 | objectReference: {fileID: 0} 393 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 394 | type: 3} 395 | propertyPath: m_LocalRotation.w 396 | value: 1 397 | objectReference: {fileID: 0} 398 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 399 | type: 3} 400 | propertyPath: m_RootOrder 401 | value: 1 402 | objectReference: {fileID: 0} 403 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 404 | type: 3} 405 | propertyPath: m_LocalEulerAnglesHint.x 406 | value: 0 407 | objectReference: {fileID: 0} 408 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 409 | type: 3} 410 | propertyPath: m_LocalEulerAnglesHint.y 411 | value: 0 412 | objectReference: {fileID: 0} 413 | - target: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 414 | type: 3} 415 | propertyPath: m_LocalEulerAnglesHint.z 416 | value: 0 417 | objectReference: {fileID: 0} 418 | m_RemovedComponents: [] 419 | m_SourcePrefab: {fileID: 100100000, guid: ec9c3b606a8009d41851532f8d17c210, type: 3} 420 | --- !u!1 &8459139868268814149 stripped 421 | GameObject: 422 | m_CorrespondingSourceObject: {fileID: 3798286603789516298, guid: ec9c3b606a8009d41851532f8d17c210, 423 | type: 3} 424 | m_PrefabInstance: {fileID: 4743099025215873359} 425 | m_PrefabAsset: {fileID: 0} 426 | --- !u!4 &8459139868268814148 stripped 427 | Transform: 428 | m_CorrespondingSourceObject: {fileID: 3798286603789516299, guid: ec9c3b606a8009d41851532f8d17c210, 429 | type: 3} 430 | m_PrefabInstance: {fileID: 4743099025215873359} 431 | m_PrefabAsset: {fileID: 0} 432 | --------------------------------------------------------------------------------