├── .readme ├── levels.webp ├── pathfinding.webp ├── editor.png └── game.png ├── Assets ├── Scripts │ ├── DungeonType.cs │ ├── DungeonType.cs.meta │ ├── Enemy.cs.meta │ ├── Node.cs.meta │ ├── Player.cs.meta │ ├── ExitDoorway.cs.meta │ ├── TileSpawner.cs.meta │ ├── DungeonManager.cs.meta │ ├── ExitDoorway.cs │ ├── TileSpawner.cs │ ├── Node.cs │ ├── Player.cs │ ├── Enemy.cs │ └── DungeonManager.cs ├── Tiles │ ├── Angband │ │ ├── food.png │ │ ├── jewels.png │ │ ├── misc.png │ │ ├── people.png │ │ ├── monsters_1.png │ │ ├── monsters_2.png │ │ ├── monsters_3.png │ │ ├── monsters_4.png │ │ ├── monsters_5.png │ │ ├── monsters_6.png │ │ ├── monsters_7.png │ │ ├── potions.png │ │ ├── terrain.png │ │ ├── weapons.png │ │ ├── monsters_undead.png │ │ ├── monsters_uniques.png │ │ ├── town_actions.png │ │ ├── people.png.meta │ │ └── terrain.png.meta │ ├── rounded edges.png │ └── Angband.meta ├── Prefabs │ ├── Wall.prefab.meta │ ├── Floor.prefab.meta │ ├── Player.prefab.meta │ ├── Enemies │ │ ├── Bug.prefab.meta │ │ ├── Goblin.prefab.meta │ │ ├── Lizard.prefab.meta │ │ ├── Minotaur.prefab.meta │ │ ├── Bug.prefab │ │ ├── Lizard.prefab │ │ ├── Minotaur.prefab │ │ └── Goblin.prefab │ ├── Exit Doorway.prefab.meta │ ├── Items │ │ ├── Chest.prefab.meta │ │ ├── Dead Guy.prefab.meta │ │ ├── Food.prefab.meta │ │ ├── Potion.prefab.meta │ │ ├── Shovel.prefab.meta │ │ ├── Chest.prefab │ │ ├── Food.prefab │ │ ├── Potion.prefab │ │ ├── Dead Guy.prefab │ │ └── Shovel.prefab │ ├── Tile Spawner.prefab.meta │ ├── Enemies.meta │ ├── Items.meta │ ├── Rounded Wall Edges.meta │ ├── Rounded Wall Edges │ │ ├── rounded edges_0.prefab.meta │ │ ├── rounded edges_1.prefab.meta │ │ ├── rounded edges_2.prefab.meta │ │ ├── rounded edges_3.prefab.meta │ │ ├── rounded edges_4.prefab.meta │ │ ├── rounded edges_5.prefab.meta │ │ ├── rounded edges_6.prefab.meta │ │ ├── rounded edges_7.prefab.meta │ │ ├── rounded edges_8.prefab.meta │ │ ├── rounded edges_9.prefab.meta │ │ ├── rounded edges_10.prefab.meta │ │ ├── rounded edges_11.prefab.meta │ │ ├── rounded edges_12.prefab.meta │ │ ├── rounded edges_13.prefab.meta │ │ ├── rounded edges_14.prefab.meta │ │ ├── rounded edges_15.prefab.meta │ │ ├── rounded edges_0.prefab │ │ ├── rounded edges_1.prefab │ │ ├── rounded edges_2.prefab │ │ ├── rounded edges_15.prefab │ │ ├── rounded edges_3.prefab │ │ ├── rounded edges_5.prefab │ │ ├── rounded edges_10.prefab │ │ ├── rounded edges_4.prefab │ │ ├── rounded edges_6.prefab │ │ ├── rounded edges_7.prefab │ │ ├── rounded edges_8.prefab │ │ ├── rounded edges_9.prefab │ │ ├── rounded edges_11.prefab │ │ ├── rounded edges_12.prefab │ │ ├── rounded edges_13.prefab │ │ └── rounded edges_14.prefab │ ├── Tile Spawner.prefab │ ├── Wall.prefab │ ├── Floor.prefab │ ├── Exit Doorway.prefab │ └── Player.prefab ├── Scenes │ ├── Game.unity.meta │ └── Game.unity ├── Prefabs.meta ├── Scenes.meta ├── Scripts.meta └── Tiles.meta ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── VFXManager.asset ├── NetworkManager.asset ├── XRSettings.asset ├── TimeManager.asset ├── EditorBuildSettings.asset ├── AudioManager.asset ├── EditorSettings.asset ├── TagManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── Physics2DSettings.asset ├── QualitySettings.asset └── InputManager.asset ├── Procedural Dungeons.sln.DotSettings ├── LICENSE ├── README.md ├── Packages └── manifest.json ├── .gitattributes └── .gitignore /.readme/levels.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunsided/unity-procedural-dungeons/HEAD/.readme/levels.webp -------------------------------------------------------------------------------- /Assets/Scripts/DungeonType.cs: -------------------------------------------------------------------------------- 1 | public enum DungeonType 2 | { 3 | Caverns, 4 | Rooms, 5 | Winding 6 | }; -------------------------------------------------------------------------------- /.readme/pathfinding.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunsided/unity-procedural-dungeons/HEAD/.readme/pathfinding.webp -------------------------------------------------------------------------------- /Assets/Scripts/DungeonType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 544f68d4e7814a868f73d1a01f442669 3 | timeCreated: 1566844351 -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.3.0a12 2 | m_EditorVersionWithRevision: 2019.3.0a12 (b073d123dd5d) 3 | -------------------------------------------------------------------------------- /.readme/editor.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1218ebd961432626552feb84c1180ab939c585944b09c2992f9df5bf4825a622 3 | size 60923 4 | -------------------------------------------------------------------------------- /.readme/game.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a6b0def158717e55a0e5070207869aeb426ba5890a348d5babb5d1f5f9d226fe 3 | size 211470 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/food.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:65315f8d44eacaa033aa56a90f892cb304057eb50260489dda35b04c0d39da24 3 | size 6760 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/jewels.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:55ec975adc5b280f14f0c304d9adf4cb1b61aeb214a78d2110924503b2a652d6 3 | size 8392 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/misc.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e3ca921c34a538c9f6b2f091f30f72e1920539c58ba9b5b797b673cc3a19d4d8 3 | size 38283 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/people.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5a87ea593a1642355377d8efc0ea23c09f3a0353d1bb569639bc410580b43d8c 3 | size 8405 4 | -------------------------------------------------------------------------------- /Assets/Tiles/rounded edges.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:50c5e71eeea74da2e527734da8cd4ca85d7b9d86228d784268668422ec37c3a2 3 | size 6933 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:72c321497866e719a361d75d0916611a3a99ea7c659206dc4e37c75ad18b4697 3 | size 46063 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6725e2de43a3671fe46a53518a41b1c9a3595782cab2aeddfd967729bccb468e 3 | size 45124 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b41a34b593b71a16a93acf9f77d1324d88b0e51c5f913d1fba34c9fc29f66a8f 3 | size 30921 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_4.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:beae4b62e79eaf74ec02dd01e8c6b88e1b6709de4c013111be07f4920b4923dc 3 | size 26789 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_5.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bed8798d2bdaa827ee84047f25485a9bc793d87934269730a71e5f3a2f6927bb 3 | size 28109 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_6.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c54292091bc6c2173ebce0d1be5c5e00d2ba4082a1120043abd9f542f6c30c4d 3 | size 40320 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_7.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d2a087f0af0db6a54e13a156d7f08e515de878c56211d97d2ac7f3c9e4962537 3 | size 17701 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/potions.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:771d5ae7ee10aabef46dace919684b612d804c416febac3917c8ce2f4f3ad90c 3 | size 16204 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/terrain.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5486589b9dd0a718678e78e7312f3a450ead23416cc7d4cd559418ec4c9f7d27 3 | size 13121 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/weapons.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:af0bb671dde88c8066e090fdcb873d2f633d6d6122fdadd01702967d4c55c7dc 3 | size 23607 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_undead.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f6d937f08203dfaf7336436063a4f56d6350664af0b2b6f9a574a770d23adb6f 3 | size 21457 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/monsters_uniques.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fa2d70b39939a998e37e991f5d934863139a755579aeeef6a7697e919e545bd3 3 | size 55036 4 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/town_actions.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cd617920c5274105a1b58810a2a4561ae2d9fd52c51bd3e9b6e8081c4601051b 3 | size 35475 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/Prefabs/Wall.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bcca8e81274ebdb05b3993b94cbbde5c 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/Game.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cda990e2423bbf4892e6590ba056729 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Floor.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4b491aa8eeeb41f4b1f181895829bf1 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Player.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30bbfc988221f53d281d572ec15f5ab1 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /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_RenderPipeSettingsPath: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdab175e1a6153e22a2c3f87640a4bc2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Bug.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5246b8014d4c450299ed8ee763521d6 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Goblin.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cbd4124376e864beb8b0e82dda342f2 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Lizard.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccbfdb11433de8c14a339fb58a4ddd2e 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Exit Doorway.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c4ee5d477c7057bca1c84bcef14c9d1 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Chest.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 881e2d78eca95ec58a93bf7b9fc704ac 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Dead Guy.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4f6addf14d5151a3a985a03a08f2624 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Food.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16e30999d97400d89af20f458cf5b041 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Potion.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6b98ae915011899ca005f9faf492160 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Shovel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d5519bfdff2665e2a0699f53ee9e625 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Tile Spawner.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19e3a3867dec3a58eb1e5b62f0955f40 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a72bdbce6dd258fc9cbc321546372d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 380588149f85f9974b4069b11c513c23 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eeda1434b0c1c5cc1a0bb60e222681ed 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /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/Prefabs/Enemies/Minotaur.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c63c4cbc30b72b0b696901287471a36b 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 567008ae7d044cd91adb9b325fae2cdd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e701af72191e39a66b53680ef88c8cd8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2da8870929068ecb69329b101385dac1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 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/Prefabs/Rounded Wall Edges.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 587ca258fa4db970b93230ac69da4ce0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_0.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4527e3836fac43048bde0118a87b037 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33d01a36a0326da6babb9d7f699af88e 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3315167a73703c895a022122ca815c42 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_3.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f811b236bbef3ceb5b3f0e91be8fe20f 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_4.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 892586065806bd50a8b3dbba0b0b8caa 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_5.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f13f4a64c1ef155d0a6f2040723e0287 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_6.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0242cdd83a8617a78e4197b857da024 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_7.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bd4e4ae5b70c0497895045a411402de 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_8.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0651c1ba6c442607b09c1037257485c 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_9.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd7d31f5e86e6163489091dc2eddd740 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_10.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d5990f356daa03ceb1ce8abb6a34b8d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_11.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: baa35f843cbc35d24864d11c0355d060 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_12.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b6536f903600b16b87e0cfa01d15bcf 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_13.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9765406128772c33e9bfd1eff45cd2a2 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_14.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5a61c1af2d3dccfeab80b3bfa740c61 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_15.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c8eef2e7f1aec6d1a4c4d047436676a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /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/Enemy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0b6ef16526d1b1a495eea7653bc65cd 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/Node.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49bd8708804ab460fb05c20d6bd5e124 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: e33ace70b990019ffa55c9a4713a8946 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/ExitDoorway.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7d0c01ec49aaaf3a8d8b4852ccfb65b 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/TileSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e4831b3d9e9526ed8db2fa78efaa2cd 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/DungeonManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e03432433cd8f839bca9be1ad979cfd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /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 | - enabled: 1 9 | path: Assets/Scenes/Game.unity 10 | guid: 2cda990e2423bbf4892e6590ba056729 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /Procedural Dungeons.sln.DotSettings: -------------------------------------------------------------------------------- 1 | 2 | True -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 1 11 | m_SpritePackerMode: 4 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /Assets/Scripts/ExitDoorway.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.SceneManagement; 3 | 4 | [RequireComponent(typeof(Rigidbody2D), typeof(BoxCollider2D))] 5 | public class ExitDoorway : MonoBehaviour 6 | { 7 | private void Reset() 8 | { 9 | GetComponent().isKinematic = true; 10 | 11 | var box = GetComponent(); 12 | box.size = Vector2.one * 0.2f; 13 | box.isTrigger = true; 14 | } 15 | 16 | private void OnTriggerEnter2D(Collider2D other) 17 | { 18 | // On player collision, reload level 19 | if (other.CompareTag("Player")) 20 | { 21 | SceneManager.LoadScene(SceneManager.GetActiveScene().name); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - Player 17 | - Enemy 18 | - Wall 19 | - Floor 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Floor 42 | uniqueID: 1262219481 43 | locked: 0 44 | - name: Default 45 | uniqueID: 0 46 | locked: 0 47 | - name: Character 48 | uniqueID: 1761955465 49 | locked: 0 50 | - name: Wall 51 | uniqueID: 3194807433 52 | locked: 0 53 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Markus Mayer and 2019 Billy McDaniel 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: 7 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Procedural Dungeon Generation 2 | 3 | This repo implements and extends upon the ideas presented in the 4 | [Unity 2D Random Dungeon Generator for a Roguelike Video Game](https://www.udemy.com/course/unity-2d-random-dungeon-generator-for-a-roguelike-video-game/) 5 | Udemy course. 6 | 7 | Features implemented: 8 | 9 | - Cheapo 2D "animations" using tile flipping (looking left and right), 10 | - Automatic wall placement around floor tiles using a self-deleting spawner object, 11 | - Rounded corners on top of base sprites using bitmasking techniques for prefab selection, 12 | - Level generation using 13 | - Plain random walks ("caverns" mode), 14 | - Constrained random walks and 15 | - Random rooms generation ("rooms" and "winding" mode), 16 | - Random item and enemy placement, 17 | - Enemy patrols using random walks and player chasing using simplified A* pathfinding. 18 | 19 | This project uses David Gervais' graphics tileset from the [Angband](https://rephial.org/) game released under a CC BY 3.0 license (the graphics, not the game; see [here](https://angband.readthedocs.io/en/latest/copying.html)). 20 | 21 | A random level in the editor: 22 | 23 | ![Editor view](.readme/editor.png) 24 | 25 | Game view: 26 | 27 | ![Game view](.readme/game.png) 28 | 29 | Generating levels: 30 | 31 | ![Level generation](.readme/levels.webp) 32 | 33 | Pathfinding in effect: 34 | 35 | ![Pathfinding](.readme/pathfinding.webp) 36 | -------------------------------------------------------------------------------- /Assets/Prefabs/Tile Spawner.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8499686360174531855 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: 8499686360174531853} 12 | - component: {fileID: 8499686360174531854} 13 | m_Layer: 0 14 | m_Name: Tile Spawner 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &8499686360174531853 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: 8499686360174531855} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &8499686360174531854 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 8499686360174531855} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 6e4831b3d9e9526ed8db2fa78efaa2cd, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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.collab-proxy": "1.2.16", 6 | "com.unity.ext.nunit": "1.0.0", 7 | "com.unity.ide.rider": "1.1.0", 8 | "com.unity.ide.vscode": "1.0.7", 9 | "com.unity.test-framework": "1.0.17", 10 | "com.unity.textmeshpro": "2.0.1", 11 | "com.unity.timeline": "1.1.0", 12 | "com.unity.ugui": "1.0.0", 13 | "com.unity.modules.ai": "1.0.0", 14 | "com.unity.modules.androidjni": "1.0.0", 15 | "com.unity.modules.animation": "1.0.0", 16 | "com.unity.modules.assetbundle": "1.0.0", 17 | "com.unity.modules.audio": "1.0.0", 18 | "com.unity.modules.cloth": "1.0.0", 19 | "com.unity.modules.director": "1.0.0", 20 | "com.unity.modules.imageconversion": "1.0.0", 21 | "com.unity.modules.imgui": "1.0.0", 22 | "com.unity.modules.jsonserialize": "1.0.0", 23 | "com.unity.modules.particlesystem": "1.0.0", 24 | "com.unity.modules.physics": "1.0.0", 25 | "com.unity.modules.physics2d": "1.0.0", 26 | "com.unity.modules.screencapture": "1.0.0", 27 | "com.unity.modules.terrain": "1.0.0", 28 | "com.unity.modules.terrainphysics": "1.0.0", 29 | "com.unity.modules.tilemap": "1.0.0", 30 | "com.unity.modules.ui": "1.0.0", 31 | "com.unity.modules.uielements": "1.0.0", 32 | "com.unity.modules.umbra": "1.0.0", 33 | "com.unity.modules.unityanalytics": "1.0.0", 34 | "com.unity.modules.unitywebrequest": "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 38 | "com.unity.modules.unitywebrequestwww": "1.0.0", 39 | "com.unity.modules.vehicles": "1.0.0", 40 | "com.unity.modules.video": "1.0.0", 41 | "com.unity.modules.vr": "1.0.0", 42 | "com.unity.modules.wind": "1.0.0", 43 | "com.unity.modules.xr": "1.0.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /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: 10753, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 34 | m_PreloadedShaders: [] 35 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 36 | type: 0} 37 | m_CustomRenderPipeline: {fileID: 0} 38 | m_TransparencySortMode: 0 39 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 40 | m_DefaultRenderingPath: 1 41 | m_DefaultMobileRenderingPath: 1 42 | m_TierSettings: [] 43 | m_LightmapStripping: 0 44 | m_FogStripping: 0 45 | m_InstancingStripping: 0 46 | m_LightmapKeepPlain: 1 47 | m_LightmapKeepDirCombined: 1 48 | m_LightmapKeepDynamicPlain: 1 49 | m_LightmapKeepDynamicDirCombined: 1 50 | m_LightmapKeepShadowMask: 1 51 | m_LightmapKeepSubtractive: 1 52 | m_FogKeepLinear: 1 53 | m_FogKeepExp: 1 54 | m_FogKeepExp2: 1 55 | m_AlbedoSwatchInfos: [] 56 | m_LightsUseLinearIntensity: 0 57 | m_LightsUseColorTemperature: 0 58 | -------------------------------------------------------------------------------- /Assets/Scripts/TileSpawner.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | public class TileSpawner : MonoBehaviour 5 | { 6 | private DungeonManager _dm; 7 | 8 | private void Awake() 9 | { 10 | _dm = FindObjectOfType(); 11 | 12 | // Convert this spawner to a floor tile. Because we're going to spawn walls in 13 | // unoccupied tiles, we need to make sure the floor exists before the walls are placed. 14 | var pos = transform.position; 15 | var goFloor = Instantiate(_dm.floorPrefab, pos, Quaternion.identity, _dm.transform); 16 | goFloor.name = _dm.floorPrefab.name; 17 | 18 | // Extend the map size in the manager. 19 | _dm.maxX = Math.Max(_dm.maxX, pos.x); 20 | _dm.minX = Math.Min(_dm.minX, pos.x); 21 | _dm.maxY = Math.Max(_dm.maxY, pos.y); 22 | _dm.minY = Math.Min(_dm.minY, pos.y); 23 | } 24 | 25 | private void Start() 26 | { 27 | var envMask = LayerMask.GetMask("Wall", "Floor"); 28 | var hitSize = Vector2.one * 0.8f; 29 | 30 | // Starting at the spawner's position, check whether there's a covered tile 31 | // on each of the four sides. If there isn't any, place a wall. 32 | var pos = transform.position; 33 | for (var x = -1; x <= 1; ++x) 34 | { 35 | for (var y = -1; y <= 1; ++y) 36 | { 37 | var targetPos = new Vector2(pos.x + x, pos.y + y); 38 | var hit = Physics2D.OverlapBox(targetPos, hitSize, 0, envMask); 39 | if (hit) continue; 40 | 41 | // The tile we're inspecting is empty, so create a wall here. 42 | var goWall = Instantiate(_dm.wallPrefab, targetPos, Quaternion.identity, _dm.transform); 43 | goWall.name = _dm.wallPrefab.name; 44 | } 45 | } 46 | 47 | // Remove the tile spawner from the game. 48 | Destroy(gameObject); 49 | } 50 | 51 | private void OnDrawGizmos() 52 | { 53 | Gizmos.color = Color.white; 54 | Gizmos.DrawCube(transform.position, Vector3.one); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # 3D models 2 | *.3dm filter=lfs diff=lfs merge=lfs -text 3 | *.3ds filter=lfs diff=lfs merge=lfs -text 4 | *.blend filter=lfs diff=lfs merge=lfs -text 5 | *.c4d filter=lfs diff=lfs merge=lfs -text 6 | *.collada filter=lfs diff=lfs merge=lfs -text 7 | *.dae filter=lfs diff=lfs merge=lfs -text 8 | *.dxf filter=lfs diff=lfs merge=lfs -text 9 | *.fbx filter=lfs diff=lfs merge=lfs -text 10 | *.jas filter=lfs diff=lfs merge=lfs -text 11 | *.lws filter=lfs diff=lfs merge=lfs -text 12 | *.lxo filter=lfs diff=lfs merge=lfs -text 13 | *.ma filter=lfs diff=lfs merge=lfs -text 14 | *.max filter=lfs diff=lfs merge=lfs -text 15 | *.mb filter=lfs diff=lfs merge=lfs -text 16 | *.obj filter=lfs diff=lfs merge=lfs -text 17 | *.ply filter=lfs diff=lfs merge=lfs -text 18 | *.skp filter=lfs diff=lfs merge=lfs -text 19 | *.stl filter=lfs diff=lfs merge=lfs -text 20 | *.ztl filter=lfs diff=lfs merge=lfs -text 21 | 22 | # Audio 23 | *.aif filter=lfs diff=lfs merge=lfs -text 24 | *.aiff filter=lfs diff=lfs merge=lfs -text 25 | *.it filter=lfs diff=lfs merge=lfs -text 26 | *.mod filter=lfs diff=lfs merge=lfs -text 27 | *.mp3 filter=lfs diff=lfs merge=lfs -text 28 | *.ogg filter=lfs diff=lfs merge=lfs -text 29 | *.s3m filter=lfs diff=lfs merge=lfs -text 30 | *.wav filter=lfs diff=lfs merge=lfs -text 31 | *.xm filter=lfs diff=lfs merge=lfs -text 32 | 33 | # Fonts 34 | *.otf filter=lfs diff=lfs merge=lfs -text 35 | *.ttf filter=lfs diff=lfs merge=lfs -text 36 | 37 | # Images 38 | *.bmp filter=lfs diff=lfs merge=lfs -text 39 | *.exr filter=lfs diff=lfs merge=lfs -text 40 | *.gif filter=lfs diff=lfs merge=lfs -text 41 | *.hdr filter=lfs diff=lfs merge=lfs -text 42 | *.iff filter=lfs diff=lfs merge=lfs -text 43 | *.jpeg filter=lfs diff=lfs merge=lfs -text 44 | *.jpg filter=lfs diff=lfs merge=lfs -text 45 | *.pict filter=lfs diff=lfs merge=lfs -text 46 | *.png filter=lfs diff=lfs merge=lfs -text 47 | *.psd filter=lfs diff=lfs merge=lfs -text 48 | *.tga filter=lfs diff=lfs merge=lfs -text 49 | *.tif filter=lfs diff=lfs merge=lfs -text 50 | *.tiff filter=lfs diff=lfs merge=lfs -text 51 | 52 | # Collapse Unity-generated files on GitHub 53 | *.asset linguist-generated 54 | *.mat linguist-generated 55 | *.meta linguist-generated 56 | *.prefab linguist-generated 57 | *.unity linguist-generated 58 | 59 | -------------------------------------------------------------------------------- /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_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/Scripts/Node.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using JetBrains.Annotations; 3 | using UnityEngine; 4 | 5 | /// 6 | /// An A* node. 7 | /// 8 | [DebuggerDisplay("pos: {Position}, parent: {Parent}, score: {Score}")] 9 | public sealed class Node 10 | { 11 | /// 12 | /// The node's position. 13 | /// 14 | public readonly Vector2 Position; 15 | 16 | /// 17 | /// The node's parent. 18 | /// 19 | public readonly Node Parent; 20 | 21 | /// 22 | /// The Manhattan distance from the start, or: 23 | /// The number of steps taken to reach this position, or: 24 | /// The G-score. 25 | /// 26 | public readonly float DistanceFromStart; 27 | 28 | /// 29 | /// The Manhattan distance heuristic from this node ot the target, or: 30 | /// The estimated number of steps yet to take, or: 31 | /// The H-score. 32 | /// 33 | public readonly float DistanceHeuristicToTarget; 34 | 35 | /// 36 | /// The combined score of this node, or: 37 | /// The H-score. 38 | /// 39 | /// 40 | /// 41 | public readonly float Score; 42 | 43 | /// 44 | /// Initializes a new instance of the class. 45 | /// 46 | /// The position. 47 | /// The parent. 48 | /// 49 | /// The Manhattan distance from the start, or: 50 | /// The number of steps taken to reach this position. 51 | /// 52 | /// 53 | /// The Manhattan distance heuristic from this node ot the target, or: 54 | /// The estimated number of steps yet to take. 55 | /// 56 | public Node(Vector2 position, [CanBeNull] Node parent, float gScore, float hScore) 57 | { 58 | Position = position; 59 | Parent = parent; 60 | DistanceFromStart = gScore; 61 | DistanceHeuristicToTarget = hScore; 62 | Score = gScore + hScore; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /.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 | 13 | # Never ignore Asset meta data 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | *~ 62 | 63 | # temporary files which can be created if a process still has a handle open of a deleted file 64 | .fuse_hidden* 65 | 66 | # KDE directory preferences 67 | .directory 68 | 69 | # Linux trash folder which might appear on any partition or disk 70 | .Trash-* 71 | 72 | # .nfs files are created when an open file is removed but is still being accessed 73 | .nfs* 74 | 75 | # Created by https://www.gitignore.io/api/unity 76 | # Edit at https://www.gitignore.io/?templates=unity 77 | 78 | # Jetbrain Rider Cache 79 | .idea/ 80 | Assets/Plugins/Editor/JetBrains* 81 | 82 | # Visual Studio Code 83 | .vscode/ 84 | 85 | 86 | ### Unity ### 87 | [Ll]ibrary/ 88 | [Tt]emp/ 89 | [Oo]bj/ 90 | [Bb]uild/ 91 | [Bb]uilds/ 92 | Assets/AssetStoreTools* 93 | 94 | # Visual Studio cache directory 95 | .vs/ 96 | 97 | # Autogenerated VS/MD/Consulo solution and project files 98 | ExportedObj/ 99 | .consulo/ 100 | *.csproj 101 | *.unityproj 102 | *.sln 103 | *.suo 104 | *.tmp 105 | *.user 106 | *.userprefs 107 | *.pidb 108 | *.booproj 109 | *.svd 110 | *.pdb 111 | *.opendb 112 | *.VC.db 113 | 114 | # Unity3D generated meta files 115 | *.pidb.meta 116 | *.pdb.meta 117 | 118 | # Unity3D Generated File On Crash Reports 119 | sysinfo.txt 120 | 121 | # Builds 122 | *.apk 123 | *.unitypackage 124 | 125 | # End of https://www.gitignore.io/api/unity 126 | 127 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_0.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &56295710450880651 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: 56295710450880649} 12 | - component: {fileID: 56295710450880648} 13 | m_Layer: 0 14 | m_Name: rounded edges_0 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &56295710450880649 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: 56295710450880651} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &56295710450880648 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 56295710450880651} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 8410248780861440783, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_1.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &7888775862247431992 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: 7888775862247431990} 12 | - component: {fileID: 7888775862247431991} 13 | m_Layer: 0 14 | m_Name: rounded edges_1 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &7888775862247431990 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: 7888775862247431992} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &7888775862247431991 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 7888775862247431992} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 675802755037269911, guid: 31628f06b081e56d7820ecb026768a6a, type: 3} 74 | m_Color: {r: 1, g: 1, b: 1, a: 1} 75 | m_FlipX: 0 76 | m_FlipY: 0 77 | m_DrawMode: 0 78 | m_Size: {x: 2, y: 2} 79 | m_AdaptiveModeThreshold: 0.5 80 | m_SpriteTileMode: 0 81 | m_WasSpriteAssigned: 1 82 | m_MaskInteraction: 0 83 | m_SpriteSortPoint: 0 84 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_2.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3253511571748021597 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: 3253511571748021539} 12 | - component: {fileID: 3253511571748021596} 13 | m_Layer: 0 14 | m_Name: rounded edges_2 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &3253511571748021539 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: 3253511571748021597} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &3253511571748021596 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 3253511571748021597} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 856475371453678166, guid: 31628f06b081e56d7820ecb026768a6a, type: 3} 74 | m_Color: {r: 1, g: 1, b: 1, a: 1} 75 | m_FlipX: 0 76 | m_FlipY: 0 77 | m_DrawMode: 0 78 | m_Size: {x: 2, y: 2} 79 | m_AdaptiveModeThreshold: 0.5 80 | m_SpriteTileMode: 0 81 | m_WasSpriteAssigned: 1 82 | m_MaskInteraction: 0 83 | m_SpriteSortPoint: 0 84 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_15.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &840328909662834443 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: 840328909662834445} 12 | - component: {fileID: 840328909662834444} 13 | m_Layer: 0 14 | m_Name: rounded edges_15 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &840328909662834445 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: 840328909662834443} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &840328909662834444 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 840328909662834443} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 6168109609856640168, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_3.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &801677988019259861 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: 801677988019259863} 12 | - component: {fileID: 801677988019259860} 13 | m_Layer: 0 14 | m_Name: rounded edges_3 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &801677988019259863 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: 801677988019259861} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &801677988019259860 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 801677988019259861} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: -6348339511727559580, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_5.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &502606101825244420 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: 502606101825244422} 12 | - component: {fileID: 502606101825244423} 13 | m_Layer: 0 14 | m_Name: rounded edges_5 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &502606101825244422 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: 502606101825244420} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &502606101825244423 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 502606101825244420} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: -2838720525954876384, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_10.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5585876629474461368 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: 5585876629474461374} 12 | - component: {fileID: 5585876629474461369} 13 | m_Layer: 0 14 | m_Name: rounded edges_10 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &5585876629474461374 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: 5585876629474461368} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &5585876629474461369 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 5585876629474461368} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 7028757175473205463, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_4.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4497954316926719343 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: 4497954316926719337} 12 | - component: {fileID: 4497954316926719336} 13 | m_Layer: 0 14 | m_Name: rounded edges_4 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4497954316926719337 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: 4497954316926719343} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &4497954316926719336 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 4497954316926719343} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 3733104212049268374, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_6.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1662012753486552759 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: 1662012753486552757} 12 | - component: {fileID: 1662012753486552756} 13 | m_Layer: 0 14 | m_Name: rounded edges_6 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1662012753486552757 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: 1662012753486552759} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &1662012753486552756 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 1662012753486552759} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 7928215021246857485, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_7.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3146828284631345724 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: 3146828284631345726} 12 | - component: {fileID: 3146828284631345725} 13 | m_Layer: 0 14 | m_Name: rounded edges_7 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &3146828284631345726 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: 3146828284631345724} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &3146828284631345725 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 3146828284631345724} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 3227081369044540097, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_8.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &2015342432750221360 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: 2015342432750221362} 12 | - component: {fileID: 2015342432750221363} 13 | m_Layer: 0 14 | m_Name: rounded edges_8 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &2015342432750221362 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: 2015342432750221360} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &2015342432750221363 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 2015342432750221360} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 6541215572222386196, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_9.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &7290173597987974925 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: 7290173597987974927} 12 | - component: {fileID: 7290173597987974926} 13 | m_Layer: 0 14 | m_Name: rounded edges_9 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &7290173597987974927 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: 7290173597987974925} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &7290173597987974926 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 7290173597987974925} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: 7381526431917690511, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_11.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6351262694034833085 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: 6351262694034833027} 12 | - component: {fileID: 6351262694034833084} 13 | m_Layer: 0 14 | m_Name: rounded edges_11 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &6351262694034833027 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: 6351262694034833085} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &6351262694034833084 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 6351262694034833085} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: -5901092682556643669, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_12.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6469243058042122431 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: 6469243058042122401} 12 | - component: {fileID: 6469243058042122430} 13 | m_Layer: 0 14 | m_Name: rounded edges_12 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &6469243058042122401 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: 6469243058042122431} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &6469243058042122430 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 6469243058042122431} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: -7667512614877466562, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_13.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &2778999152139377518 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: 2778999152139377516} 12 | - component: {fileID: 2778999152139377517} 13 | m_Layer: 0 14 | m_Name: rounded edges_13 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &2778999152139377516 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: 2778999152139377518} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &2778999152139377517 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 2778999152139377518} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: -7939464547821460297, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Prefabs/Rounded Wall Edges/rounded edges_14.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1247938255959545874 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: 1247938255959545876} 12 | - component: {fileID: 1247938255959545875} 13 | m_Layer: 0 14 | m_Name: rounded edges_14 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1247938255959545876 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: 1247938255959545874} 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: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!212 &1247938255959545875 35 | SpriteRenderer: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 1247938255959545874} 41 | m_Enabled: 1 42 | m_CastShadows: 0 43 | m_ReceiveShadows: 0 44 | m_DynamicOccludee: 1 45 | m_MotionVectors: 1 46 | m_LightProbeUsage: 1 47 | m_ReflectionProbeUsage: 1 48 | m_RayTracingMode: 0 49 | m_RenderingLayerMask: 1 50 | m_RendererPriority: 0 51 | m_Materials: 52 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 53 | m_StaticBatchInfo: 54 | firstSubMesh: 0 55 | subMeshCount: 0 56 | m_StaticBatchRoot: {fileID: 0} 57 | m_ProbeAnchor: {fileID: 0} 58 | m_LightProbeVolumeOverride: {fileID: 0} 59 | m_ScaleInLightmap: 1 60 | m_ReceiveGI: 1 61 | m_PreserveUVs: 0 62 | m_IgnoreNormalsForChartDetection: 0 63 | m_ImportantGI: 0 64 | m_StitchLightmapSeams: 1 65 | m_SelectedEditorRenderState: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: -1100159863 71 | m_SortingLayer: 2 72 | m_SortingOrder: 1 73 | m_Sprite: {fileID: -3853076877310878772, guid: 31628f06b081e56d7820ecb026768a6a, 74 | type: 3} 75 | m_Color: {r: 1, g: 1, b: 1, a: 1} 76 | m_FlipX: 0 77 | m_FlipY: 0 78 | m_DrawMode: 0 79 | m_Size: {x: 2, y: 2} 80 | m_AdaptiveModeThreshold: 0.5 81 | m_SpriteTileMode: 0 82 | m_WasSpriteAssigned: 1 83 | m_MaskInteraction: 0 84 | m_SpriteSortPoint: 0 85 | -------------------------------------------------------------------------------- /Assets/Scripts/Player.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using UnityEngine; 4 | 5 | public class Player : MonoBehaviour 6 | { 7 | public float speed = 1.0f; 8 | 9 | private Transform _gfx; 10 | private float _flipX; 11 | private bool _isMoving; 12 | private LayerMask _obstacleMask; 13 | private Vector2 _targetPos; 14 | 15 | private void Start() 16 | { 17 | _obstacleMask = LayerMask.GetMask("Wall", "Enemy"); 18 | 19 | _gfx = GetComponentInChildren().transform; 20 | _flipX = _gfx.localScale.x; 21 | } 22 | 23 | private void Update() 24 | { 25 | Move(); 26 | } 27 | 28 | private void Move() 29 | { 30 | // Using Math.Sign() rather than Mathf.Sign() because we want 0 to be mapped to a 0 sign. 31 | // Note that we're also using GetAxisRaw instead of GetAxis. 32 | var horizontal = Math.Sign(Input.GetAxisRaw("Horizontal")); 33 | var vertical = Math.Sign(Input.GetAxisRaw("Vertical")); 34 | 35 | var xPressed = Mathf.Abs(horizontal) > 0; 36 | var yPressed = Mathf.Abs(vertical) > 0; 37 | if (!xPressed && !yPressed) return; 38 | 39 | if (xPressed) 40 | { 41 | _gfx.localScale = new Vector2(_flipX * horizontal, _gfx.localScale.y); 42 | } 43 | 44 | if (_isMoving) return; 45 | 46 | // Set new target position 47 | var pos = transform.position; 48 | if (xPressed) 49 | { 50 | _targetPos = new Vector2(pos.x + horizontal, pos.y); 51 | } 52 | else 53 | { 54 | Debug.Assert(yPressed, "yPressed == true"); 55 | _targetPos = new Vector2(pos.x, pos.y + vertical); 56 | } 57 | 58 | // Check for collisions 59 | var hitSize = Vector2.one * 0.8f; 60 | var hit = Physics2D.OverlapBox(_targetPos, hitSize, 0, _obstacleMask); 61 | if (!hit) 62 | { 63 | StartCoroutine(SmoothMove()); 64 | } 65 | } 66 | 67 | private IEnumerator SmoothMove() 68 | { 69 | Debug.Assert(!_isMoving, "!_isMoving"); 70 | _isMoving = true; 71 | 72 | // Approach the target position just enough to be almost there. 73 | while (Vector2.Distance(transform.position, _targetPos) > 0.01f) 74 | { 75 | transform.position = Vector2.MoveTowards(transform.position, _targetPos, speed * Time.deltaTime); 76 | yield return null; 77 | } 78 | 79 | // Fix the target position. 80 | transform.position = _targetPos; 81 | _isMoving = false; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Chest.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &803942442477431842 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: 2070333078399260486} 12 | - component: {fileID: 8265194077363779440} 13 | - component: {fileID: 3635532922495742017} 14 | m_Layer: 0 15 | m_Name: Chest 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &2070333078399260486 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: 803942442477431842} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &8265194077363779440 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 803942442477431842} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 0 72 | m_SortingLayer: 0 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: 5770958956045166959, guid: 99892656a8d55df58acb9ca314f3d7fa, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &3635532922495742017 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 803942442477431842} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 0.8, y: 0.8} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Wall.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &355985668678716677 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: 5549940441291689359} 12 | - component: {fileID: 3354433456356337157} 13 | - component: {fileID: 6622489102514133062} 14 | m_Layer: 10 15 | m_Name: Wall 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &5549940441291689359 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: 355985668678716677} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &3354433456356337157 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 355985668678716677} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: -1100159863 72 | m_SortingLayer: 2 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: -7381383704308568027, guid: 6acbc12042c63abdfbec8c1a65746904, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &6622489102514133062 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 355985668678716677} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 1, y: 1} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Floor.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4514925030624558333 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: 7253321352273889868} 12 | - component: {fileID: 7727859982015284411} 13 | - component: {fileID: 1025538763102863731} 14 | m_Layer: 11 15 | m_Name: Floor 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &7253321352273889868 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: 4514925030624558333} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &7727859982015284411 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 4514925030624558333} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 1262219481 72 | m_SortingLayer: -1 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: 2963411684039260603, guid: 6acbc12042c63abdfbec8c1a65746904, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &1025538763102863731 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 4514925030624558333} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 1, y: 1} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Food.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &7963301040627391820 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: 3086723400378512113} 12 | - component: {fileID: 7180382133275411652} 13 | - component: {fileID: 6793926742322570402} 14 | m_Layer: 0 15 | m_Name: Food 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &3086723400378512113 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: 7963301040627391820} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &7180382133275411652 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 7963301040627391820} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 0 72 | m_SortingLayer: 0 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: -5869159905583118294, guid: e6a3887a7f0aa876f8720d0843c6e827, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &6793926742322570402 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 7963301040627391820} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 0.8, y: 0.8} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Potion.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &481483911927382665 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: 4951821562685920849} 12 | - component: {fileID: 4703918805343655056} 13 | - component: {fileID: 2543967401596377081} 14 | m_Layer: 0 15 | m_Name: Potion 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &4951821562685920849 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: 481483911927382665} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &4703918805343655056 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 481483911927382665} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 0 72 | m_SortingLayer: 0 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: 8927841991104152703, guid: 9504094277e051177809396e2f2b824a, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &2543967401596377081 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 481483911927382665} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 0.8, y: 0.8} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Dead Guy.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8375119382021737765 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: 3541486353921134385} 12 | - component: {fileID: 7022253697022602150} 13 | - component: {fileID: 3681666822820764780} 14 | m_Layer: 0 15 | m_Name: DeadGuy 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &3541486353921134385 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: 8375119382021737765} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &7022253697022602150 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 8375119382021737765} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 0 72 | m_SortingLayer: 0 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: 3159106351986071793, guid: 99892656a8d55df58acb9ca314f3d7fa, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &3681666822820764780 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 8375119382021737765} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 0.8, y: 0.8} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Items/Shovel.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5856893494495828445 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: 1264986078401874966} 12 | - component: {fileID: 4013254411775586309} 13 | - component: {fileID: 4024115739521710304} 14 | m_Layer: 0 15 | m_Name: Shovel 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &1264986078401874966 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: 5856893494495828445} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &4013254411775586309 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 5856893494495828445} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_MotionVectors: 1 47 | m_LightProbeUsage: 1 48 | m_ReflectionProbeUsage: 1 49 | m_RayTracingMode: 0 50 | m_RenderingLayerMask: 1 51 | m_RendererPriority: 0 52 | m_Materials: 53 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 54 | m_StaticBatchInfo: 55 | firstSubMesh: 0 56 | subMeshCount: 0 57 | m_StaticBatchRoot: {fileID: 0} 58 | m_ProbeAnchor: {fileID: 0} 59 | m_LightProbeVolumeOverride: {fileID: 0} 60 | m_ScaleInLightmap: 1 61 | m_ReceiveGI: 1 62 | m_PreserveUVs: 0 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_StitchLightmapSeams: 1 66 | m_SelectedEditorRenderState: 0 67 | m_MinimumChartSize: 4 68 | m_AutoUVMaxDistance: 0.5 69 | m_AutoUVMaxAngle: 89 70 | m_LightmapParameters: {fileID: 0} 71 | m_SortingLayerID: 0 72 | m_SortingLayer: 0 73 | m_SortingOrder: 0 74 | m_Sprite: {fileID: -3886400824498688547, guid: 99892656a8d55df58acb9ca314f3d7fa, 75 | type: 3} 76 | m_Color: {r: 1, g: 1, b: 1, a: 1} 77 | m_FlipX: 0 78 | m_FlipY: 0 79 | m_DrawMode: 0 80 | m_Size: {x: 1, y: 1} 81 | m_AdaptiveModeThreshold: 0.5 82 | m_SpriteTileMode: 0 83 | m_WasSpriteAssigned: 1 84 | m_MaskInteraction: 0 85 | m_SpriteSortPoint: 0 86 | --- !u!61 &4024115739521710304 87 | BoxCollider2D: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | m_GameObject: {fileID: 5856893494495828445} 93 | m_Enabled: 1 94 | m_Density: 1 95 | m_Material: {fileID: 0} 96 | m_IsTrigger: 0 97 | m_UsedByEffector: 0 98 | m_UsedByComposite: 0 99 | m_Offset: {x: 0, y: 0} 100 | m_SpriteTilingProperty: 101 | border: {x: 0, y: 0, z: 0, w: 0} 102 | pivot: {x: 0.5, y: 0.5} 103 | oldSize: {x: 1, y: 1} 104 | newSize: {x: 1, y: 1} 105 | adaptiveTilingThreshold: 0.5 106 | drawMode: 0 107 | adaptiveTiling: 0 108 | m_AutoTiling: 0 109 | serializedVersion: 2 110 | m_Size: {x: 0.8, y: 0.8} 111 | m_EdgeRadius: 0 112 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Bug.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &518722715976971678 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: 5581291462629994918} 12 | - component: {fileID: 2601529333310580349} 13 | - component: {fileID: 4045443790896892014} 14 | - component: {fileID: 6628192172014992753} 15 | m_Layer: 9 16 | m_Name: Bug 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &5581291462629994918 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 518722715976971678} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &2601529333310580349 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 518722715976971678} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: f0b6ef16526d1b1a495eea7653bc65cd, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | patrolInterval: {x: 1, y: 2} 49 | damageRange: {x: 1, y: 2} 50 | moveSpeed: 5 51 | chaseDelay: 0.3 52 | alertRange: 10 53 | chaseRange: 20 54 | chaseDuration: 2 55 | --- !u!212 &4045443790896892014 56 | SpriteRenderer: 57 | m_ObjectHideFlags: 0 58 | m_CorrespondingSourceObject: {fileID: 0} 59 | m_PrefabInstance: {fileID: 0} 60 | m_PrefabAsset: {fileID: 0} 61 | m_GameObject: {fileID: 518722715976971678} 62 | m_Enabled: 1 63 | m_CastShadows: 0 64 | m_ReceiveShadows: 0 65 | m_DynamicOccludee: 1 66 | m_MotionVectors: 1 67 | m_LightProbeUsage: 1 68 | m_ReflectionProbeUsage: 1 69 | m_RayTracingMode: 0 70 | m_RenderingLayerMask: 1 71 | m_RendererPriority: 0 72 | m_Materials: 73 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 74 | m_StaticBatchInfo: 75 | firstSubMesh: 0 76 | subMeshCount: 0 77 | m_StaticBatchRoot: {fileID: 0} 78 | m_ProbeAnchor: {fileID: 0} 79 | m_LightProbeVolumeOverride: {fileID: 0} 80 | m_ScaleInLightmap: 1 81 | m_ReceiveGI: 1 82 | m_PreserveUVs: 0 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 1 86 | m_SelectedEditorRenderState: 0 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | m_Sprite: {fileID: 260336568179506681, guid: f338732e4db693d2795a52da51aa5cc3, type: 3} 95 | m_Color: {r: 1, g: 1, b: 1, a: 1} 96 | m_FlipX: 1 97 | m_FlipY: 0 98 | m_DrawMode: 0 99 | m_Size: {x: 1, y: 1} 100 | m_AdaptiveModeThreshold: 0.5 101 | m_SpriteTileMode: 0 102 | m_WasSpriteAssigned: 1 103 | m_MaskInteraction: 0 104 | m_SpriteSortPoint: 0 105 | --- !u!61 &6628192172014992753 106 | BoxCollider2D: 107 | m_ObjectHideFlags: 0 108 | m_CorrespondingSourceObject: {fileID: 0} 109 | m_PrefabInstance: {fileID: 0} 110 | m_PrefabAsset: {fileID: 0} 111 | m_GameObject: {fileID: 518722715976971678} 112 | m_Enabled: 1 113 | m_Density: 1 114 | m_Material: {fileID: 0} 115 | m_IsTrigger: 0 116 | m_UsedByEffector: 0 117 | m_UsedByComposite: 0 118 | m_Offset: {x: 0, y: 0} 119 | m_SpriteTilingProperty: 120 | border: {x: 0, y: 0, z: 0, w: 0} 121 | pivot: {x: 0.5, y: 0.5} 122 | oldSize: {x: 1, y: 1} 123 | newSize: {x: 1, y: 1} 124 | adaptiveTilingThreshold: 0.5 125 | drawMode: 0 126 | adaptiveTiling: 0 127 | m_AutoTiling: 0 128 | serializedVersion: 2 129 | m_Size: {x: 0.8, y: 0.8} 130 | m_EdgeRadius: 0 131 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Lizard.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &2193353400922159813 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: 318309703030891908} 12 | - component: {fileID: 1719292844071924189} 13 | - component: {fileID: 1549789975068999586} 14 | - component: {fileID: 4516349450599568113} 15 | m_Layer: 9 16 | m_Name: Lizard 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &318309703030891908 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 2193353400922159813} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &1719292844071924189 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 2193353400922159813} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: f0b6ef16526d1b1a495eea7653bc65cd, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | patrolInterval: {x: 1, y: 2} 49 | damageRange: {x: 1, y: 2} 50 | moveSpeed: 5 51 | chaseDelay: 0.3 52 | alertRange: 10 53 | chaseRange: 20 54 | chaseDuration: 2 55 | --- !u!212 &1549789975068999586 56 | SpriteRenderer: 57 | m_ObjectHideFlags: 0 58 | m_CorrespondingSourceObject: {fileID: 0} 59 | m_PrefabInstance: {fileID: 0} 60 | m_PrefabAsset: {fileID: 0} 61 | m_GameObject: {fileID: 2193353400922159813} 62 | m_Enabled: 1 63 | m_CastShadows: 0 64 | m_ReceiveShadows: 0 65 | m_DynamicOccludee: 1 66 | m_MotionVectors: 1 67 | m_LightProbeUsage: 1 68 | m_ReflectionProbeUsage: 1 69 | m_RayTracingMode: 0 70 | m_RenderingLayerMask: 1 71 | m_RendererPriority: 0 72 | m_Materials: 73 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 74 | m_StaticBatchInfo: 75 | firstSubMesh: 0 76 | subMeshCount: 0 77 | m_StaticBatchRoot: {fileID: 0} 78 | m_ProbeAnchor: {fileID: 0} 79 | m_LightProbeVolumeOverride: {fileID: 0} 80 | m_ScaleInLightmap: 1 81 | m_ReceiveGI: 1 82 | m_PreserveUVs: 0 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 1 86 | m_SelectedEditorRenderState: 0 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | m_Sprite: {fileID: 8256070212133171565, guid: f338732e4db693d2795a52da51aa5cc3, 95 | type: 3} 96 | m_Color: {r: 1, g: 1, b: 1, a: 1} 97 | m_FlipX: 1 98 | m_FlipY: 0 99 | m_DrawMode: 0 100 | m_Size: {x: 1, y: 1} 101 | m_AdaptiveModeThreshold: 0.5 102 | m_SpriteTileMode: 0 103 | m_WasSpriteAssigned: 1 104 | m_MaskInteraction: 0 105 | m_SpriteSortPoint: 0 106 | --- !u!61 &4516349450599568113 107 | BoxCollider2D: 108 | m_ObjectHideFlags: 0 109 | m_CorrespondingSourceObject: {fileID: 0} 110 | m_PrefabInstance: {fileID: 0} 111 | m_PrefabAsset: {fileID: 0} 112 | m_GameObject: {fileID: 2193353400922159813} 113 | m_Enabled: 1 114 | m_Density: 1 115 | m_Material: {fileID: 0} 116 | m_IsTrigger: 0 117 | m_UsedByEffector: 0 118 | m_UsedByComposite: 0 119 | m_Offset: {x: 0, y: 0} 120 | m_SpriteTilingProperty: 121 | border: {x: 0, y: 0, z: 0, w: 0} 122 | pivot: {x: 0.5, y: 0.5} 123 | oldSize: {x: 1, y: 1} 124 | newSize: {x: 1, y: 1} 125 | adaptiveTilingThreshold: 0.5 126 | drawMode: 0 127 | adaptiveTiling: 0 128 | m_AutoTiling: 0 129 | serializedVersion: 2 130 | m_Size: {x: 0.8, y: 0.8} 131 | m_EdgeRadius: 0 132 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Minotaur.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &853295437519236526 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: 4233587248834290685} 12 | - component: {fileID: 8979133830953361981} 13 | - component: {fileID: 3105514753902210855} 14 | - component: {fileID: 4045850053231970306} 15 | m_Layer: 9 16 | m_Name: Minotaur 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &4233587248834290685 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 853295437519236526} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &8979133830953361981 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 853295437519236526} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: f0b6ef16526d1b1a495eea7653bc65cd, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | patrolInterval: {x: 1, y: 2} 49 | damageRange: {x: 1, y: 2} 50 | moveSpeed: 5 51 | chaseDelay: 0.3 52 | alertRange: 10 53 | chaseRange: 20 54 | chaseDuration: 2 55 | --- !u!212 &3105514753902210855 56 | SpriteRenderer: 57 | m_ObjectHideFlags: 0 58 | m_CorrespondingSourceObject: {fileID: 0} 59 | m_PrefabInstance: {fileID: 0} 60 | m_PrefabAsset: {fileID: 0} 61 | m_GameObject: {fileID: 853295437519236526} 62 | m_Enabled: 1 63 | m_CastShadows: 0 64 | m_ReceiveShadows: 0 65 | m_DynamicOccludee: 1 66 | m_MotionVectors: 1 67 | m_LightProbeUsage: 1 68 | m_ReflectionProbeUsage: 1 69 | m_RayTracingMode: 0 70 | m_RenderingLayerMask: 1 71 | m_RendererPriority: 0 72 | m_Materials: 73 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 74 | m_StaticBatchInfo: 75 | firstSubMesh: 0 76 | subMeshCount: 0 77 | m_StaticBatchRoot: {fileID: 0} 78 | m_ProbeAnchor: {fileID: 0} 79 | m_LightProbeVolumeOverride: {fileID: 0} 80 | m_ScaleInLightmap: 1 81 | m_ReceiveGI: 1 82 | m_PreserveUVs: 0 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 1 86 | m_SelectedEditorRenderState: 0 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | m_Sprite: {fileID: 5516833919796105620, guid: 76cdaaed533f66b2d842f3c5cbf9efa1, 95 | type: 3} 96 | m_Color: {r: 1, g: 1, b: 1, a: 1} 97 | m_FlipX: 0 98 | m_FlipY: 0 99 | m_DrawMode: 0 100 | m_Size: {x: 1, y: 1} 101 | m_AdaptiveModeThreshold: 0.5 102 | m_SpriteTileMode: 0 103 | m_WasSpriteAssigned: 1 104 | m_MaskInteraction: 0 105 | m_SpriteSortPoint: 0 106 | --- !u!61 &4045850053231970306 107 | BoxCollider2D: 108 | m_ObjectHideFlags: 0 109 | m_CorrespondingSourceObject: {fileID: 0} 110 | m_PrefabInstance: {fileID: 0} 111 | m_PrefabAsset: {fileID: 0} 112 | m_GameObject: {fileID: 853295437519236526} 113 | m_Enabled: 1 114 | m_Density: 1 115 | m_Material: {fileID: 0} 116 | m_IsTrigger: 0 117 | m_UsedByEffector: 0 118 | m_UsedByComposite: 0 119 | m_Offset: {x: 0, y: 0} 120 | m_SpriteTilingProperty: 121 | border: {x: 0, y: 0, z: 0, w: 0} 122 | pivot: {x: 0.5, y: 0.5} 123 | oldSize: {x: 1, y: 1} 124 | newSize: {x: 1, y: 1} 125 | adaptiveTilingThreshold: 0.5 126 | drawMode: 0 127 | adaptiveTiling: 0 128 | m_AutoTiling: 0 129 | serializedVersion: 2 130 | m_Size: {x: 0.8, y: 0.8} 131 | m_EdgeRadius: 0 132 | -------------------------------------------------------------------------------- /Assets/Prefabs/Enemies/Goblin.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &7389784770100088109 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: 3484878318468425165} 12 | - component: {fileID: 1495501487744925019} 13 | - component: {fileID: 8759691384575723485} 14 | - component: {fileID: 1231681014118890425} 15 | m_Layer: 9 16 | m_Name: Goblin 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &3484878318468425165 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 7389784770100088109} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &1495501487744925019 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 7389784770100088109} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: f0b6ef16526d1b1a495eea7653bc65cd, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | patrolInterval: {x: 1, y: 2} 49 | damageRange: {x: 1, y: 2} 50 | moveSpeed: 5 51 | chaseDelay: 0.3 52 | alertRange: 10 53 | chaseRange: 20 54 | chaseDuration: 2 55 | --- !u!212 &8759691384575723485 56 | SpriteRenderer: 57 | m_ObjectHideFlags: 0 58 | m_CorrespondingSourceObject: {fileID: 0} 59 | m_PrefabInstance: {fileID: 0} 60 | m_PrefabAsset: {fileID: 0} 61 | m_GameObject: {fileID: 7389784770100088109} 62 | m_Enabled: 1 63 | m_CastShadows: 0 64 | m_ReceiveShadows: 0 65 | m_DynamicOccludee: 1 66 | m_MotionVectors: 1 67 | m_LightProbeUsage: 1 68 | m_ReflectionProbeUsage: 1 69 | m_RayTracingMode: 0 70 | m_RenderingLayerMask: 1 71 | m_RendererPriority: 0 72 | m_Materials: 73 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 74 | m_StaticBatchInfo: 75 | firstSubMesh: 0 76 | subMeshCount: 0 77 | m_StaticBatchRoot: {fileID: 0} 78 | m_ProbeAnchor: {fileID: 0} 79 | m_LightProbeVolumeOverride: {fileID: 0} 80 | m_ScaleInLightmap: 1 81 | m_ReceiveGI: 1 82 | m_PreserveUVs: 0 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 1 86 | m_SelectedEditorRenderState: 0 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | m_Sprite: {fileID: -7614875030924903410, guid: 76cdaaed533f66b2d842f3c5cbf9efa1, 95 | type: 3} 96 | m_Color: {r: 1, g: 1, b: 1, a: 1} 97 | m_FlipX: 0 98 | m_FlipY: 0 99 | m_DrawMode: 0 100 | m_Size: {x: 1, y: 1} 101 | m_AdaptiveModeThreshold: 0.5 102 | m_SpriteTileMode: 0 103 | m_WasSpriteAssigned: 1 104 | m_MaskInteraction: 0 105 | m_SpriteSortPoint: 0 106 | --- !u!61 &1231681014118890425 107 | BoxCollider2D: 108 | m_ObjectHideFlags: 0 109 | m_CorrespondingSourceObject: {fileID: 0} 110 | m_PrefabInstance: {fileID: 0} 111 | m_PrefabAsset: {fileID: 0} 112 | m_GameObject: {fileID: 7389784770100088109} 113 | m_Enabled: 1 114 | m_Density: 1 115 | m_Material: {fileID: 0} 116 | m_IsTrigger: 0 117 | m_UsedByEffector: 0 118 | m_UsedByComposite: 0 119 | m_Offset: {x: 0, y: 0} 120 | m_SpriteTilingProperty: 121 | border: {x: 0, y: 0, z: 0, w: 0} 122 | pivot: {x: 0.5, y: 0.5} 123 | oldSize: {x: 1, y: 1} 124 | newSize: {x: 1, y: 1} 125 | adaptiveTilingThreshold: 0.5 126 | drawMode: 0 127 | adaptiveTiling: 0 128 | m_AutoTiling: 0 129 | serializedVersion: 2 130 | m_Size: {x: 0.8, y: 0.8} 131 | m_EdgeRadius: 0 132 | -------------------------------------------------------------------------------- /Assets/Prefabs/Exit Doorway.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &191300661906355976 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: 191300661906355981} 12 | - component: {fileID: 191300661906355982} 13 | - component: {fileID: -685363780617593196} 14 | - component: {fileID: -4762430668577162532} 15 | - component: {fileID: 3990139887807019499} 16 | m_Layer: 0 17 | m_Name: Exit Doorway 18 | m_TagString: Untagged 19 | m_Icon: {fileID: 0} 20 | m_NavMeshLayer: 0 21 | m_StaticEditorFlags: 0 22 | m_IsActive: 1 23 | --- !u!4 &191300661906355981 24 | Transform: 25 | m_ObjectHideFlags: 0 26 | m_CorrespondingSourceObject: {fileID: 0} 27 | m_PrefabInstance: {fileID: 0} 28 | m_PrefabAsset: {fileID: 0} 29 | m_GameObject: {fileID: 191300661906355976} 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_RootOrder: 0 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!212 &191300661906355982 38 | SpriteRenderer: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 191300661906355976} 44 | m_Enabled: 1 45 | m_CastShadows: 0 46 | m_ReceiveShadows: 0 47 | m_DynamicOccludee: 1 48 | m_MotionVectors: 1 49 | m_LightProbeUsage: 1 50 | m_ReflectionProbeUsage: 1 51 | m_RayTracingMode: 0 52 | m_RenderingLayerMask: 1 53 | m_RendererPriority: 0 54 | m_Materials: 55 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 56 | m_StaticBatchInfo: 57 | firstSubMesh: 0 58 | subMeshCount: 0 59 | m_StaticBatchRoot: {fileID: 0} 60 | m_ProbeAnchor: {fileID: 0} 61 | m_LightProbeVolumeOverride: {fileID: 0} 62 | m_ScaleInLightmap: 1 63 | m_ReceiveGI: 1 64 | m_PreserveUVs: 0 65 | m_IgnoreNormalsForChartDetection: 0 66 | m_ImportantGI: 0 67 | m_StitchLightmapSeams: 1 68 | m_SelectedEditorRenderState: 0 69 | m_MinimumChartSize: 4 70 | m_AutoUVMaxDistance: 0.5 71 | m_AutoUVMaxAngle: 89 72 | m_LightmapParameters: {fileID: 0} 73 | m_SortingLayerID: 0 74 | m_SortingLayer: 0 75 | m_SortingOrder: 0 76 | m_Sprite: {fileID: 6989293104480225088, guid: e6a3887a7f0aa876f8720d0843c6e827, 77 | type: 3} 78 | m_Color: {r: 1, g: 1, b: 1, a: 1} 79 | m_FlipX: 0 80 | m_FlipY: 0 81 | m_DrawMode: 0 82 | m_Size: {x: 1, y: 1} 83 | m_AdaptiveModeThreshold: 0.5 84 | m_SpriteTileMode: 0 85 | m_WasSpriteAssigned: 1 86 | m_MaskInteraction: 0 87 | m_SpriteSortPoint: 0 88 | --- !u!50 &-685363780617593196 89 | Rigidbody2D: 90 | serializedVersion: 4 91 | m_ObjectHideFlags: 0 92 | m_CorrespondingSourceObject: {fileID: 0} 93 | m_PrefabInstance: {fileID: 0} 94 | m_PrefabAsset: {fileID: 0} 95 | m_GameObject: {fileID: 191300661906355976} 96 | m_BodyType: 1 97 | m_Simulated: 1 98 | m_UseFullKinematicContacts: 0 99 | m_UseAutoMass: 0 100 | m_Mass: 1 101 | m_LinearDrag: 0 102 | m_AngularDrag: 0.05 103 | m_GravityScale: 1 104 | m_Material: {fileID: 0} 105 | m_Interpolate: 0 106 | m_SleepingMode: 1 107 | m_CollisionDetection: 0 108 | m_Constraints: 0 109 | --- !u!61 &-4762430668577162532 110 | BoxCollider2D: 111 | m_ObjectHideFlags: 0 112 | m_CorrespondingSourceObject: {fileID: 0} 113 | m_PrefabInstance: {fileID: 0} 114 | m_PrefabAsset: {fileID: 0} 115 | m_GameObject: {fileID: 191300661906355976} 116 | m_Enabled: 1 117 | m_Density: 1 118 | m_Material: {fileID: 0} 119 | m_IsTrigger: 1 120 | m_UsedByEffector: 0 121 | m_UsedByComposite: 0 122 | m_Offset: {x: 0, y: 0} 123 | m_SpriteTilingProperty: 124 | border: {x: 0, y: 0, z: 0, w: 0} 125 | pivot: {x: 0.5, y: 0.5} 126 | oldSize: {x: 1, y: 1} 127 | newSize: {x: 1, y: 1} 128 | adaptiveTilingThreshold: 0.5 129 | drawMode: 0 130 | adaptiveTiling: 0 131 | m_AutoTiling: 0 132 | serializedVersion: 2 133 | m_Size: {x: 0.2, y: 0.2} 134 | m_EdgeRadius: 0 135 | --- !u!114 &3990139887807019499 136 | MonoBehaviour: 137 | m_ObjectHideFlags: 0 138 | m_CorrespondingSourceObject: {fileID: 0} 139 | m_PrefabInstance: {fileID: 0} 140 | m_PrefabAsset: {fileID: 0} 141 | m_GameObject: {fileID: 191300661906355976} 142 | m_Enabled: 1 143 | m_EditorHideFlags: 0 144 | m_Script: {fileID: 11500000, guid: d7d0c01ec49aaaf3a8d8b4852ccfb65b, type: 3} 145 | m_Name: 146 | m_EditorClassIdentifier: 147 | -------------------------------------------------------------------------------- /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: 3 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 | blendWeights: 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 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 16 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 16 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 0 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 0 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 16 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 0 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 0 108 | antiAliasing: 0 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 0 112 | billboardsFaceCameraPosition: 0 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 16 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 0 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 70 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 0 136 | antiAliasing: 0 137 | softParticles: 0 138 | softVegetation: 1 139 | realtimeReflectionProbes: 0 140 | billboardsFaceCameraPosition: 0 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 16 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 0 153 | shadowResolution: 0 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 0 164 | antiAliasing: 0 165 | softParticles: 0 166 | softVegetation: 1 167 | realtimeReflectionProbes: 0 168 | billboardsFaceCameraPosition: 0 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 16 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSM: 5 183 | PSP2: 2 184 | Standalone: 5 185 | Tizen: 2 186 | WebGL: 3 187 | WiiU: 5 188 | Windows Store Apps: 5 189 | XboxOne: 5 190 | iPhone: 2 191 | tvOS: 2 192 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/Prefabs/Player.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &519420028 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: 519420032} 12 | - component: {fileID: 519420031} 13 | - component: {fileID: 519420029} 14 | m_Layer: 0 15 | m_Name: Main Camera 16 | m_TagString: MainCamera 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &519420032 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: 519420028} 28 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: -10} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 8377165482937596568} 33 | m_RootOrder: 1 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!20 &519420031 36 | Camera: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 519420028} 42 | m_Enabled: 1 43 | serializedVersion: 2 44 | m_ClearFlags: 2 45 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 46 | m_projectionMatrixMode: 1 47 | m_GateFitMode: 2 48 | m_FOVAxisMode: 0 49 | m_SensorSize: {x: 36, y: 24} 50 | m_LensShift: {x: 0, y: 0} 51 | m_FocalLength: 50 52 | m_NormalizedViewPortRect: 53 | serializedVersion: 2 54 | x: 0 55 | y: 0 56 | width: 1 57 | height: 1 58 | near clip plane: 0.3 59 | far clip plane: 1000 60 | field of view: 60 61 | orthographic: 1 62 | orthographic size: 5 63 | m_Depth: -1 64 | m_CullingMask: 65 | serializedVersion: 2 66 | m_Bits: 4294967295 67 | m_RenderingPath: -1 68 | m_TargetTexture: {fileID: 0} 69 | m_TargetDisplay: 0 70 | m_TargetEye: 0 71 | m_HDR: 1 72 | m_AllowMSAA: 0 73 | m_AllowDynamicResolution: 0 74 | m_ForceIntoRT: 0 75 | m_OcclusionCulling: 0 76 | m_StereoConvergence: 10 77 | m_StereoSeparation: 0.022 78 | --- !u!81 &519420029 79 | AudioListener: 80 | m_ObjectHideFlags: 0 81 | m_CorrespondingSourceObject: {fileID: 0} 82 | m_PrefabInstance: {fileID: 0} 83 | m_PrefabAsset: {fileID: 0} 84 | m_GameObject: {fileID: 519420028} 85 | m_Enabled: 1 86 | --- !u!1 &8377165481553983044 87 | GameObject: 88 | m_ObjectHideFlags: 0 89 | m_CorrespondingSourceObject: {fileID: 0} 90 | m_PrefabInstance: {fileID: 0} 91 | m_PrefabAsset: {fileID: 0} 92 | serializedVersion: 6 93 | m_Component: 94 | - component: {fileID: 8377165481553983047} 95 | - component: {fileID: 8377165481553983046} 96 | m_Layer: 0 97 | m_Name: GFX 98 | m_TagString: Untagged 99 | m_Icon: {fileID: 0} 100 | m_NavMeshLayer: 0 101 | m_StaticEditorFlags: 0 102 | m_IsActive: 1 103 | --- !u!4 &8377165481553983047 104 | Transform: 105 | m_ObjectHideFlags: 0 106 | m_CorrespondingSourceObject: {fileID: 0} 107 | m_PrefabInstance: {fileID: 0} 108 | m_PrefabAsset: {fileID: 0} 109 | m_GameObject: {fileID: 8377165481553983044} 110 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 111 | m_LocalPosition: {x: 0, y: 0, z: 0} 112 | m_LocalScale: {x: 1, y: 1, z: 1} 113 | m_Children: [] 114 | m_Father: {fileID: 8377165482937596568} 115 | m_RootOrder: 0 116 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 117 | --- !u!212 &8377165481553983046 118 | SpriteRenderer: 119 | m_ObjectHideFlags: 0 120 | m_CorrespondingSourceObject: {fileID: 0} 121 | m_PrefabInstance: {fileID: 0} 122 | m_PrefabAsset: {fileID: 0} 123 | m_GameObject: {fileID: 8377165481553983044} 124 | m_Enabled: 1 125 | m_CastShadows: 0 126 | m_ReceiveShadows: 0 127 | m_DynamicOccludee: 1 128 | m_MotionVectors: 1 129 | m_LightProbeUsage: 1 130 | m_ReflectionProbeUsage: 1 131 | m_RayTracingMode: 0 132 | m_RenderingLayerMask: 1 133 | m_RendererPriority: 0 134 | m_Materials: 135 | - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 136 | m_StaticBatchInfo: 137 | firstSubMesh: 0 138 | subMeshCount: 0 139 | m_StaticBatchRoot: {fileID: 0} 140 | m_ProbeAnchor: {fileID: 0} 141 | m_LightProbeVolumeOverride: {fileID: 0} 142 | m_ScaleInLightmap: 1 143 | m_ReceiveGI: 1 144 | m_PreserveUVs: 0 145 | m_IgnoreNormalsForChartDetection: 0 146 | m_ImportantGI: 0 147 | m_StitchLightmapSeams: 1 148 | m_SelectedEditorRenderState: 0 149 | m_MinimumChartSize: 4 150 | m_AutoUVMaxDistance: 0.5 151 | m_AutoUVMaxAngle: 89 152 | m_LightmapParameters: {fileID: 0} 153 | m_SortingLayerID: 1761955465 154 | m_SortingLayer: 1 155 | m_SortingOrder: 0 156 | m_Sprite: {fileID: -2243646388705685286, guid: eff6b6b162aa18853991ddf70a7c4c46, 157 | type: 3} 158 | m_Color: {r: 1, g: 1, b: 1, a: 1} 159 | m_FlipX: 0 160 | m_FlipY: 0 161 | m_DrawMode: 0 162 | m_Size: {x: 0.32, y: 0.32} 163 | m_AdaptiveModeThreshold: 0.5 164 | m_SpriteTileMode: 0 165 | m_WasSpriteAssigned: 1 166 | m_MaskInteraction: 0 167 | m_SpriteSortPoint: 0 168 | --- !u!1 &8377165482937596550 169 | GameObject: 170 | m_ObjectHideFlags: 0 171 | m_CorrespondingSourceObject: {fileID: 0} 172 | m_PrefabInstance: {fileID: 0} 173 | m_PrefabAsset: {fileID: 0} 174 | serializedVersion: 6 175 | m_Component: 176 | - component: {fileID: 8377165482937596568} 177 | - component: {fileID: 8377165482937596569} 178 | - component: {fileID: 35946070521211657} 179 | m_Layer: 8 180 | m_Name: Player 181 | m_TagString: Player 182 | m_Icon: {fileID: 0} 183 | m_NavMeshLayer: 0 184 | m_StaticEditorFlags: 0 185 | m_IsActive: 1 186 | --- !u!4 &8377165482937596568 187 | Transform: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | m_GameObject: {fileID: 8377165482937596550} 193 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 194 | m_LocalPosition: {x: 0, y: 0, z: 0} 195 | m_LocalScale: {x: 1, y: 1, z: 1} 196 | m_Children: 197 | - {fileID: 8377165481553983047} 198 | - {fileID: 519420032} 199 | m_Father: {fileID: 0} 200 | m_RootOrder: 0 201 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 202 | --- !u!114 &8377165482937596569 203 | MonoBehaviour: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | m_GameObject: {fileID: 8377165482937596550} 209 | m_Enabled: 1 210 | m_EditorHideFlags: 0 211 | m_Script: {fileID: 11500000, guid: e33ace70b990019ffa55c9a4713a8946, type: 3} 212 | m_Name: 213 | m_EditorClassIdentifier: 214 | speed: 5 215 | --- !u!61 &35946070521211657 216 | BoxCollider2D: 217 | m_ObjectHideFlags: 0 218 | m_CorrespondingSourceObject: {fileID: 0} 219 | m_PrefabInstance: {fileID: 0} 220 | m_PrefabAsset: {fileID: 0} 221 | m_GameObject: {fileID: 8377165482937596550} 222 | m_Enabled: 1 223 | m_Density: 1 224 | m_Material: {fileID: 0} 225 | m_IsTrigger: 0 226 | m_UsedByEffector: 0 227 | m_UsedByComposite: 0 228 | m_Offset: {x: 0, y: 0} 229 | m_SpriteTilingProperty: 230 | border: {x: 0, y: 0, z: 0, w: 0} 231 | pivot: {x: 0, y: 0} 232 | oldSize: {x: 0, y: 0} 233 | newSize: {x: 0, y: 0} 234 | adaptiveTilingThreshold: 0 235 | drawMode: 0 236 | adaptiveTiling: 0 237 | m_AutoTiling: 0 238 | serializedVersion: 2 239 | m_Size: {x: 0.8, y: 0.8} 240 | m_EdgeRadius: 0 241 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/people.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eff6b6b162aa18853991ddf70a7c4c46 3 | TextureImporter: 4 | internalIDToNameTable: 5 | - first: 6 | 213: 7079939810118749161 7 | second: people_0 8 | - first: 9 | 213: -8093480433319648213 10 | second: people_1 11 | - first: 12 | 213: -6927262159577516004 13 | second: people_2 14 | - first: 15 | 213: -688474537902213389 16 | second: people_3 17 | - first: 18 | 213: -1775118653741790794 19 | second: people_4 20 | - first: 21 | 213: 6767522129511643368 22 | second: people_5 23 | - first: 24 | 213: 4647494274786741492 25 | second: people_6 26 | - first: 27 | 213: -2243646388705685286 28 | second: people_7 29 | - first: 30 | 213: -6083636025513521284 31 | second: people_8 32 | - first: 33 | 213: -4669617034461687949 34 | second: people_9 35 | - first: 36 | 213: -8705802314535483547 37 | second: people_10 38 | - first: 39 | 213: -3493082626475266850 40 | second: people_11 41 | externalObjects: {} 42 | serializedVersion: 10 43 | mipmaps: 44 | mipMapMode: 0 45 | enableMipMap: 0 46 | sRGBTexture: 1 47 | linearTexture: 0 48 | fadeOut: 0 49 | borderMipMap: 0 50 | mipMapsPreserveCoverage: 0 51 | alphaTestReferenceValue: 0.5 52 | mipMapFadeDistanceStart: 1 53 | mipMapFadeDistanceEnd: 3 54 | bumpmap: 55 | convertToNormalMap: 0 56 | externalNormalMap: 0 57 | heightScale: 0.25 58 | normalMapFilter: 0 59 | isReadable: 0 60 | streamingMipmaps: 0 61 | streamingMipmapsPriority: 0 62 | grayScaleToAlpha: 0 63 | generateCubemap: 6 64 | cubemapConvolution: 0 65 | seamlessCubemap: 0 66 | textureFormat: 1 67 | maxTextureSize: 2048 68 | textureSettings: 69 | serializedVersion: 2 70 | filterMode: 0 71 | aniso: -1 72 | mipBias: -100 73 | wrapU: 1 74 | wrapV: 1 75 | wrapW: 1 76 | nPOTScale: 0 77 | lightmap: 0 78 | compressionQuality: 50 79 | spriteMode: 2 80 | spriteExtrude: 1 81 | spriteMeshType: 1 82 | alignment: 0 83 | spritePivot: {x: 0.5, y: 0.5} 84 | spritePixelsToUnits: 32 85 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 86 | spriteGenerateFallbackPhysicsShape: 1 87 | alphaUsage: 1 88 | alphaIsTransparency: 1 89 | spriteTessellationDetail: -1 90 | textureType: 8 91 | textureShape: 1 92 | singleChannelComponent: 0 93 | maxTextureSizeSet: 0 94 | compressionQualitySet: 0 95 | textureFormatSet: 0 96 | platformSettings: 97 | - serializedVersion: 3 98 | buildTarget: DefaultTexturePlatform 99 | maxTextureSize: 128 100 | resizeAlgorithm: 0 101 | textureFormat: -1 102 | textureCompression: 1 103 | compressionQuality: 50 104 | crunchedCompression: 0 105 | allowsAlphaSplitting: 0 106 | overridden: 0 107 | androidETC2FallbackOverride: 0 108 | forceMaximumCompressionQuality_BC6H_BC7: 0 109 | - serializedVersion: 3 110 | buildTarget: Standalone 111 | maxTextureSize: 128 112 | resizeAlgorithm: 0 113 | textureFormat: -1 114 | textureCompression: 1 115 | compressionQuality: 50 116 | crunchedCompression: 0 117 | allowsAlphaSplitting: 0 118 | overridden: 0 119 | androidETC2FallbackOverride: 0 120 | forceMaximumCompressionQuality_BC6H_BC7: 0 121 | spriteSheet: 122 | serializedVersion: 2 123 | sprites: 124 | - serializedVersion: 2 125 | name: people_0 126 | rect: 127 | serializedVersion: 2 128 | x: 0 129 | y: 64 130 | width: 32 131 | height: 32 132 | alignment: 0 133 | pivot: {x: 0, y: 0} 134 | border: {x: 0, y: 0, z: 0, w: 0} 135 | outline: [] 136 | physicsShape: [] 137 | tessellationDetail: 0 138 | bones: [] 139 | spriteID: 4472f443012d00fe7b5779af2f657ebd 140 | internalID: 7079939810118749161 141 | vertices: [] 142 | indices: 143 | edges: [] 144 | weights: [] 145 | - serializedVersion: 2 146 | name: people_1 147 | rect: 148 | serializedVersion: 2 149 | x: 32 150 | y: 64 151 | width: 32 152 | height: 32 153 | alignment: 0 154 | pivot: {x: 0, y: 0} 155 | border: {x: 0, y: 0, z: 0, w: 0} 156 | outline: [] 157 | physicsShape: [] 158 | tessellationDetail: 0 159 | bones: [] 160 | spriteID: dcf3fd6945fe6af7a911bde35f08a6fd 161 | internalID: -8093480433319648213 162 | vertices: [] 163 | indices: 164 | edges: [] 165 | weights: [] 166 | - serializedVersion: 2 167 | name: people_2 168 | rect: 169 | serializedVersion: 2 170 | x: 64 171 | y: 64 172 | width: 32 173 | height: 32 174 | alignment: 0 175 | pivot: {x: 0, y: 0} 176 | border: {x: 0, y: 0, z: 0, w: 0} 177 | outline: [] 178 | physicsShape: [] 179 | tessellationDetail: 0 180 | bones: [] 181 | spriteID: 28de420bd9860b8f095e50e1d43a3e59 182 | internalID: -6927262159577516004 183 | vertices: [] 184 | indices: 185 | edges: [] 186 | weights: [] 187 | - serializedVersion: 2 188 | name: people_3 189 | rect: 190 | serializedVersion: 2 191 | x: 96 192 | y: 64 193 | width: 32 194 | height: 32 195 | alignment: 0 196 | pivot: {x: 0, y: 0} 197 | border: {x: 0, y: 0, z: 0, w: 0} 198 | outline: [] 199 | physicsShape: [] 200 | tessellationDetail: 0 201 | bones: [] 202 | spriteID: e840c3204d073b977953da8444e0cd0c 203 | internalID: -688474537902213389 204 | vertices: [] 205 | indices: 206 | edges: [] 207 | weights: [] 208 | - serializedVersion: 2 209 | name: people_4 210 | rect: 211 | serializedVersion: 2 212 | x: 0 213 | y: 32 214 | width: 32 215 | height: 32 216 | alignment: 0 217 | pivot: {x: 0, y: 0} 218 | border: {x: 0, y: 0, z: 0, w: 0} 219 | outline: [] 220 | physicsShape: [] 221 | tessellationDetail: 0 222 | bones: [] 223 | spriteID: 5aa762225eb91f0c1ad03d1e1f19d51c 224 | internalID: -1775118653741790794 225 | vertices: [] 226 | indices: 227 | edges: [] 228 | weights: [] 229 | - serializedVersion: 2 230 | name: people_5 231 | rect: 232 | serializedVersion: 2 233 | x: 32 234 | y: 32 235 | width: 32 236 | height: 32 237 | alignment: 0 238 | pivot: {x: 0, y: 0} 239 | border: {x: 0, y: 0, z: 0, w: 0} 240 | outline: [] 241 | physicsShape: [] 242 | tessellationDetail: 0 243 | bones: [] 244 | spriteID: d282fb0dc6faddc93970a15e810d5e8c 245 | internalID: 6767522129511643368 246 | vertices: [] 247 | indices: 248 | edges: [] 249 | weights: [] 250 | - serializedVersion: 2 251 | name: people_6 252 | rect: 253 | serializedVersion: 2 254 | x: 64 255 | y: 32 256 | width: 32 257 | height: 32 258 | alignment: 0 259 | pivot: {x: 0, y: 0} 260 | border: {x: 0, y: 0, z: 0, w: 0} 261 | outline: [] 262 | physicsShape: [] 263 | tessellationDetail: 0 264 | bones: [] 265 | spriteID: 9677231ece205e09cbfa0f5aa8ec3734 266 | internalID: 4647494274786741492 267 | vertices: [] 268 | indices: 269 | edges: [] 270 | weights: [] 271 | - serializedVersion: 2 272 | name: people_7 273 | rect: 274 | serializedVersion: 2 275 | x: 96 276 | y: 32 277 | width: 32 278 | height: 32 279 | alignment: 0 280 | pivot: {x: 0, y: 0} 281 | border: {x: 0, y: 0, z: 0, w: 0} 282 | outline: [] 283 | physicsShape: [] 284 | tessellationDetail: 0 285 | bones: [] 286 | spriteID: 2b078813d06e2c986813b69af7db1b47 287 | internalID: -2243646388705685286 288 | vertices: [] 289 | indices: 290 | edges: [] 291 | weights: [] 292 | - serializedVersion: 2 293 | name: people_8 294 | rect: 295 | serializedVersion: 2 296 | x: 0 297 | y: 0 298 | width: 32 299 | height: 32 300 | alignment: 0 301 | pivot: {x: 0, y: 0} 302 | border: {x: 0, y: 0, z: 0, w: 0} 303 | outline: [] 304 | physicsShape: [] 305 | tessellationDetail: 0 306 | bones: [] 307 | spriteID: bbe5ec601e222a892b1d3b86e93c0119 308 | internalID: -6083636025513521284 309 | vertices: [] 310 | indices: 311 | edges: [] 312 | weights: [] 313 | - serializedVersion: 2 314 | name: people_9 315 | rect: 316 | serializedVersion: 2 317 | x: 32 318 | y: 0 319 | width: 32 320 | height: 32 321 | alignment: 0 322 | pivot: {x: 0, y: 0} 323 | border: {x: 0, y: 0, z: 0, w: 0} 324 | outline: [] 325 | physicsShape: [] 326 | tessellationDetail: 0 327 | bones: [] 328 | spriteID: 18c6f55e1efe36c6e9d9baa9661b0bd8 329 | internalID: -4669617034461687949 330 | vertices: [] 331 | indices: 332 | edges: [] 333 | weights: [] 334 | - serializedVersion: 2 335 | name: people_10 336 | rect: 337 | serializedVersion: 2 338 | x: 64 339 | y: 0 340 | width: 32 341 | height: 32 342 | alignment: 0 343 | pivot: {x: 0, y: 0} 344 | border: {x: 0, y: 0, z: 0, w: 0} 345 | outline: [] 346 | physicsShape: [] 347 | tessellationDetail: 0 348 | bones: [] 349 | spriteID: 53ff59391461af0eda02b76258e984e2 350 | internalID: -8705802314535483547 351 | vertices: [] 352 | indices: 353 | edges: [] 354 | weights: [] 355 | - serializedVersion: 2 356 | name: people_11 357 | rect: 358 | serializedVersion: 2 359 | x: 96 360 | y: 0 361 | width: 32 362 | height: 32 363 | alignment: 0 364 | pivot: {x: 0, y: 0} 365 | border: {x: 0, y: 0, z: 0, w: 0} 366 | outline: [] 367 | physicsShape: [] 368 | tessellationDetail: 0 369 | bones: [] 370 | spriteID: e20a8121234f0622b96c1edd417d737b 371 | internalID: -3493082626475266850 372 | vertices: [] 373 | indices: 374 | edges: [] 375 | weights: [] 376 | outline: [] 377 | physicsShape: [] 378 | bones: [] 379 | spriteID: 5e97eb03825dee720800000000000000 380 | internalID: 0 381 | vertices: [] 382 | indices: 383 | edges: [] 384 | weights: [] 385 | secondaryTextures: [] 386 | spritePackingTag: 387 | pSDRemoveMatte: 0 388 | pSDShowRemoveMatteOption: 0 389 | userData: 390 | assetBundleName: 391 | assetBundleVariant: 392 | -------------------------------------------------------------------------------- /Assets/Scripts/Enemy.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using JetBrains.Annotations; 4 | using UnityEngine; 5 | using Random = UnityEngine.Random; 6 | 7 | public class Enemy : MonoBehaviour 8 | { 9 | public Vector2 patrolInterval = new Vector2(1, 2); 10 | public Vector2 damageRange = new Vector2(1, 10); 11 | public float moveSpeed = 5; 12 | public float chaseDelay = 0.5f; 13 | public float alertRange = 10f; 14 | 15 | private readonly List _availableMovements = new List(4); 16 | private Player _player; 17 | private Vector2 _targetPos; 18 | private LayerMask _obstacleMask; 19 | private LayerMask _walkableMask; 20 | private bool _isMoving; 21 | private bool _flipX; 22 | private AlertState _state; 23 | private SpriteRenderer _renderer; 24 | 25 | private void Awake() 26 | { 27 | _renderer = GetComponent(); 28 | _flipX = _renderer.flipX; 29 | } 30 | 31 | private void Start() 32 | { 33 | _player = FindObjectOfType(); 34 | _targetPos = transform.position; 35 | _obstacleMask = LayerMask.GetMask("Wall", "Enemy", "Player"); 36 | _walkableMask = LayerMask.GetMask("Wall", "Enemy"); 37 | StartCoroutine(Movement()); 38 | } 39 | 40 | private void Patrol() 41 | { 42 | _availableMovements.Clear(); 43 | var hitSize = Vector2.one * 0.8f; 44 | 45 | var hitUp = Physics2D.OverlapBox(_targetPos + Vector2.up, hitSize, 0, _obstacleMask); 46 | if (!hitUp) _availableMovements.Add(Vector2.up); 47 | 48 | var hitRight = Physics2D.OverlapBox(_targetPos + Vector2.right, hitSize, 0, _obstacleMask); 49 | if (!hitRight) _availableMovements.Add(Vector2.right); 50 | 51 | var hitDown = Physics2D.OverlapBox(_targetPos + Vector2.down, hitSize, 0, _obstacleMask); 52 | if (!hitDown) _availableMovements.Add(Vector2.down); 53 | 54 | var hitLeft = Physics2D.OverlapBox(_targetPos + Vector2.left, hitSize, 0, _obstacleMask); 55 | if (!hitLeft) _availableMovements.Add(Vector2.left); 56 | 57 | if (_availableMovements.Count > 0) 58 | { 59 | var index = Random.Range(0, _availableMovements.Count); 60 | var movement = _availableMovements[index]; 61 | _targetPos += movement; 62 | } 63 | 64 | var moveDelay = Random.Range(patrolInterval.x, patrolInterval.y); 65 | StartCoroutine(SmoothMove(moveDelay)); 66 | } 67 | 68 | private IEnumerator Movement() 69 | { 70 | while (true) 71 | { 72 | yield return new WaitForSeconds(0.1f); 73 | if (_isMoving) continue; 74 | 75 | // TODO: The whole movement logic is a bit off. 76 | // This may be improved with the following behavior: 77 | // If the player is in attack range, attack. 78 | // If the player is in alert range, move to the player's position ("chase"). 79 | // If the player is lost during a chase ("irritated"), move to the player's last known position instead. 80 | 81 | // Sense the player. 82 | var distToPlayer = Vector2.Distance(transform.position, _player.transform.position); 83 | if (distToPlayer > alertRange) 84 | { 85 | if (_state != AlertState.Patrolling) 86 | { 87 | UpdateState($"{name} lost its interest", AlertState.Patrolling); 88 | } 89 | 90 | Patrol(); 91 | continue; 92 | } 93 | 94 | if (_state == AlertState.Patrolling) 95 | { 96 | UpdateState($"Player startled the {name}", AlertState.Alerted); 97 | } 98 | 99 | // Attack player if close enough. 100 | // Allowed directions are only orthogonal, not diagonal. 101 | // Distance on diagonal would be sqrt(2) = 1.4, so we check 102 | // for a value less than that. 103 | if (distToPlayer <= 1.1f) 104 | { 105 | _state = AlertState.Attacking; 106 | Attack(); 107 | yield return new WaitForSeconds(Random.Range(0.5f, 1.15f)); 108 | continue; 109 | } 110 | 111 | // Chase the player. 112 | var newPos = FindNextStep(transform.position, _player.transform.position); 113 | if (newPos != _targetPos) 114 | { 115 | UpdateState($"{name} is chasing the player", AlertState.Chasing); 116 | 117 | _targetPos = newPos; 118 | StartCoroutine(SmoothMove(chaseDelay)); 119 | } 120 | else 121 | { 122 | UpdateState($"{name} can't find the player", AlertState.Irritated); 123 | Patrol(); 124 | } 125 | } 126 | 127 | // ReSharper disable once IteratorNeverReturns 128 | } 129 | 130 | private void Attack() 131 | { 132 | var roll = Random.Range(0, 100); 133 | if (roll > 50) 134 | { 135 | var damageAmount = Mathf.Ceil(Random.Range(damageRange.x, damageRange.y)); 136 | Debug.Log($"{name} attacked and hit for {damageAmount}"); 137 | } 138 | else 139 | { 140 | Debug.Log($"{name} attacked and missed"); 141 | } 142 | } 143 | 144 | private Vector2 FindNextStep(Vector2 startPos, Vector2 targetPos) 145 | { 146 | const int failsafe = 1000; 147 | var openList = new List(); 148 | 149 | var distanceFromStart = 0; 150 | var heuristicToTarget = DistanceHeuristic(startPos, targetPos); 151 | var current = new Node(startPos, null, distanceFromStart, heuristicToTarget); 152 | 153 | openList.Add(current); 154 | while (openList.Count > 0 && openList.Count < failsafe) 155 | { 156 | // Find the item with the smallest F-score, remove it from the 157 | // open list and add it to the closed list. 158 | var smallestIndex = FindIndexWithSmallestFScore(openList); 159 | current = openList[smallestIndex]; 160 | openList.RemoveAt(smallestIndex); 161 | 162 | // Check if we have a match. 163 | if (current.Position == targetPos) break; 164 | 165 | // Add walkable tiles to explore list 166 | AddNodeIfWalkable(current, openList, Vector2.up, targetPos); 167 | AddNodeIfWalkable(current, openList, Vector2.right, targetPos); 168 | AddNodeIfWalkable(current, openList, Vector2.down, targetPos); 169 | AddNodeIfWalkable(current, openList, Vector2.left, targetPos); 170 | } 171 | 172 | // In case we didn't find anything, abort. 173 | if (current.Position != targetPos) return startPos; 174 | 175 | // Otherwise, backtrack to the start. 176 | var nextPosition = startPos; 177 | while (current.Parent != null) 178 | { 179 | nextPosition = current.Position; 180 | current = current.Parent; 181 | } 182 | 183 | return nextPosition; 184 | 185 | int FindIndexWithSmallestFScore(T nodes) where T: IReadOnlyList 186 | { 187 | var smallestScore = float.PositiveInfinity; 188 | var smallestIndex = -1; 189 | for (var i = 0; i < nodes.Count; ++i) 190 | { 191 | var node = nodes[i]; 192 | if (node.Score >= smallestScore) continue; 193 | smallestScore = node.Score; 194 | smallestIndex = i; 195 | } 196 | 197 | return smallestIndex; 198 | } 199 | } 200 | 201 | private static float DistanceHeuristic(Vector2 startPos, Vector2 targetPos) 202 | { 203 | var distance = startPos - targetPos; 204 | return Mathf.Abs(distance.x) + Mathf.Abs(distance.y); 205 | } 206 | 207 | private void AddNodeIfWalkable([NotNull] Node current, [NotNull] T openList, Vector2 direction, Vector2 target) 208 | where T : IList 209 | { 210 | var hitSize = Vector2.one * 0.5f; 211 | var point = current.Position + direction; 212 | var hit = Physics2D.OverlapBox(point, hitSize, 0, _walkableMask); 213 | if (hit) return; 214 | 215 | var distanceFromStart = current.DistanceFromStart + 1; 216 | var heuristicToTarget = DistanceHeuristic(point, target); 217 | var next = new Node(point, current, distanceFromStart, heuristicToTarget); 218 | 219 | // If the position already exists in the list, but has a higher F-Score - replace it. 220 | var foundNode = false; 221 | for (var i = 0; i < openList.Count; ++i) 222 | { 223 | var node = openList[i]; 224 | foundNode = node.Position == point; 225 | if (foundNode && node.Score > next.Score) 226 | { 227 | openList[i] = next; 228 | return; 229 | } 230 | } 231 | 232 | // Otherwise, if the node doesn't exist, add it. 233 | if (!foundNode) openList.Add(next); 234 | } 235 | 236 | private void UpdateState([NotNull] string message, AlertState newState) 237 | { 238 | Debug.Log($"{message} ({_state} -> {newState})."); 239 | _state = newState; 240 | } 241 | 242 | private IEnumerator SmoothMove(float moveDelay) 243 | { 244 | _isMoving = true; 245 | AdjustLookDirection(); 246 | while (Vector2.Distance(transform.position, _targetPos) > 0.01) 247 | { 248 | transform.position = Vector2.MoveTowards(transform.position, _targetPos, moveSpeed * Time.deltaTime); 249 | yield return null; 250 | } 251 | 252 | transform.position = _targetPos; 253 | yield return new WaitForSeconds(moveDelay); 254 | _isMoving = false; 255 | } 256 | 257 | private void AdjustLookDirection() 258 | { 259 | var pos = transform.position.x; 260 | var movingRight = _targetPos.x > pos; 261 | var movingLeft = _targetPos.x < pos; 262 | if (movingRight) 263 | { 264 | _renderer.flipX = _flipX; 265 | } 266 | else if (movingLeft) 267 | { 268 | _renderer.flipX = !_flipX; 269 | } 270 | } 271 | 272 | private enum AlertState 273 | { 274 | Patrolling, 275 | Alerted, 276 | Attacking, 277 | Chasing, 278 | Irritated 279 | } 280 | } 281 | -------------------------------------------------------------------------------- /Assets/Scenes/Game.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 1 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &1353590642 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 1353590643} 133 | - component: {fileID: 1353590644} 134 | m_Layer: 0 135 | m_Name: Environment 136 | m_TagString: Untagged 137 | m_Icon: {fileID: 0} 138 | m_NavMeshLayer: 0 139 | m_StaticEditorFlags: 0 140 | m_IsActive: 1 141 | --- !u!4 &1353590643 142 | Transform: 143 | m_ObjectHideFlags: 0 144 | m_CorrespondingSourceObject: {fileID: 0} 145 | m_PrefabInstance: {fileID: 0} 146 | m_PrefabAsset: {fileID: 0} 147 | m_GameObject: {fileID: 1353590642} 148 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 149 | m_LocalPosition: {x: 0, y: 0, z: 0} 150 | m_LocalScale: {x: 1, y: 1, z: 1} 151 | m_Children: [] 152 | m_Father: {fileID: 0} 153 | m_RootOrder: 1 154 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 155 | --- !u!114 &1353590644 156 | MonoBehaviour: 157 | m_ObjectHideFlags: 0 158 | m_CorrespondingSourceObject: {fileID: 0} 159 | m_PrefabInstance: {fileID: 0} 160 | m_PrefabAsset: {fileID: 0} 161 | m_GameObject: {fileID: 1353590642} 162 | m_Enabled: 1 163 | m_EditorHideFlags: 0 164 | m_Script: {fileID: 11500000, guid: 8e03432433cd8f839bca9be1ad979cfd, type: 3} 165 | m_Name: 166 | m_EditorClassIdentifier: 167 | totalFloorCount: 500 168 | itemSpawnProbability: 10 169 | enemySpawnProbability: 10 170 | windingHallProbability: 30 171 | roundedEdges: 1 172 | dungeonType: 2 173 | floorPrefab: {fileID: 4514925030624558333, guid: f4b491aa8eeeb41f4b1f181895829bf1, 174 | type: 3} 175 | wallPrefab: {fileID: 355985668678716677, guid: bcca8e81274ebdb05b3993b94cbbde5c, 176 | type: 3} 177 | tilePrefab: {fileID: 8499686360174531855, guid: 19e3a3867dec3a58eb1e5b62f0955f40, 178 | type: 3} 179 | exitPrefab: {fileID: 191300661906355976, guid: 1c4ee5d477c7057bca1c84bcef14c9d1, 180 | type: 3} 181 | randomItems: 182 | - {fileID: 803942442477431842, guid: 881e2d78eca95ec58a93bf7b9fc704ac, type: 3} 183 | - {fileID: 8375119382021737765, guid: d4f6addf14d5151a3a985a03a08f2624, type: 3} 184 | - {fileID: 7963301040627391820, guid: 16e30999d97400d89af20f458cf5b041, type: 3} 185 | - {fileID: 481483911927382665, guid: a6b98ae915011899ca005f9faf492160, type: 3} 186 | - {fileID: 5856893494495828445, guid: 5d5519bfdff2665e2a0699f53ee9e625, type: 3} 187 | randomEnemies: 188 | - {fileID: 518722715976971678, guid: f5246b8014d4c450299ed8ee763521d6, type: 3} 189 | - {fileID: 7389784770100088109, guid: 2cbd4124376e864beb8b0e82dda342f2, type: 3} 190 | - {fileID: 2193353400922159813, guid: ccbfdb11433de8c14a339fb58a4ddd2e, type: 3} 191 | - {fileID: 853295437519236526, guid: c63c4cbc30b72b0b696901287471a36b, type: 3} 192 | wallRoundedEdges: 193 | - {fileID: 56295710450880651, guid: a4527e3836fac43048bde0118a87b037, type: 3} 194 | - {fileID: 7888775862247431992, guid: 33d01a36a0326da6babb9d7f699af88e, type: 3} 195 | - {fileID: 3253511571748021597, guid: 3315167a73703c895a022122ca815c42, type: 3} 196 | - {fileID: 801677988019259861, guid: f811b236bbef3ceb5b3f0e91be8fe20f, type: 3} 197 | - {fileID: 4497954316926719343, guid: 892586065806bd50a8b3dbba0b0b8caa, type: 3} 198 | - {fileID: 502606101825244420, guid: f13f4a64c1ef155d0a6f2040723e0287, type: 3} 199 | - {fileID: 1662012753486552759, guid: e0242cdd83a8617a78e4197b857da024, type: 3} 200 | - {fileID: 3146828284631345724, guid: 1bd4e4ae5b70c0497895045a411402de, type: 3} 201 | - {fileID: 2015342432750221360, guid: e0651c1ba6c442607b09c1037257485c, type: 3} 202 | - {fileID: 7290173597987974925, guid: cd7d31f5e86e6163489091dc2eddd740, type: 3} 203 | - {fileID: 5585876629474461368, guid: 5d5990f356daa03ceb1ce8abb6a34b8d, type: 3} 204 | - {fileID: 6351262694034833085, guid: baa35f843cbc35d24864d11c0355d060, type: 3} 205 | - {fileID: 6469243058042122431, guid: 6b6536f903600b16b87e0cfa01d15bcf, type: 3} 206 | - {fileID: 2778999152139377518, guid: 9765406128772c33e9bfd1eff45cd2a2, type: 3} 207 | - {fileID: 1247938255959545874, guid: e5a61c1af2d3dccfeab80b3bfa740c61, type: 3} 208 | - {fileID: 840328909662834443, guid: 5c8eef2e7f1aec6d1a4c4d047436676a, type: 3} 209 | minX: 0 210 | maxX: 0 211 | minY: 0 212 | maxY: 0 213 | --- !u!1001 &8377165483079719529 214 | PrefabInstance: 215 | m_ObjectHideFlags: 0 216 | serializedVersion: 2 217 | m_Modification: 218 | m_TransformParent: {fileID: 0} 219 | m_Modifications: 220 | - target: {fileID: 8377165482937596550, guid: 30bbfc988221f53d281d572ec15f5ab1, 221 | type: 3} 222 | propertyPath: m_Name 223 | value: Player 224 | objectReference: {fileID: 0} 225 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 226 | type: 3} 227 | propertyPath: m_LocalPosition.x 228 | value: 0 229 | objectReference: {fileID: 0} 230 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 231 | type: 3} 232 | propertyPath: m_LocalPosition.y 233 | value: 0 234 | objectReference: {fileID: 0} 235 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 236 | type: 3} 237 | propertyPath: m_LocalPosition.z 238 | value: 0 239 | objectReference: {fileID: 0} 240 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 241 | type: 3} 242 | propertyPath: m_LocalRotation.x 243 | value: 0 244 | objectReference: {fileID: 0} 245 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 246 | type: 3} 247 | propertyPath: m_LocalRotation.y 248 | value: 0 249 | objectReference: {fileID: 0} 250 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 251 | type: 3} 252 | propertyPath: m_LocalRotation.z 253 | value: 0 254 | objectReference: {fileID: 0} 255 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 256 | type: 3} 257 | propertyPath: m_LocalRotation.w 258 | value: 1 259 | objectReference: {fileID: 0} 260 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 261 | type: 3} 262 | propertyPath: m_RootOrder 263 | value: 0 264 | objectReference: {fileID: 0} 265 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 266 | type: 3} 267 | propertyPath: m_LocalEulerAnglesHint.x 268 | value: 0 269 | objectReference: {fileID: 0} 270 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 271 | type: 3} 272 | propertyPath: m_LocalEulerAnglesHint.y 273 | value: 0 274 | objectReference: {fileID: 0} 275 | - target: {fileID: 8377165482937596568, guid: 30bbfc988221f53d281d572ec15f5ab1, 276 | type: 3} 277 | propertyPath: m_LocalEulerAnglesHint.z 278 | value: 0 279 | objectReference: {fileID: 0} 280 | m_RemovedComponents: [] 281 | m_SourcePrefab: {fileID: 100100000, guid: 30bbfc988221f53d281d572ec15f5ab1, type: 3} 282 | -------------------------------------------------------------------------------- /Assets/Scripts/DungeonManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using JetBrains.Annotations; 4 | using UnityEngine; 5 | using UnityEngine.SceneManagement; 6 | using Random = UnityEngine.Random; 7 | 8 | public class DungeonManager : MonoBehaviour 9 | { 10 | [Range(50, 2000)] 11 | public int totalFloorCount = 500; 12 | 13 | [Range(0, 100)] 14 | public int itemSpawnProbability = 5; 15 | 16 | [Range(0, 100)] 17 | public int enemySpawnProbability = 5; 18 | 19 | [Range(0, 100)] 20 | public int windingHallProbability = 20; 21 | 22 | public bool roundedEdges; 23 | 24 | public DungeonType dungeonType; 25 | 26 | public GameObject floorPrefab; 27 | public GameObject wallPrefab; 28 | public GameObject tilePrefab; 29 | public GameObject exitPrefab; 30 | 31 | public GameObject[] randomItems; 32 | public GameObject[] randomEnemies; 33 | public GameObject[] wallRoundedEdges; 34 | 35 | [HideInInspector] 36 | public float minX; 37 | 38 | [HideInInspector] 39 | public float maxX; 40 | 41 | [HideInInspector] 42 | public float minY; 43 | 44 | [HideInInspector] 45 | public float maxY; 46 | 47 | [NotNull] 48 | private static readonly Vector3[] Directions = { Vector3.up, Vector3.right, Vector3.down, Vector3.left }; 49 | 50 | [NotNull] 51 | private readonly List _floorList = new List(); 52 | 53 | private readonly Vector2 _hitSize = Vector2.one * 0.8f; 54 | private LayerMask _floorMask; 55 | private LayerMask _wallMask; 56 | private Vector3? _doorPos; 57 | 58 | private static Vector3 RandomDirection() => Directions[Random.Range(0, Directions.Length)]; 59 | 60 | private void Start() 61 | { 62 | _floorMask = LayerMask.GetMask("Floor"); 63 | _wallMask = LayerMask.GetMask("Wall"); 64 | 65 | switch (dungeonType) 66 | { 67 | case DungeonType.Caverns: RandomWalker(); break; 68 | case DungeonType.Rooms: RoomWalker(); break; 69 | case DungeonType.Winding: WindingWalker(); break; 70 | } 71 | 72 | // Wait for the awakes and starts to be called. 73 | StartCoroutine(DelayProgress()); 74 | } 75 | 76 | private void Update() 77 | { 78 | // Reload scene on hotkey. 79 | if (Application.isEditor && Input.GetKeyDown(KeyCode.Backspace)) 80 | { 81 | SceneManager.LoadScene(SceneManager.GetActiveScene().name); 82 | } 83 | } 84 | 85 | private void RandomWalker() 86 | { 87 | // Starting point of the PLAYER (... is also the random walker) 88 | var curPos = Vector3.zero; 89 | _floorList.Add(curPos); 90 | 91 | while (_floorList.Count < totalFloorCount) 92 | { 93 | curPos += RandomDirection(); 94 | 95 | // TODO: Should we use a hashset? 96 | if (_floorList.Contains(curPos)) continue; 97 | _floorList.Add(curPos); 98 | } 99 | } 100 | 101 | private void RoomWalker() 102 | { 103 | // Starting point of the PLAYER (... is also the random walker) 104 | var curPos = Vector3.zero; 105 | _floorList.Add(curPos); 106 | 107 | while (_floorList.Count < totalFloorCount) 108 | { 109 | TakeLongWalk(ref curPos); 110 | RandomRoom(curPos); 111 | } 112 | } 113 | 114 | private void WindingWalker() 115 | { 116 | // Starting point of the PLAYER (... is also the random walker) 117 | var curPos = Vector3.zero; 118 | _floorList.Add(curPos); 119 | 120 | while (_floorList.Count < totalFloorCount) 121 | { 122 | TakeLongWalk(ref curPos); 123 | 124 | var roll = Random.Range(0, 100); 125 | if (roll > windingHallProbability) RandomRoom(curPos); 126 | } 127 | } 128 | 129 | private void RandomRoom(Vector3 position) 130 | { 131 | // Randomly select a half-width of a room; e.g., 132 | // a value of 4 implies a 2x4+1=9 cell wide room. 133 | var width = Random.Range(1, 5); 134 | var height = Random.Range(1, 5); 135 | for (var w = -width; w <= width; ++w) 136 | { 137 | for (var h = -height; h <= height; ++h) 138 | { 139 | var offset = new Vector3(w, h); 140 | var candidateTile = position + offset; 141 | 142 | // TODO: Should we use a hashset? 143 | if (_floorList.Contains(candidateTile)) continue; 144 | _floorList.Add(candidateTile); 145 | } 146 | } 147 | } 148 | 149 | private void TakeLongWalk(ref Vector3 curPos) 150 | { 151 | var walkDirection = RandomDirection(); 152 | 153 | // We want to create 3x3 up to 9x9 rooms later on. 154 | var walkLength = Random.Range(9, 18); 155 | for (var i = 0; i < walkLength; ++i) 156 | { 157 | curPos += walkDirection; 158 | 159 | // TODO: Should we use a hashset? 160 | if (_floorList.Contains(curPos)) continue; 161 | _floorList.Add(curPos); 162 | } 163 | } 164 | 165 | private IEnumerator DelayProgress() 166 | { 167 | // Instantiate tiles. 168 | for (var i = 0; i < _floorList.Count; ++i) 169 | { 170 | var goTile = Instantiate(tilePrefab, _floorList[i], Quaternion.identity, transform); 171 | goTile.name = tilePrefab.name; 172 | } 173 | 174 | // Wait for all tile spawners to be created before continuing to place level elements. 175 | while (FindObjectsOfType().Length > 0) 176 | { 177 | yield return null; 178 | } 179 | 180 | CreateExitDoor(); 181 | CreateRandomItems(); 182 | } 183 | 184 | private void CreateExitDoor() 185 | { 186 | // We're assuming that the random walker ended up somewhere distant from the player. 187 | // This is the location were we place our exit dor. 188 | _doorPos = _floorList[_floorList.Count - 1]; 189 | 190 | var goDoor = Instantiate(exitPrefab, _doorPos.Value, Quaternion.identity, transform); 191 | goDoor.name = exitPrefab.name; 192 | } 193 | 194 | private void CreateRandomItems() 195 | { 196 | Debug.Assert(_doorPos.HasValue, "Exit door must be instantiated before placing items."); 197 | 198 | const int offset = 2; // TODO: Why though? 199 | for (var x = (int) minX - offset; x <= (int) maxX + offset; ++x) 200 | { 201 | for (var y = (int) minY - offset; y <= (int) maxY + offset; ++y) 202 | { 203 | // Note that the angle (of 0) is hugely important. If unspecified, all the 204 | // areas surrounding a floor tile (i.e., walls and other open floors) will be triggering 205 | // collisions as well. 206 | var hitFloor = Physics2D.OverlapBox(new Vector2(x, y), _hitSize, 0, _floorMask); 207 | if (hitFloor) 208 | { 209 | // Ensure we're not placing something onto the exit door. 210 | // ReSharper disable once PossibleInvalidOperationException 211 | var positionIsExitDoor = Vector2.Equals(hitFloor.transform.position, _doorPos.Value); 212 | if (positionIsExitDoor) continue; 213 | 214 | var hitTop = Physics2D.OverlapBox(new Vector2(x, y + 1), _hitSize, 0, _wallMask); 215 | var hitRight = Physics2D.OverlapBox(new Vector2(x + 1, y), _hitSize, 0, _wallMask); 216 | var hitBottom = Physics2D.OverlapBox(new Vector2(x, y - 1), _hitSize, 0, _wallMask); 217 | var hitLeft = Physics2D.OverlapBox(new Vector2(x - 1, y), _hitSize, 0, _wallMask); 218 | 219 | CreateRandomItem(hitFloor, hitTop, hitRight, hitBottom, hitLeft); 220 | CreateRandomEnemy(hitFloor, hitTop, hitRight, hitBottom, hitLeft); 221 | } 222 | 223 | RoundedEdges(x, y); 224 | } 225 | } 226 | } 227 | 228 | private void RoundedEdges(int x, int y) 229 | { 230 | if (!roundedEdges) return; 231 | 232 | var position = new Vector2(x, y); 233 | var hitWall = Physics2D.OverlapBox(position, _hitSize, 0, _wallMask); 234 | if (!hitWall) return; 235 | 236 | var hitTop = Physics2D.OverlapBox(new Vector2(x, y + 1), _hitSize, 0, _wallMask); 237 | var hitRight = Physics2D.OverlapBox(new Vector2(x + 1, y), _hitSize, 0, _wallMask); 238 | var hitBottom = Physics2D.OverlapBox(new Vector2(x, y - 1), _hitSize, 0, _wallMask); 239 | var hitLeft = Physics2D.OverlapBox(new Vector2(x - 1, y), _hitSize, 0, _wallMask); 240 | 241 | var bitValue = 0; 242 | bitValue += hitTop ? 0 : 1; 243 | bitValue += hitRight ? 0 : 2; 244 | bitValue += hitBottom ? 0 : 4; 245 | bitValue += hitLeft ? 0 : 8; 246 | 247 | if (bitValue == 0) return; 248 | 249 | var edgePrefab = wallRoundedEdges[bitValue]; 250 | var goItem = Instantiate(edgePrefab, position, Quaternion.identity, hitWall.transform); 251 | goItem.name = edgePrefab.name; 252 | } 253 | 254 | private void CreateRandomItem([NotNull] Collider2D hitFloor, 255 | [NotNull] Collider2D hitTop, [NotNull] Collider2D hitRight, [NotNull] Collider2D hitBottom, 256 | [NotNull] Collider2D hitLeft) 257 | { 258 | var hasSurroundingWall = hitTop || hitRight || hitBottom || hitLeft; 259 | var isHorizontalTunnel = hitTop && hitBottom; 260 | var isVerticalTunnel = hitLeft && hitRight; 261 | var isTunnel = isHorizontalTunnel || isVerticalTunnel; 262 | if (!hasSurroundingWall || isTunnel) return; 263 | 264 | var roll = Random.Range(1, 101); 265 | if (roll > itemSpawnProbability) return; 266 | 267 | var itemIndex = Random.Range(0, randomItems.Length); 268 | var itemPrefab = randomItems[itemIndex]; 269 | 270 | var floorTransform = hitFloor.transform; 271 | var goItem = Instantiate(itemPrefab, floorTransform.position, Quaternion.identity, floorTransform); 272 | goItem.name = itemPrefab.name; 273 | } 274 | 275 | private void CreateRandomEnemy([NotNull] Collider2D hitFloor, 276 | [NotNull] Collider2D hitTop, [NotNull] Collider2D hitRight, [NotNull] Collider2D hitBottom, 277 | [NotNull] Collider2D hitLeft) 278 | { 279 | var hasSurroundingWall = hitTop || hitRight || hitBottom || hitLeft; 280 | if (hasSurroundingWall) return; 281 | 282 | var roll = Random.Range(1, 101); 283 | if (roll > enemySpawnProbability) return; 284 | 285 | var enemyIndex = Random.Range(0, randomEnemies.Length); 286 | var enemyPrefab = randomEnemies[enemyIndex]; 287 | 288 | var floorTransform = hitFloor.transform; 289 | var goEnemy = Instantiate(enemyPrefab, floorTransform.position, Quaternion.identity, floorTransform); 290 | goEnemy.name = enemyPrefab.name; 291 | } 292 | } 293 | -------------------------------------------------------------------------------- /Assets/Tiles/Angband/terrain.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6acbc12042c63abdfbec8c1a65746904 3 | TextureImporter: 4 | internalIDToNameTable: 5 | - first: 6 | 213: 8765297898444631108 7 | second: terrain_0 8 | - first: 9 | 213: -5519051278557835307 10 | second: terrain_1 11 | - first: 12 | 213: 2963411684039260603 13 | second: terrain_2 14 | - first: 15 | 213: -4725923292034538642 16 | second: terrain_3 17 | - first: 18 | 213: 8517107447714677574 19 | second: terrain_4 20 | - first: 21 | 213: -7381383704308568027 22 | second: terrain_5 23 | - first: 24 | 213: 1017412213553842495 25 | second: terrain_6 26 | - first: 27 | 213: -602857838496182610 28 | second: terrain_7 29 | - first: 30 | 213: 6875082008355445951 31 | second: terrain_8 32 | - first: 33 | 213: 720614356373513186 34 | second: terrain_9 35 | - first: 36 | 213: -7304857774246764523 37 | second: terrain_10 38 | - first: 39 | 213: -3768716606700068512 40 | second: terrain_11 41 | - first: 42 | 213: 6532709478578541829 43 | second: terrain_12 44 | - first: 45 | 213: 8583100498175357109 46 | second: terrain_13 47 | externalObjects: {} 48 | serializedVersion: 10 49 | mipmaps: 50 | mipMapMode: 0 51 | enableMipMap: 0 52 | sRGBTexture: 1 53 | linearTexture: 0 54 | fadeOut: 0 55 | borderMipMap: 0 56 | mipMapsPreserveCoverage: 0 57 | alphaTestReferenceValue: 0.5 58 | mipMapFadeDistanceStart: 1 59 | mipMapFadeDistanceEnd: 3 60 | bumpmap: 61 | convertToNormalMap: 0 62 | externalNormalMap: 0 63 | heightScale: 0.25 64 | normalMapFilter: 0 65 | isReadable: 0 66 | streamingMipmaps: 0 67 | streamingMipmapsPriority: 0 68 | grayScaleToAlpha: 0 69 | generateCubemap: 6 70 | cubemapConvolution: 0 71 | seamlessCubemap: 0 72 | textureFormat: 1 73 | maxTextureSize: 2048 74 | textureSettings: 75 | serializedVersion: 2 76 | filterMode: 0 77 | aniso: -1 78 | mipBias: -100 79 | wrapU: 1 80 | wrapV: 1 81 | wrapW: 1 82 | nPOTScale: 0 83 | lightmap: 0 84 | compressionQuality: 50 85 | spriteMode: 2 86 | spriteExtrude: 1 87 | spriteMeshType: 1 88 | alignment: 0 89 | spritePivot: {x: 0.5, y: 0.5} 90 | spritePixelsToUnits: 32 91 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 92 | spriteGenerateFallbackPhysicsShape: 1 93 | alphaUsage: 1 94 | alphaIsTransparency: 1 95 | spriteTessellationDetail: -1 96 | textureType: 8 97 | textureShape: 1 98 | singleChannelComponent: 0 99 | maxTextureSizeSet: 0 100 | compressionQualitySet: 0 101 | textureFormatSet: 0 102 | platformSettings: 103 | - serializedVersion: 3 104 | buildTarget: DefaultTexturePlatform 105 | maxTextureSize: 128 106 | resizeAlgorithm: 0 107 | textureFormat: -1 108 | textureCompression: 1 109 | compressionQuality: 50 110 | crunchedCompression: 0 111 | allowsAlphaSplitting: 0 112 | overridden: 0 113 | androidETC2FallbackOverride: 0 114 | forceMaximumCompressionQuality_BC6H_BC7: 0 115 | - serializedVersion: 3 116 | buildTarget: Standalone 117 | maxTextureSize: 128 118 | resizeAlgorithm: 0 119 | textureFormat: -1 120 | textureCompression: 1 121 | compressionQuality: 50 122 | crunchedCompression: 0 123 | allowsAlphaSplitting: 0 124 | overridden: 0 125 | androidETC2FallbackOverride: 0 126 | forceMaximumCompressionQuality_BC6H_BC7: 0 127 | spriteSheet: 128 | serializedVersion: 2 129 | sprites: 130 | - serializedVersion: 2 131 | name: terrain_0 132 | rect: 133 | serializedVersion: 2 134 | x: 0 135 | y: 96 136 | width: 32 137 | height: 32 138 | alignment: 0 139 | pivot: {x: 0, y: 0} 140 | border: {x: 0, y: 0, z: 0, w: 0} 141 | outline: [] 142 | physicsShape: [] 143 | tessellationDetail: 0 144 | bones: [] 145 | spriteID: 40dada04c136ceb8c942d9777556fd24 146 | internalID: 8765297898444631108 147 | vertices: [] 148 | indices: 149 | edges: [] 150 | weights: [] 151 | - serializedVersion: 2 152 | name: terrain_1 153 | rect: 154 | serializedVersion: 2 155 | x: 32 156 | y: 96 157 | width: 32 158 | height: 32 159 | alignment: 0 160 | pivot: {x: 0, y: 0} 161 | border: {x: 0, y: 0, z: 0, w: 0} 162 | outline: [] 163 | physicsShape: [] 164 | tessellationDetail: 0 165 | bones: [] 166 | spriteID: 585273f6cff5b2781823c091ae91040a 167 | internalID: -5519051278557835307 168 | vertices: [] 169 | indices: 170 | edges: [] 171 | weights: [] 172 | - serializedVersion: 2 173 | name: terrain_2 174 | rect: 175 | serializedVersion: 2 176 | x: 64 177 | y: 96 178 | width: 32 179 | height: 32 180 | alignment: 0 181 | pivot: {x: 0, y: 0} 182 | border: {x: 0, y: 0, z: 0, w: 0} 183 | outline: [] 184 | physicsShape: [] 185 | tessellationDetail: 0 186 | bones: [] 187 | spriteID: a6b1d8678fe748ba3bfc263dc331d437 188 | internalID: 2963411684039260603 189 | vertices: [] 190 | indices: 191 | edges: [] 192 | weights: [] 193 | - serializedVersion: 2 194 | name: terrain_3 195 | rect: 196 | serializedVersion: 2 197 | x: 96 198 | y: 96 199 | width: 32 200 | height: 32 201 | alignment: 0 202 | pivot: {x: 0, y: 0} 203 | border: {x: 0, y: 0, z: 0, w: 0} 204 | outline: [] 205 | physicsShape: [] 206 | tessellationDetail: 0 207 | bones: [] 208 | spriteID: 470050d6290cef5e98696202245b9eb3 209 | internalID: -4725923292034538642 210 | vertices: [] 211 | indices: 212 | edges: [] 213 | weights: [] 214 | - serializedVersion: 2 215 | name: terrain_4 216 | rect: 217 | serializedVersion: 2 218 | x: 0 219 | y: 64 220 | width: 32 221 | height: 32 222 | alignment: 0 223 | pivot: {x: 0, y: 0} 224 | border: {x: 0, y: 0, z: 0, w: 0} 225 | outline: [] 226 | physicsShape: [] 227 | tessellationDetail: 0 228 | bones: [] 229 | spriteID: be41aae7cf1b34d6380f5c97cd910ff0 230 | internalID: 8517107447714677574 231 | vertices: [] 232 | indices: 233 | edges: [] 234 | weights: [] 235 | - serializedVersion: 2 236 | name: terrain_5 237 | rect: 238 | serializedVersion: 2 239 | x: 32 240 | y: 64 241 | width: 32 242 | height: 32 243 | alignment: 0 244 | pivot: {x: 0, y: 0} 245 | border: {x: 0, y: 0, z: 0, w: 0} 246 | outline: [] 247 | physicsShape: [] 248 | tessellationDetail: 0 249 | bones: [] 250 | spriteID: 58953d12210cf6154976c770e10adc88 251 | internalID: -7381383704308568027 252 | vertices: [] 253 | indices: 254 | edges: [] 255 | weights: [] 256 | - serializedVersion: 2 257 | name: terrain_6 258 | rect: 259 | serializedVersion: 2 260 | x: 96 261 | y: 64 262 | width: 32 263 | height: 32 264 | alignment: 0 265 | pivot: {x: 0, y: 0} 266 | border: {x: 0, y: 0, z: 0, w: 0} 267 | outline: [] 268 | physicsShape: [] 269 | tessellationDetail: 0 270 | bones: [] 271 | spriteID: 3ffd9633cd6e92c1a806f88f512e7ad1 272 | internalID: 1017412213553842495 273 | vertices: [] 274 | indices: 275 | edges: [] 276 | weights: [] 277 | - serializedVersion: 2 278 | name: terrain_7 279 | rect: 280 | serializedVersion: 2 281 | x: 0 282 | y: 32 283 | width: 32 284 | height: 32 285 | alignment: 0 286 | pivot: {x: 0, y: 0} 287 | border: {x: 0, y: 0, z: 0, w: 0} 288 | outline: [] 289 | physicsShape: [] 290 | tessellationDetail: 0 291 | bones: [] 292 | spriteID: 5103c4066c520033c9e9e00b2857b929 293 | internalID: -602857838496182610 294 | vertices: [] 295 | indices: 296 | edges: [] 297 | weights: [] 298 | - serializedVersion: 2 299 | name: terrain_8 300 | rect: 301 | serializedVersion: 2 302 | x: 32 303 | y: 32 304 | width: 32 305 | height: 32 306 | alignment: 0 307 | pivot: {x: 0, y: 0} 308 | border: {x: 0, y: 0, z: 0, w: 0} 309 | outline: [] 310 | physicsShape: [] 311 | tessellationDetail: 0 312 | bones: [] 313 | spriteID: c53365395ea1a41aea886756726d80c2 314 | internalID: 6875082008355445951 315 | vertices: [] 316 | indices: 317 | edges: [] 318 | weights: [] 319 | - serializedVersion: 2 320 | name: terrain_9 321 | rect: 322 | serializedVersion: 2 323 | x: 64 324 | y: 32 325 | width: 32 326 | height: 32 327 | alignment: 0 328 | pivot: {x: 0, y: 0} 329 | border: {x: 0, y: 0, z: 0, w: 0} 330 | outline: [] 331 | physicsShape: [] 332 | tessellationDetail: 0 333 | bones: [] 334 | spriteID: 92cc6ee02226a8ff580be6e2142edb44 335 | internalID: 720614356373513186 336 | vertices: [] 337 | indices: 338 | edges: [] 339 | weights: [] 340 | - serializedVersion: 2 341 | name: terrain_10 342 | rect: 343 | serializedVersion: 2 344 | x: 96 345 | y: 32 346 | width: 32 347 | height: 32 348 | alignment: 0 349 | pivot: {x: 0, y: 0} 350 | border: {x: 0, y: 0, z: 0, w: 0} 351 | outline: [] 352 | physicsShape: [] 353 | tessellationDetail: 0 354 | bones: [] 355 | spriteID: b79e20c7baf0530d0b1628b8ba536802 356 | internalID: -7304857774246764523 357 | vertices: [] 358 | indices: 359 | edges: [] 360 | weights: [] 361 | - serializedVersion: 2 362 | name: terrain_11 363 | rect: 364 | serializedVersion: 2 365 | x: 0 366 | y: 0 367 | width: 32 368 | height: 32 369 | alignment: 0 370 | pivot: {x: 0, y: 0} 371 | border: {x: 0, y: 0, z: 0, w: 0} 372 | outline: [] 373 | physicsShape: [] 374 | tessellationDetail: 0 375 | bones: [] 376 | spriteID: 1f944ab497f54933a91358bac226fbab 377 | internalID: -3768716606700068512 378 | vertices: [] 379 | indices: 380 | edges: [] 381 | weights: [] 382 | - serializedVersion: 2 383 | name: terrain_12 384 | rect: 385 | serializedVersion: 2 386 | x: 64 387 | y: 0 388 | width: 32 389 | height: 32 390 | alignment: 0 391 | pivot: {x: 0, y: 0} 392 | border: {x: 0, y: 0, z: 0, w: 0} 393 | outline: [] 394 | physicsShape: [] 395 | tessellationDetail: 0 396 | bones: [] 397 | spriteID: b4f5d33d2cdb3c241ad5840c6c9e7a18 398 | internalID: 6532709478578541829 399 | vertices: [] 400 | indices: 401 | edges: [] 402 | weights: [] 403 | - serializedVersion: 2 404 | name: terrain_13 405 | rect: 406 | serializedVersion: 2 407 | x: 96 408 | y: 0 409 | width: 32 410 | height: 32 411 | alignment: 0 412 | pivot: {x: 0, y: 0} 413 | border: {x: 0, y: 0, z: 0, w: 0} 414 | outline: [] 415 | physicsShape: [] 416 | tessellationDetail: 0 417 | bones: [] 418 | spriteID: eb93958badeab27eb804e05653c795bd 419 | internalID: 8583100498175357109 420 | vertices: [] 421 | indices: 422 | edges: [] 423 | weights: [] 424 | outline: [] 425 | physicsShape: [] 426 | bones: [] 427 | spriteID: 5e97eb03825dee720800000000000000 428 | internalID: 0 429 | vertices: [] 430 | indices: 431 | edges: [] 432 | weights: [] 433 | secondaryTextures: [] 434 | spritePackingTag: 435 | pSDRemoveMatte: 0 436 | pSDShowRemoveMatteOption: 0 437 | userData: 438 | assetBundleName: 439 | assetBundleVariant: 440 | --------------------------------------------------------------------------------