├── Wiki images ├── Header.png ├── SpawnersOptions.png ├── StartPointOptions.png ├── SpawnerPickersOptions.png └── StartPointPickerOptions.png ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── XRSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── UnityConnectSettings.asset ├── EditorSettings.asset ├── DynamicsManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset └── QualitySettings.asset ├── .vsconfig ├── Assets ├── Wave One │ ├── Documentation │ │ ├── Wave One Manual.pdf │ │ └── Wave One Manual.pdf.meta │ ├── Assets │ │ ├── Scripts │ │ │ ├── GameEvents │ │ │ │ ├── Void.cs │ │ │ │ ├── Listeners │ │ │ │ │ ├── IGameEventListener.cs │ │ │ │ │ ├── IntEventListener.cs │ │ │ │ │ ├── BoolEventListener.cs │ │ │ │ │ ├── VoidEventListener.cs │ │ │ │ │ ├── BoolEventListener.cs.meta │ │ │ │ │ ├── IGameEventListener.cs.meta │ │ │ │ │ ├── IntEventListener.cs.meta │ │ │ │ │ ├── VoidEventListener.cs.meta │ │ │ │ │ ├── BaseGameEventListener.cs.meta │ │ │ │ │ └── BaseGameEventListener.cs │ │ │ │ ├── UnityEvents │ │ │ │ │ ├── UnityBoolEvent.cs │ │ │ │ │ ├── UnityIntEvent.cs │ │ │ │ │ ├── UnityVoidEvent.cs │ │ │ │ │ ├── UnityBoolEvent.cs.meta │ │ │ │ │ ├── UnityIntEvent.cs.meta │ │ │ │ │ └── UnityVoidEvent.cs.meta │ │ │ │ ├── Listeners.meta │ │ │ │ ├── UnityEvents.meta │ │ │ │ ├── ScriptableEvents.meta │ │ │ │ ├── ScriptableEvents │ │ │ │ │ ├── IntEvent.cs │ │ │ │ │ ├── BoolEvent.cs │ │ │ │ │ ├── BoolEvent.cs.meta │ │ │ │ │ ├── IntEvent.cs.meta │ │ │ │ │ ├── VoidEvent.cs │ │ │ │ │ ├── VoidEvent.cs.meta │ │ │ │ │ ├── BaseGameEvent.cs.meta │ │ │ │ │ └── BaseGameEvent.cs │ │ │ │ └── Void.cs.meta │ │ │ ├── Interfaces │ │ │ │ ├── IStartPoint.cs │ │ │ │ ├── ISpawnerPicker.cs │ │ │ │ ├── IStartPointPicker.cs │ │ │ │ ├── IFormation.cs │ │ │ │ ├── ISpawner.cs.meta │ │ │ │ ├── IFormation.cs.meta │ │ │ │ ├── ISpawnerPicker.cs.meta │ │ │ │ ├── IStartPoint.cs.meta │ │ │ │ ├── IStartPointPicker.cs.meta │ │ │ │ └── ISpawner.cs │ │ │ ├── Spawners.meta │ │ │ ├── EndPoints.meta │ │ │ ├── Formations.meta │ │ │ ├── GameEvents.meta │ │ │ ├── Interfaces.meta │ │ │ ├── Management.meta │ │ │ ├── StartPoints.meta │ │ │ ├── StartPoints │ │ │ │ ├── Shapes.meta │ │ │ │ ├── StartPointPickers.meta │ │ │ │ ├── StartPointEnum.cs │ │ │ │ ├── ListOfBoxes.cs.meta │ │ │ │ ├── ListOfSpheres.cs.meta │ │ │ │ ├── Shapes │ │ │ │ │ ├── Box.cs │ │ │ │ │ ├── Box.cs.meta │ │ │ │ │ ├── Sphere.cs.meta │ │ │ │ │ └── Sphere.cs │ │ │ │ ├── ListOfTransforms.cs.meta │ │ │ │ ├── StartPointEnum.cs.meta │ │ │ │ ├── StartPointPickers │ │ │ │ │ ├── InOrderStartPoint.cs.meta │ │ │ │ │ ├── RandomStartPoint.cs.meta │ │ │ │ │ ├── StartPointPickerEnum.cs.meta │ │ │ │ │ ├── ReverseOrderStartPoint.cs.meta │ │ │ │ │ ├── RandomGuaranteedStartPoint.cs.meta │ │ │ │ │ ├── StartPointPickerEnum.cs │ │ │ │ │ ├── RandomStartPoint.cs │ │ │ │ │ ├── InOrderStartPoint.cs │ │ │ │ │ ├── ReverseOrderStartPoint.cs │ │ │ │ │ └── RandomGuaranteedStartPoint.cs │ │ │ │ ├── ListOfTransforms.cs │ │ │ │ ├── ListOfSpheres.cs │ │ │ │ └── ListOfBoxes.cs │ │ │ ├── Formations │ │ │ │ ├── FormationEnum.cs │ │ │ │ ├── FormationEnum.cs.meta │ │ │ │ ├── SquareGroupFormation.cs.meta │ │ │ │ └── SquareGroupFormation.cs │ │ │ ├── Spawners │ │ │ │ ├── SpawnerPickers.meta │ │ │ │ ├── SpawnerEnum.cs │ │ │ │ ├── SpawnerEnum.cs.meta │ │ │ │ ├── PerWaveCustom.cs.meta │ │ │ │ ├── TimedSpawner.cs.meta │ │ │ │ ├── PerWaveRandomPool.cs.meta │ │ │ │ └── SpawnerPickers │ │ │ │ │ ├── InOrderSpawner.cs.meta │ │ │ │ │ ├── SpawnerPickerEnum.cs │ │ │ │ │ ├── ReverseOrderSpawner.cs.meta │ │ │ │ │ ├── SpawnerPickerEnum.cs.meta │ │ │ │ │ ├── RandomGuaranteedSpawner.cs.meta │ │ │ │ │ ├── InOrderSpawner.cs │ │ │ │ │ ├── ReverseOrderSpawner.cs │ │ │ │ │ └── RandomGuaranteedSpawner.cs │ │ │ ├── EndPoints │ │ │ │ ├── EndPointEnum.cs │ │ │ │ ├── EndPoint.cs.meta │ │ │ │ ├── EndPointEnum.cs.meta │ │ │ │ ├── SetAgentDestination.cs.meta │ │ │ │ ├── SetAgentDestination.cs │ │ │ │ └── EndPoint.cs │ │ │ └── Management │ │ │ │ ├── WaveManager.cs.meta │ │ │ │ ├── WaveConfigurator.cs.meta │ │ │ │ └── WaveManager.cs │ │ ├── Editor.meta │ │ ├── Scripts.meta │ │ ├── Editor │ │ │ ├── Spawners.meta │ │ │ ├── StartPoints.meta │ │ │ ├── Spawners │ │ │ │ ├── Pickers.meta │ │ │ │ ├── PerWaveCustomEditor.cs.meta │ │ │ │ ├── TimedSpawnerEditor.cs.meta │ │ │ │ ├── PerWaveRandomPoolEditor.cs.meta │ │ │ │ ├── Pickers │ │ │ │ │ ├── InOrderSpawnerEditor.cs.meta │ │ │ │ │ ├── RandomGuaranteedSpawnerEditor.cs.meta │ │ │ │ │ ├── ReverseOrderSpawnerEditor.cs.meta │ │ │ │ │ ├── InOrderSpawnerEditor.cs │ │ │ │ │ ├── ReverseOrderSpawnerEditor.cs │ │ │ │ │ └── RandomGuaranteedSpawnerEditor.cs │ │ │ │ ├── TimedSpawnerEditor.cs │ │ │ │ ├── PerWaveRandomPoolEditor.cs │ │ │ │ └── PerWaveCustomEditor.cs │ │ │ ├── StartPoints │ │ │ │ ├── Pickers.meta │ │ │ │ ├── ListOfBoxesEditor.cs.meta │ │ │ │ ├── ListOfSpheresEditor.cs.meta │ │ │ │ ├── ListOfTransformsEditor.cs.meta │ │ │ │ ├── Pickers │ │ │ │ │ ├── InOrderStartPointEditor.cs.meta │ │ │ │ │ ├── RandomStartPointEditor.cs.meta │ │ │ │ │ ├── ReverseOrderStartPointEditor.cs.meta │ │ │ │ │ ├── RandomGuaranteedStartPointEditor.cs.meta │ │ │ │ │ ├── InOrderStartPointEditor.cs │ │ │ │ │ ├── RandomStartPointEditor.cs │ │ │ │ │ ├── ReverseOrderStartPointEditor.cs │ │ │ │ │ └── RandomGuaranteedStartPointEditor.cs │ │ │ │ ├── ListOfTransformsEditor.cs │ │ │ │ ├── ListOfSpheresEditor.cs │ │ │ │ └── ListOfBoxesEditor.cs │ │ │ ├── EditorButtons.cs.meta │ │ │ ├── EndPointEditor.cs.meta │ │ │ ├── WaveManagerEditor.cs.meta │ │ │ ├── WaveConfiguratorEditor.cs.meta │ │ │ ├── EditorButtons.cs │ │ │ ├── WaveManagerEditor.cs │ │ │ ├── WaveConfiguratorEditor.cs │ │ │ └── EndPointEditor.cs │ │ ├── ScriptableObjects.meta │ │ └── ScriptableObjects │ │ │ ├── GameEvents.meta │ │ │ └── GameEvents │ │ │ ├── Event_AliveEnemies.asset.meta │ │ │ ├── Event_TotalEnemies.asset.meta │ │ │ ├── Event_DeployedEnemies.asset.meta │ │ │ ├── Event_SpawnerFinished.asset.meta │ │ │ ├── Event_AliveEnemies.asset │ │ │ ├── Event_TotalEnemies.asset │ │ │ ├── Event_DeployedEnemies.asset │ │ │ └── Event_SpawnerFinished.asset │ ├── Demo │ │ ├── Scenes │ │ │ ├── DemoScene_Spawners │ │ │ │ ├── NavMesh-GroundPlane.asset │ │ │ │ └── NavMesh-GroundPlane.asset.meta │ │ │ ├── DemoScene_DoubleWaveManagers │ │ │ │ ├── NavMesh-GroundPlane.asset │ │ │ │ └── NavMesh-GroundPlane.asset.meta │ │ │ ├── DemoScene_Spawners.unity.meta │ │ │ ├── DemoScene_DoubleWaveManagers.unity.meta │ │ │ ├── DemoScene_Spawners.meta │ │ │ └── DemoScene_DoubleWaveManagers.meta │ │ ├── PreFabs.meta │ │ ├── Scenes.meta │ │ ├── Scripts.meta │ │ ├── Materials.meta │ │ ├── PreFabs │ │ │ ├── Agents │ │ │ │ ├── Agent_Cube.prefab.meta │ │ │ │ ├── Agent_Sphere.prefab.meta │ │ │ │ ├── Agent_Cylinder.prefab.meta │ │ │ │ ├── Agent_Sphere.prefab │ │ │ │ ├── Agent_Cube.prefab │ │ │ │ └── Agent_Cylinder.prefab │ │ │ └── Agents.meta │ │ ├── Materials │ │ │ ├── Mat_AgentCube.mat.meta │ │ │ ├── Mat_AgentCylinder.mat.meta │ │ │ ├── Mat_AgentSphere.mat.meta │ │ │ ├── Mat_GroundPlane.mat.meta │ │ │ ├── Mat_AgentCube.mat │ │ │ ├── Mat_AgentSphere.mat │ │ │ ├── Mat_AgentCylinder.mat │ │ │ └── Mat_GroundPlane.mat │ │ ├── NavMeshComponents │ │ │ ├── Scripts │ │ │ │ ├── NavMeshComponents.asmdef.meta │ │ │ │ ├── NavMeshComponents.asmdef │ │ │ │ ├── NavMeshLink.cs.meta │ │ │ │ ├── NavMeshSurface.cs.meta │ │ │ │ ├── NavMeshModifier.cs.meta │ │ │ │ ├── NavMeshModifierVolume.cs.meta │ │ │ │ ├── NavMeshModifier.cs │ │ │ │ ├── NavMeshModifierVolume.cs │ │ │ │ └── NavMeshLink.cs │ │ │ ├── Editor │ │ │ │ ├── NavMeshComponentsEditor.asmdef.meta │ │ │ │ ├── NavMeshAssetManager.cs.meta │ │ │ │ ├── NavMeshLinkEditor.cs.meta │ │ │ │ ├── NavMeshModifierEditor.cs.meta │ │ │ │ ├── NavMeshSurfaceEditor.cs.meta │ │ │ │ ├── NavMeshComponentsGUIUtility.cs.meta │ │ │ │ ├── NavMeshModifierVolumeEditor.cs.meta │ │ │ │ ├── NavMeshComponentsEditor.asmdef │ │ │ │ ├── NavMeshModifierEditor.cs │ │ │ │ └── NavMeshModifierVolumeEditor.cs │ │ │ ├── Editor.meta │ │ │ └── Scripts.meta │ │ ├── NavMeshComponents.meta │ │ └── Scripts │ │ │ ├── DisplayStats.cs.meta │ │ │ ├── ManagerSpawnButton.cs.meta │ │ │ ├── DestroyWhenCollisionWithLayer.cs.meta │ │ │ ├── ManagerSpawnButton.cs │ │ │ ├── DestroyWhenCollisionWithLayer.cs │ │ │ └── DisplayStats.cs │ ├── Assets.meta │ ├── Demo.meta │ └── Documentation.meta ├── Resources.meta └── Wave One.meta ├── .gitignore ├── LICENSE └── Packages └── manifest.json /Wiki images/Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Wiki images/Header.png -------------------------------------------------------------------------------- /Wiki images/SpawnersOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Wiki images/SpawnersOptions.png -------------------------------------------------------------------------------- /Wiki images/StartPointOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Wiki images/StartPointOptions.png -------------------------------------------------------------------------------- /Wiki images/SpawnerPickersOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Wiki images/SpawnerPickersOptions.png -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.0f1 2 | m_EditorVersionWithRevision: 2019.4.0f1 (0af376155913) 3 | -------------------------------------------------------------------------------- /Wiki images/StartPointPickerOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Wiki images/StartPointPickerOptions.png -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Assets/Wave One/Documentation/Wave One Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Assets/Wave One/Documentation/Wave One Manual.pdf -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Void.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Events 2 | { 3 | [System.Serializable] 4 | public struct Void { } 5 | } -------------------------------------------------------------------------------- /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/Wave One/Demo/Scenes/DemoScene_Spawners/NavMesh-GroundPlane.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Assets/Wave One/Demo/Scenes/DemoScene_Spawners/NavMesh-GroundPlane.asset -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_DoubleWaveManagers/NavMesh-GroundPlane.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Smehi/WaveOne/HEAD/Assets/Wave One/Demo/Scenes/DemoScene_DoubleWaveManagers/NavMesh-GroundPlane.asset -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be5f00289ddd13649ba930a903b0029b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 994c61387e1d4254db06351f002a42a8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/IStartPoint.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.StartPoints 4 | { 5 | public interface IStartPoint 6 | { 7 | Vector3 GetPoint(); 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bfc547e5db2ccf438fc7908a104c292 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/IGameEventListener.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Events 2 | { 3 | public interface IGameEventListener 4 | { 5 | void OnEventRaised(T item); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26143edb72513ec4c83c0ff622c767fd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 130f6b5411630434f9e98b97b5bf84cd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/IntEventListener.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Events 2 | { 3 | public class IntEventListener : BaseGameEventListener 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 536192b2e68c1ad43b5f213ff52198dc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4de026d79cdf164fa0c6b23850e1137 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 931d9611b270a2740af60f363164cc36 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cecd6f44e7702f43be6bc38861236fb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Documentation/Wave One Manual.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52ba4097379a6604786f67ff4ea96eb5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /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/Wave One/Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf3e9968c8f618949999f5712e187888 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/BoolEventListener.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Events 2 | { 3 | public class BoolEventListener : BaseGameEventListener 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/VoidEventListener.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Events 2 | { 3 | public class VoidEventListener : BaseGameEventListener 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60bd8b49938d29f4cbf573397e57b534 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents/Agent_Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9017dbb41ad9c864abdf906adabbda8b 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents/Agent_Sphere.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7428e1ac6f58ea449bc197fcec29c7d 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_Spawners.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 896fe20ad8248754b88969bb60ee4b7d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87c123ae00c252a438f6939139ea986f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents/UnityBoolEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.Events; 2 | 3 | namespace SemihOrhan.WaveOne.Events 4 | { 5 | [System.Serializable] 6 | public class UnityBoolEvent : UnityEvent { } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents/UnityIntEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.Events; 2 | 3 | namespace SemihOrhan.WaveOne.Events 4 | { 5 | [System.Serializable] 6 | public class UnityIntEvent : UnityEvent { } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents/UnityVoidEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.Events; 2 | 3 | namespace SemihOrhan.WaveOne.Events 4 | { 5 | [System.Serializable] 6 | public class UnityVoidEvent : UnityEvent { } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04527c7c486c6884cb503abfbf808771 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b46b2a313371dc54291138aa2c52f749 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents/Agent_Cylinder.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0e8b75e50da8df4299405d0b904175e 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25a4035222c8a9d478830ef4de886063 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2afc15ca997a2da4fa30b86707a94561 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/EndPoints.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a6625c45954fee468dce14f5d528d9e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Formations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b56a7f213671c4140869c48a59627c1f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13af1c659fe2fef4cb28d11c54863e56 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 366d59597328dc948a98b2e1e302dc1c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Management.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82ee9407c3a42f94db317a04a0d2df15 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3284c2cb62f16e4bac0f6d1fb1ed3f6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_DoubleWaveManagers.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77cd3b02d549e8643bc8653b443ab9ac 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd07eff9185a60946945ff56cd929f3c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 183dc6a9ce2407b418791012b5b9f1dd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/ISpawnerPicker.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Spawners.SpawnerPickers 2 | { 3 | public interface ISpawnerPicker 4 | { 5 | void SetListSize(int size); 6 | int GetIndex(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/Shapes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f17f9d074f19a7d4ca9496f37486a14b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_Spawners.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a5068287818b0444ac86f77c7ba9f26 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4af3e7332ecead74a8ce4dcb00492b67 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Formations/FormationEnum.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Formations 2 | { 3 | public class FormationEnum 4 | { 5 | public enum FormationType 6 | { 7 | Square 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 461021d8d1ce4aa458927dccfbbee9c5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6286087fce077b746adea2c8453c8d10 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53b88ac2dbe98774fbc61bbd3bf0c488 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e5017f884169c943939f8e5efd70c22 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/IStartPointPicker.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.StartPoints.StartPointPickers 2 | { 3 | public interface IStartPointPicker 4 | { 5 | void SetListSize(int size); 6 | int GetIndex(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_DoubleWaveManagers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1205c2d958d6d9546a9eddf091150617 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f47479e5ea420542ade58807e6b88b6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_AgentCube.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee52b15add81ed441afc7e392efebab8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshComponents.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c4dd21966739024fbd72155091d199e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_AgentCylinder.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a503770aeed3dfc4b978eff3abced38f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_AgentSphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa962a2ed2673fc4fa496b1cca06218d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_GroundPlane.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e35d7608b45e6c43b3d53566de74783 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshComponentsEditor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86c9d8e67265f41469be06142c397d17 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90490f1de0cc846679dcec6f99663653 3 | folderAsset: yes 4 | timeCreated: 1477656493 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /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.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63b588f3892bb4b5eb73ad3d2791e05c 3 | folderAsset: yes 4 | timeCreated: 1477656493 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce67aa87f613246dda63a54a59c6399e 3 | folderAsset: yes 4 | timeCreated: 1477656493 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/EndPoints/EndPointEnum.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.EndPoints 2 | { 3 | public static class EndPointsEnum 4 | { 5 | public enum EndPointsType 6 | { 7 | Disabled, 8 | Enabled 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_Spawners/NavMesh-GroundPlane.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0299c6709b8ff34a90c73ee9857205d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 23800000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_AliveEnemies.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4729eab659c313a4bb41763a631f42b3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_TotalEnemies.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9abb2f719a463842b054928badb6ef1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_DeployedEnemies.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b79c39ddf78a32d4cb30a91e6ddc03fd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_SpawnerFinished.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c812d20b498eb1d47b020535c2f5d55e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/IntEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.Events 4 | { 5 | [CreateAssetMenu(fileName = "New Int Event", menuName = "Game Events/Int Event")] 6 | public class IntEvent : BaseGameEvent 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scenes/DemoScene_DoubleWaveManagers/NavMesh-GroundPlane.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da0abecf776f9c745b968612128ee42b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 23800000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/BoolEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.Events 4 | { 5 | [CreateAssetMenu(fileName = "New Bool Event", menuName = "Game Events/Bool Event")] 6 | public class BoolEvent : BaseGameEvent 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/IFormation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.Formations 5 | { 6 | public interface IFormation 7 | { 8 | List MakeFormation(GameObject gameObject, int groupSize); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointEnum.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.StartPoints 2 | { 3 | public static class StartPointEnum 4 | { 5 | public enum StartPointType 6 | { 7 | Transform, 8 | Box, 9 | Sphere 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerEnum.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Spawners 2 | { 3 | public static class SpawnerEnum 4 | { 5 | public enum SpawnerType 6 | { 7 | PerWaveCustom, 8 | PerWaveRandomPool, 9 | TimedSpawner 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts/DisplayStats.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ed2a15b9077625438f06e0ae719cceb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/EditorButtons.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2842b1230bd2fb441bb4500123ce48f3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/EndPointEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 575d4f63a3577ac479e70d5641522fca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Void.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acf844aaf836cc741b18130ba97f47c0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/WaveManagerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b79cfd7a2deec0b42b9238fd8c8dc783 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/EndPoints/EndPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aebc4c8385cfb684897b9e6369b8f7d1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/ISpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a5e9dbddbce6d24eb46e26966375174 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a32e20d010a397d4588d4c77a16b322f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts/ManagerSpawnButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3d6c0b08f2758a46ac5b2893e47f854 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/WaveConfiguratorEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 930be01615f8d134c95f39e161035141 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/EndPoints/EndPointEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07535948065bc514dab0fd3db2959480 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Formations/FormationEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 853e5cc9000334c4db7cf753daba721f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/IFormation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 800911cf5036dbe48bf6b4254c915ff0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/ISpawnerPicker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4ba4f1fb770a854fa8f31004b82ccd4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/IStartPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f297b6c009b6b2468f6b994fede45a2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Management/WaveManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0394638f0f3ec8e4aaf150ab04cc8e5f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/PerWaveCustom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3fe86d6e8cd79b4e9dd4f40a5b1f1f0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/TimedSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d9468efc00369843b7808c5d157ceca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/ListOfBoxes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3743d2c0845e334d8f3065c2dca4d39 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/ListOfSpheres.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e0b3c73ef9abc9449b32a3f6a184d1c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/Shapes/Box.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.StartPoints.Shapes 4 | { 5 | [System.Serializable] 6 | public struct Box 7 | { 8 | public Transform transform; 9 | public Vector3 size; 10 | public Vector3 minDistanceFromCenter; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/Shapes/Box.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b103f5f96fa1ceb4ca8266fc9d94761e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/Shapes/Sphere.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d484f545025a5943b66633a7be43dce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/PerWaveCustomEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e37cdf07f23d66f47a6e1bf5a9674871 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/TimedSpawnerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e14296f814a42204ab8f70b0cca09a1b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/ListOfBoxesEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a859b47dd01773d4084d61213b9f2723 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/ListOfSpheresEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3812d746c0f4a864088f66b36356c491 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/EndPoints/SetAgentDestination.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91eaa5dedea0d7c4c86807c08fe20d56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/IStartPointPicker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25c479befa24e904a86aa5527370b066 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Management/WaveConfigurator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d5ba278073d3264092426e168c2b353 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/PerWaveRandomPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc8e57e8ce40cea469652d5acc75f9cd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/ListOfTransforms.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 564ca259cd9f4e24a83a272dc030b7a6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/Shapes/Sphere.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.StartPoints.Shapes 4 | { 5 | [System.Serializable] 6 | public struct Sphere 7 | { 8 | public Transform transform; 9 | public float radius; 10 | public float minDistanceFromCenter; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfc7ed8d67fde5b4fbae6cd2a705178d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts/DestroyWhenCollisionWithLayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ebe352731e58d24c881700dc3765a04 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/PerWaveRandomPoolEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3c7ca4669e6a034e81a7a2fc991d952 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/ListOfTransformsEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cb0dbacde17d7b4fa016f7041563942 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Formations/SquareGroupFormation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 035ecaa687f5859418d81fb850e55ef7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshAssetManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 178d8366aa1616849b91b66285c51454 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers/InOrderSpawnerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db6c2c73614ae16468f6b58111f78fce 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/BoolEventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97114a0777e17cb4f82ad8c60bb16449 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/IGameEventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55da6bd081008d94ebdc845244a8dc3b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/IntEventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a4a806ef0e3690408f083719b41df9e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/VoidEventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8113b4e2d3792943aefa5ca605700b2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/BoolEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a637ed8e7fc10a141b99f43a941a9537 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/IntEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c95f2894d7f93cc4880568010138fc1f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/VoidEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.Events 4 | { 5 | [CreateAssetMenu(fileName = "New Void Event", menuName = "Game Events/Void Event")] 6 | public class VoidEvent : BaseGameEvent 7 | { 8 | public void Raise() => Raise(new Void()); 9 | } 10 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/VoidEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4108ccbca24d66546bde80c7a9914954 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents/UnityBoolEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae3facd8c1e301743a251cd54103f396 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents/UnityIntEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d8b19f65fc72b346a39b46b12b8a395 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/UnityEvents/UnityVoidEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1dc5673854645d468b8dc95e22110de 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/InOrderSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7570b918639c884c88b9aa882cecee4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/SpawnerPickerEnum.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.Spawners.SpawnerPickers 2 | { 3 | public static class SpawnerPickerEnum 4 | { 5 | public enum SpawnerPickerType 6 | { 7 | InOrder, 8 | RandomGuaranteed, 9 | ReverseOrder 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers/RandomGuaranteedSpawnerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fca44590a3d9514bab7bd92754ee173 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers/ReverseOrderSpawnerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79dc0ac0eff56ec47b3bad15285c6f2c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/InOrderStartPointEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ca50e08da69bb04fbf471889b59c912 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/RandomStartPointEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51cff7ac64e64884e920aaaac7bdc6d7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/BaseGameEventListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9634035de6328ce4cad9436e812a032d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/BaseGameEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1939d2791f0e0d748b27ac60316357cf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/ReverseOrderSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41d001bada2230f4a8afd21d48ec0ee2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/SpawnerPickerEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 899280d9dbe87254e95fc039186105d3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/ReverseOrderStartPointEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8a0a79f22e277b4da6e797e4fbf8954 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/RandomGuaranteedSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4e55ac83bc65174db92154dd830689b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/InOrderStartPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e15211b56a534ca4498a2a48a9ad547e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/RandomStartPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 256829994bd6da54dbdfec3e759acbf2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/StartPointPickerEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12324252ede799842b471a6d4e8963b7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/RandomGuaranteedStartPointEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7665be9ed366b34192d1e899263284d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/ReverseOrderStartPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6aa37a9b66ec242408899fb87dc92a97 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/RandomGuaranteedStartPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d091cf185f56f848bd78ce4ceaf22ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshLinkEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ece1e865d1ad84587872fe8580ab5a20 3 | timeCreated: 1477036743 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshModifierEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fa04b4743e3947eba4d7b9e5832ea69 3 | timeCreated: 1477036742 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshSurfaceEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c32167dbf3314852b6006a288eb449b 3 | timeCreated: 1476968447 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshComponentsGUIUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77fba670b979046f18d52d751e0d4659 3 | timeCreated: 1480524815 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshModifierVolumeEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0f3bef2a67ae4e139538afec3e59b03 3 | timeCreated: 1477036743 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers/InOrderSpawnerEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners.SpawnerPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(InOrderSpawner))] 7 | public class InOrderSpawnerEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/StartPointPickerEnum.cs: -------------------------------------------------------------------------------- 1 | namespace SemihOrhan.WaveOne.StartPoints.StartPointPickers 2 | { 3 | public static class StartPointPickerEnum 4 | { 5 | public enum StartPointPickerType 6 | { 7 | InOrder, 8 | RandomGuaranteed, 9 | Random, 10 | ReverseOrder 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshComponents.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NavMeshComponents", 3 | "references": [], 4 | "optionalUnityReferences": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [] 12 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers/ReverseOrderSpawnerEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners.SpawnerPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(ReverseOrderSpawner))] 7 | public class ReverseOrderSpawnerEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/InOrderStartPointEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(InOrderStartPoint))] 7 | public class InOrderStartPointEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/RandomStartPointEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(RandomStartPoint))] 7 | public class RandomStartPointEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/Pickers/RandomGuaranteedSpawnerEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners.SpawnerPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(RandomGuaranteedSpawner))] 7 | public class RandomGuaranteedSpawnerEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshLink.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6eeb5dc026fdf4b488bc7ae0138ab719 3 | timeCreated: 1477924439 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {fileID: 2800000, guid: 92f4afa3e25264f5b964937ccea49ff2, type: 3} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshSurface.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a5ac11cc976e418e8d13136b07e1f52 3 | timeCreated: 1477658803 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {fileID: 2800000, guid: e4f97225bcfb64760a1c81f460837f01, type: 3} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/ReverseOrderStartPointEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(ReverseOrderStartPoint))] 7 | public class ReverseOrderStartPointEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e3fdca004f2d45fe8abbed571a8abd5 3 | timeCreated: 1477924411 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {fileID: 2800000, guid: cc7b9475dbddf4f9088d327d6e10ab77, type: 3} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshModifierVolume.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35e95dc5ff2b64380880dd7ac5922847 3 | timeCreated: 1477924430 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {fileID: 2800000, guid: cc7b9475dbddf4f9088d327d6e10ab77, type: 3} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/Pickers/RandomGuaranteedStartPointEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | [CustomEditor(typeof(RandomGuaranteedStartPoint))] 7 | public class RandomGuaranteedStartPointEditor : Editor 8 | { 9 | public override void OnInspectorGUI() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Interfaces/ISpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.Spawners 4 | { 5 | public interface ISpawner 6 | { 7 | void StartWave(); 8 | void StartWave(int wave); 9 | void SetEndPoint(GameObject prefabGameObject, GameObject instanciatedGameObject, int presetIndex); 10 | bool IsSpawnerDone(); 11 | bool IsWaveCompleted(int wave); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshComponentsEditor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NavMeshComponentsEditor", 3 | "references": [ 4 | "NavMeshComponents" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [] 16 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_AliveEnemies.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c95f2894d7f93cc4880568010138fc1f, type: 3} 13 | m_Name: Event_AliveEnemies 14 | m_EditorClassIdentifier: 15 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_TotalEnemies.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c95f2894d7f93cc4880568010138fc1f, type: 3} 13 | m_Name: Event_TotalEnemies 14 | m_EditorClassIdentifier: 15 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_DeployedEnemies.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c95f2894d7f93cc4880568010138fc1f, type: 3} 13 | m_Name: Event_DeployedEnemies 14 | m_EditorClassIdentifier: 15 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/ScriptableObjects/GameEvents/Event_SpawnerFinished.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: a637ed8e7fc10a141b99f43a941a9537, type: 3} 13 | m_Name: Event_SpawnerFinished 14 | m_EditorClassIdentifier: 15 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/RandomStartPoint.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.StartPoints.StartPointPickers 4 | { 5 | [RequireComponent(typeof(IStartPoint))] 6 | public class RandomStartPoint : MonoBehaviour, IStartPointPicker 7 | { 8 | private int size; 9 | 10 | public void SetListSize(int size) 11 | { 12 | this.size = size; 13 | } 14 | 15 | public int GetIndex() 16 | { 17 | return Random.Range(0, size); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ogs/ 2 | [Ll]ibrary/ 3 | [Tt]emp/ 4 | [Oo]bj/ 5 | [Bb]uild/ 6 | [Bb]uilds/ 7 | Assets/AssetStoreTools* 8 | 9 | # Visual Studio cache directory 10 | .vs/ 11 | 12 | # Autogenerated VS/MD/Consulo solution and project files 13 | ExportedObj/ 14 | .consulo/ 15 | *.csproj 16 | *.unityproj 17 | *.sln 18 | *.suo 19 | *.tmp 20 | *.user 21 | *.userprefs 22 | *.pidb 23 | *.booproj 24 | *.svd 25 | *.pdb 26 | *.opendb 27 | 28 | # Unity3D generated meta files 29 | *.pidb.meta 30 | *.pdb.meta 31 | 32 | # Unity3D Generated File On Crash Reports 33 | sysinfo.txt 34 | 35 | # Builds 36 | *.apk 37 | *.unitypackage 38 | -------------------------------------------------------------------------------- /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 | - EndPoint 17 | - 18 | - 19 | - 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: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/InOrderSpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.Spawners.SpawnerPickers 4 | { 5 | [RequireComponent(typeof(ISpawner))] 6 | public class InOrderSpawner : MonoBehaviour, ISpawnerPicker 7 | { 8 | private int size; 9 | private int index; 10 | 11 | public void SetListSize(int size) 12 | { 13 | this.size = size; 14 | index = 0; 15 | } 16 | 17 | public int GetIndex() 18 | { 19 | if (index == size) 20 | return -1; 21 | 22 | return index++; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/ReverseOrderSpawner.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.Spawners.SpawnerPickers 4 | { 5 | [RequireComponent(typeof(ISpawner))] 6 | public class ReverseOrderSpawner : MonoBehaviour, ISpawnerPicker 7 | { 8 | private int size; 9 | private int index; 10 | 11 | public void SetListSize(int size) 12 | { 13 | this.size = size; 14 | index = size - 1; 15 | } 16 | 17 | public int GetIndex() 18 | { 19 | if (index == -1) 20 | return -1; 21 | 22 | return index--; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/InOrderStartPoint.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.StartPoints.StartPointPickers 4 | { 5 | [RequireComponent(typeof(IStartPoint))] 6 | public class InOrderStartPoint : MonoBehaviour, IStartPointPicker 7 | { 8 | private int size; 9 | private int index; 10 | 11 | public void SetListSize(int size) 12 | { 13 | this.size = size; 14 | index = 0; 15 | } 16 | 17 | public int GetIndex() 18 | { 19 | if (index == size) 20 | index = 0; 21 | 22 | return index++; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/ReverseOrderStartPoint.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SemihOrhan.WaveOne.StartPoints.StartPointPickers 4 | { 5 | [RequireComponent(typeof(IStartPoint))] 6 | public class ReverseOrderStartPoint : MonoBehaviour, IStartPointPicker 7 | { 8 | private int size; 9 | private int index; 10 | 11 | public void SetListSize(int size) 12 | { 13 | this.size = size; 14 | index = size - 1; 15 | } 16 | 17 | public int GetIndex() 18 | { 19 | if (index == -1) 20 | index = size - 1; 21 | 22 | return index--; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts/ManagerSpawnButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace SemihOrhan.WaveOne.Demo 5 | { 6 | #pragma warning disable 0649 7 | public class ManagerSpawnButton : MonoBehaviour 8 | { 9 | [SerializeField] private Button button; 10 | 11 | private WaveManager waveManager; 12 | 13 | private void Start() 14 | { 15 | waveManager = GetComponent(); 16 | } 17 | 18 | private void Update() 19 | { 20 | if (button.interactable == false && waveManager.SpawnersFinished && transform.childCount == 0) 21 | button.interactable = true; 22 | } 23 | 24 | public void SetButtonInteractable(bool val) 25 | { 26 | if (!val && !waveManager.SpawnersFinished && waveManager.SpawnersStarted) 27 | button.interactable = false; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/ScriptableEvents/BaseGameEvent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.Events 5 | { 6 | public abstract class BaseGameEvent : ScriptableObject 7 | { 8 | private readonly List> eventListeners = new List>(); 9 | 10 | public void Raise(T item) 11 | { 12 | for (int i = eventListeners.Count - 1; i >= 0; i--) 13 | eventListeners[i].OnEventRaised(item); 14 | } 15 | 16 | public void RegisterListener(IGameEventListener listener) 17 | { 18 | if (!eventListeners.Contains(listener)) 19 | eventListeners.Add(listener); 20 | } 21 | 22 | public void UnregisterListener(IGameEventListener listener) 23 | { 24 | if (eventListeners.Contains(listener)) 25 | eventListeners.Remove(listener); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts/DestroyWhenCollisionWithLayer.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Events; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.Demo 5 | { 6 | #pragma warning disable 0649 7 | public class DestroyWhenCollisionWithLayer : MonoBehaviour 8 | { 9 | [SerializeField] private int[] layersToCollideWith; 10 | [SerializeField] private IntEvent eventAliveEnemies; 11 | 12 | private void OnTriggerEnter(Collider other) 13 | { 14 | bool noCollision = true; 15 | 16 | for (int i = 0; i < layersToCollideWith.Length; i++) 17 | { 18 | if (other.gameObject.layer == layersToCollideWith[i]) 19 | noCollision = false; 20 | } 21 | 22 | if (noCollision) 23 | return; 24 | 25 | Destroy(gameObject); 26 | } 27 | 28 | private void OnDisable() 29 | { 30 | if (eventAliveEnemies != null) 31 | eventAliveEnemies.Raise(-1); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Semih Orhan 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 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Scripts/DisplayStats.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | namespace SemihOrhan.WaveOne.Demo 5 | { 6 | #pragma warning disable 0649 7 | public class DisplayStats : MonoBehaviour 8 | { 9 | [SerializeField] private Text totalEnemiesText; 10 | [SerializeField] private Text deployedEnemiesText; 11 | [SerializeField] private Text AliveEnemiesText; 12 | 13 | private int totalEnemiesAmount; 14 | private int deployedEnemiesAmount; 15 | private int aliveEnemiesAmount; 16 | 17 | public void SetTotalEnemies(int amount) 18 | { 19 | totalEnemiesAmount += amount; 20 | totalEnemiesText.text = "Total Enemies: " + totalEnemiesAmount; 21 | } 22 | 23 | public void SetDeployedEnemies(int amount) 24 | { 25 | deployedEnemiesAmount += amount; 26 | deployedEnemiesText.text = "Deployed Enemies: " + deployedEnemiesAmount; 27 | } 28 | 29 | public void SetAliveEnemies(int amount) 30 | { 31 | aliveEnemiesAmount += amount; 32 | AliveEnemiesText.text = "Alive Enemies: " + aliveEnemiesAmount; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/GameEvents/Listeners/BaseGameEventListener.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | namespace SemihOrhan.WaveOne.Events 5 | { 6 | #pragma warning disable 0649 7 | public abstract class BaseGameEventListener : MonoBehaviour, 8 | IGameEventListener where E : BaseGameEvent where UER : UnityEvent 9 | { 10 | [SerializeField] private E gameEvent; 11 | [SerializeField] private UER unityEventResponse; 12 | 13 | private void OnEnable() 14 | { 15 | if (!GameEvent) 16 | return; 17 | 18 | GameEvent.RegisterListener(this); 19 | } 20 | 21 | private void OnDisable() 22 | { 23 | if (!GameEvent) 24 | return; 25 | 26 | GameEvent.UnregisterListener(this); 27 | } 28 | 29 | public void OnEventRaised(T item) 30 | { 31 | if (unityEventResponse != null) 32 | unityEventResponse.Invoke(item); 33 | } 34 | 35 | public E GameEvent 36 | { 37 | get { return gameEvent; } 38 | set { gameEvent = value; } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 1 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Spawners/SpawnerPickers/RandomGuaranteedSpawner.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.Spawners.SpawnerPickers 5 | { 6 | [RequireComponent(typeof(ISpawner))] 7 | public class RandomGuaranteedSpawner : MonoBehaviour, ISpawnerPicker 8 | { 9 | private int size; 10 | private List wasChosen; 11 | private int index; 12 | 13 | public void SetListSize(int size) 14 | { 15 | this.size = size; 16 | wasChosen = new List(); 17 | index = 0; 18 | 19 | for (int i = 0; i < size; i++) 20 | wasChosen.Add(false); 21 | } 22 | 23 | public int GetIndex() 24 | { 25 | // Find an enemy that hasn't been chosen before. 26 | do 27 | { 28 | // If all enemies have been chosen already exit out of the loop. 29 | if (!wasChosen.Contains(false)) 30 | return -1; 31 | 32 | index = Random.Range(0, size); 33 | } while (wasChosen.Contains(false) && wasChosen[index]); 34 | 35 | wasChosen[index] = true; 36 | 37 | return index; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/StartPointPickers/RandomGuaranteedStartPoint.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.StartPoints.StartPointPickers 5 | { 6 | [RequireComponent(typeof(IStartPoint))] 7 | public class RandomGuaranteedStartPoint : MonoBehaviour, IStartPointPicker 8 | { 9 | private int size; 10 | private List wasChosen; 11 | private int index; 12 | 13 | public void SetListSize(int size) 14 | { 15 | this.size = size; 16 | wasChosen = new List(); 17 | index = 0; 18 | 19 | for (int i = 0; i < size; i++) 20 | wasChosen.Add(false); 21 | } 22 | 23 | public int GetIndex() 24 | { 25 | // Find an point that hasn't been chosen before. 26 | do 27 | { 28 | // If all points have been chosen already exit out of the loop. 29 | if (!wasChosen.Contains(false)) 30 | return -1; 31 | 32 | index = Random.Range(0, size); 33 | } while (wasChosen.Contains(false) && wasChosen[index]); 34 | 35 | wasChosen[index] = true; 36 | 37 | return index; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /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: 13 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: c9ffffffc8feffffc8feffffffffffffc8feffffc8feffffffffffffffffffffc9feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_DefaultMaxAngularSpeed: 7 36 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/ListOfTransforms.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace SemihOrhan.WaveOne.StartPoints 6 | { 7 | #pragma warning disable 0649 8 | public class ListOfTransforms : MonoBehaviour, IStartPoint 9 | { 10 | [SerializeField] private List startPoints = new List(); 11 | [SerializeField] private bool drawGizmos = true; 12 | 13 | private IStartPointPicker startPointPicker; 14 | private Vector3 v; 15 | 16 | public List StartPoints { get => startPoints; set => startPoints = value; } 17 | 18 | private void Start() 19 | { 20 | startPointPicker = GetComponent(); 21 | startPointPicker.SetListSize(startPoints.Count); 22 | } 23 | 24 | public Vector3 GetPoint() 25 | { 26 | return v = startPoints[startPointPicker.GetIndex()].position; 27 | } 28 | 29 | #region Gizmos 30 | private void OnDrawGizmos() 31 | { 32 | if (!drawGizmos) 33 | return; 34 | 35 | Gizmos.color = Color.white; 36 | for (int i = 0; i < startPoints.Count; i++) 37 | { 38 | if (startPoints[i]) 39 | Gizmos.DrawWireSphere(startPoints[i].position, 0.2f); 40 | } 41 | 42 | Gizmos.color = Color.red; 43 | Gizmos.DrawSphere(v, .1f); 44 | } 45 | #endregion 46 | } 47 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/ListOfTransformsEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace SemihOrhan.WaveOne.CustomEditors 6 | { 7 | #if UNITY_2019_3_OR_NEWER 8 | #else 9 | [CustomEditor(typeof(ListOfTransforms))] 10 | public class ListOfTransformsEditor : Editor 11 | { 12 | public override void OnInspectorGUI() 13 | { 14 | SerializedObject so = new SerializedObject(target); 15 | so.Update(); 16 | 17 | SerializedProperty startPoints = so.FindProperty("startPoints"); 18 | SerializedProperty drawGizmos = so.FindProperty("drawGizmos"); 19 | 20 | EditorGUILayout.PropertyField(startPoints); 21 | EditorGUI.indentLevel++; 22 | if (startPoints.isExpanded) 23 | { 24 | EditorButtons.ShowAddButton(startPoints); 25 | 26 | for (int i = 0; i < startPoints.arraySize; i++) 27 | { 28 | EditorGUILayout.BeginHorizontal(); 29 | EditorGUILayout.PropertyField(startPoints.GetArrayElementAtIndex(i), new GUIContent("Start point " + (i + 1))); 30 | if (EditorButtons.ShowElementButtons(startPoints, i)) 31 | continue; 32 | EditorGUILayout.EndHorizontal(); 33 | } 34 | } 35 | EditorGUI.indentLevel--; 36 | 37 | EditorGUILayout.PropertyField(drawGizmos); 38 | 39 | so.ApplyModifiedProperties(); 40 | } 41 | } 42 | #endif 43 | } -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshModifierEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.AI; 2 | 3 | namespace UnityEditor.AI 4 | { 5 | [CanEditMultipleObjects] 6 | [CustomEditor(typeof(NavMeshModifier))] 7 | class NavMeshModifierEditor : Editor 8 | { 9 | SerializedProperty m_AffectedAgents; 10 | SerializedProperty m_Area; 11 | SerializedProperty m_IgnoreFromBuild; 12 | SerializedProperty m_OverrideArea; 13 | 14 | void OnEnable() 15 | { 16 | m_AffectedAgents = serializedObject.FindProperty("m_AffectedAgents"); 17 | m_Area = serializedObject.FindProperty("m_Area"); 18 | m_IgnoreFromBuild = serializedObject.FindProperty("m_IgnoreFromBuild"); 19 | m_OverrideArea = serializedObject.FindProperty("m_OverrideArea"); 20 | 21 | NavMeshVisualizationSettings.showNavigation++; 22 | } 23 | 24 | void OnDisable() 25 | { 26 | NavMeshVisualizationSettings.showNavigation--; 27 | } 28 | 29 | public override void OnInspectorGUI() 30 | { 31 | serializedObject.Update(); 32 | 33 | EditorGUILayout.PropertyField(m_IgnoreFromBuild); 34 | 35 | EditorGUILayout.PropertyField(m_OverrideArea); 36 | if (m_OverrideArea.boolValue) 37 | { 38 | EditorGUI.indentLevel++; 39 | NavMeshComponentsGUIUtility.AreaPopup("Area Type", m_Area); 40 | EditorGUI.indentLevel--; 41 | } 42 | 43 | NavMeshComponentsGUIUtility.AgentMaskPopup("Affected Agents", m_AffectedAgents); 44 | EditorGUILayout.Space(); 45 | 46 | serializedObject.ApplyModifiedProperties(); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/EditorButtons.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | #if UNITY_2019_3_OR_NEWER 7 | #else 8 | public static class EditorButtons 9 | { 10 | private static GUIContent moveUpButtonContent = new GUIContent("\u2191", "move element up"); 11 | private static GUIContent moveDownButtonContent = new GUIContent("\u2193", "move element down"); 12 | private static GUIContent duplicateButtonContent = new GUIContent("+", "duplicate element"); 13 | private static GUIContent removeButtonContent = new GUIContent("-", "remove element"); 14 | private static GUIContent addButtonContent = new GUIContent("+", "add element"); 15 | private static GUILayoutOption miniButtonWidth = GUILayout.Width(20f); 16 | 17 | public static void ShowAddButton(SerializedProperty list) 18 | { 19 | if (list.arraySize == 0 && GUILayout.Button(addButtonContent, EditorStyles.miniButton)) 20 | list.arraySize++; 21 | } 22 | 23 | public static bool ShowElementButtons(SerializedProperty list, int index) 24 | { 25 | if (GUILayout.Button(duplicateButtonContent, EditorStyles.miniButtonLeft, miniButtonWidth)) 26 | list.InsertArrayElementAtIndex(index); 27 | if (GUILayout.Button(removeButtonContent, EditorStyles.miniButtonMid, miniButtonWidth)) 28 | { list.DeleteArrayElementAtIndex(index); return true; } 29 | if (GUILayout.Button(moveUpButtonContent, EditorStyles.miniButtonMid, miniButtonWidth) && index != 0) 30 | list.MoveArrayElement(index, --index); 31 | if (GUILayout.Button(moveDownButtonContent, EditorStyles.miniButtonRight, miniButtonWidth) && index != list.arraySize - 1) 32 | list.MoveArrayElement(index, ++index); 33 | 34 | return false; 35 | } 36 | } 37 | #endif 38 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/WaveManagerEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | 7 | [CustomEditor(typeof(WaveManager))] 8 | public class WaveManagerEditor : Editor 9 | { 10 | public override void OnInspectorGUI() 11 | { 12 | SerializedObject so = new SerializedObject(target); 13 | so.Update(); 14 | 15 | SerializedProperty autoFindConfigs = so.FindProperty("autoFindConfigs"); 16 | SerializedProperty showListControls = so.FindProperty("showListControls"); 17 | SerializedProperty waveConfigurators = so.FindProperty("waveConfigurators"); 18 | 19 | EditorGUILayout.PropertyField(autoFindConfigs); 20 | 21 | if (!autoFindConfigs.boolValue) 22 | { 23 | #if UNITY_2019_3_OR_NEWER 24 | EditorGUILayout.PropertyField(waveConfigurators); 25 | #else 26 | EditorGUILayout.PropertyField(showListControls); 27 | 28 | EditorGUILayout.PropertyField(waveConfigurators); 29 | EditorGUI.indentLevel++; 30 | if (waveConfigurators.isExpanded) 31 | { 32 | EditorButtons.ShowAddButton(waveConfigurators); 33 | 34 | for (int i = 0; i < waveConfigurators.arraySize; i++) 35 | { 36 | EditorGUILayout.BeginHorizontal(); 37 | EditorGUILayout.PropertyField(waveConfigurators.GetArrayElementAtIndex(i), new GUIContent("Wave config " + (i + 1))); 38 | if (showListControls.boolValue && EditorButtons.ShowElementButtons(waveConfigurators, i)) 39 | continue; 40 | EditorGUILayout.EndHorizontal(); 41 | } 42 | } 43 | EditorGUI.indentLevel--; 44 | #endif 45 | } 46 | 47 | so.ApplyModifiedProperties(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshModifier.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | [ExecuteInEditMode] 6 | [AddComponentMenu("Navigation/NavMeshModifier", 32)] 7 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 8 | public class NavMeshModifier : MonoBehaviour 9 | { 10 | [SerializeField] 11 | bool m_OverrideArea; 12 | public bool overrideArea { get { return m_OverrideArea; } set { m_OverrideArea = value; } } 13 | 14 | [SerializeField] 15 | int m_Area; 16 | public int area { get { return m_Area; } set { m_Area = value; } } 17 | 18 | [SerializeField] 19 | bool m_IgnoreFromBuild; 20 | public bool ignoreFromBuild { get { return m_IgnoreFromBuild; } set { m_IgnoreFromBuild = value; } } 21 | 22 | // List of agent types the modifier is applied for. 23 | // Special values: empty == None, m_AffectedAgents[0] =-1 == All. 24 | [SerializeField] 25 | List m_AffectedAgents = new List(new int[] { -1 }); // Default value is All 26 | 27 | static readonly List s_NavMeshModifiers = new List(); 28 | 29 | public static List activeModifiers 30 | { 31 | get { return s_NavMeshModifiers; } 32 | } 33 | 34 | void OnEnable() 35 | { 36 | if (!s_NavMeshModifiers.Contains(this)) 37 | s_NavMeshModifiers.Add(this); 38 | } 39 | 40 | void OnDisable() 41 | { 42 | s_NavMeshModifiers.Remove(this); 43 | } 44 | 45 | public bool AffectsAgentType(int agentTypeID) 46 | { 47 | if (m_AffectedAgents.Count == 0) 48 | return false; 49 | if (m_AffectedAgents[0] == -1) 50 | return true; 51 | return m_AffectedAgents.IndexOf(agentTypeID) != -1; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.ads": "3.4.5", 6 | "com.unity.analytics": "3.3.5", 7 | "com.unity.collab-proxy": "1.2.16", 8 | "com.unity.ide.rider": "1.1.4", 9 | "com.unity.ide.vscode": "1.2.0", 10 | "com.unity.purchasing": "2.0.6", 11 | "com.unity.test-framework": "1.1.14", 12 | "com.unity.textmeshpro": "2.0.1", 13 | "com.unity.timeline": "1.2.6", 14 | "com.unity.ugui": "1.0.0", 15 | "com.unity.modules.ai": "1.0.0", 16 | "com.unity.modules.androidjni": "1.0.0", 17 | "com.unity.modules.animation": "1.0.0", 18 | "com.unity.modules.assetbundle": "1.0.0", 19 | "com.unity.modules.audio": "1.0.0", 20 | "com.unity.modules.cloth": "1.0.0", 21 | "com.unity.modules.director": "1.0.0", 22 | "com.unity.modules.imageconversion": "1.0.0", 23 | "com.unity.modules.imgui": "1.0.0", 24 | "com.unity.modules.jsonserialize": "1.0.0", 25 | "com.unity.modules.particlesystem": "1.0.0", 26 | "com.unity.modules.physics": "1.0.0", 27 | "com.unity.modules.physics2d": "1.0.0", 28 | "com.unity.modules.screencapture": "1.0.0", 29 | "com.unity.modules.terrain": "1.0.0", 30 | "com.unity.modules.terrainphysics": "1.0.0", 31 | "com.unity.modules.tilemap": "1.0.0", 32 | "com.unity.modules.ui": "1.0.0", 33 | "com.unity.modules.uielements": "1.0.0", 34 | "com.unity.modules.umbra": "1.0.0", 35 | "com.unity.modules.unityanalytics": "1.0.0", 36 | "com.unity.modules.unitywebrequest": "1.0.0", 37 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 38 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 39 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 40 | "com.unity.modules.unitywebrequestwww": "1.0.0", 41 | "com.unity.modules.vehicles": "1.0.0", 42 | "com.unity.modules.video": "1.0.0", 43 | "com.unity.modules.vr": "1.0.0", 44 | "com.unity.modules.wind": "1.0.0", 45 | "com.unity.modules.xr": "1.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshModifierVolume.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | [ExecuteInEditMode] 6 | [AddComponentMenu("Navigation/NavMeshModifierVolume", 31)] 7 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 8 | public class NavMeshModifierVolume : MonoBehaviour 9 | { 10 | [SerializeField] 11 | Vector3 m_Size = new Vector3(4.0f, 3.0f, 4.0f); 12 | public Vector3 size { get { return m_Size; } set { m_Size = value; } } 13 | 14 | [SerializeField] 15 | Vector3 m_Center = new Vector3(0, 1.0f, 0); 16 | public Vector3 center { get { return m_Center; } set { m_Center = value; } } 17 | 18 | [SerializeField] 19 | int m_Area; 20 | public int area { get { return m_Area; } set { m_Area = value; } } 21 | 22 | // List of agent types the modifier is applied for. 23 | // Special values: empty == None, m_AffectedAgents[0] =-1 == All. 24 | [SerializeField] 25 | List m_AffectedAgents = new List(new int[] { -1 }); // Default value is All 26 | 27 | static readonly List s_NavMeshModifiers = new List(); 28 | 29 | public static List activeModifiers 30 | { 31 | get { return s_NavMeshModifiers; } 32 | } 33 | 34 | void OnEnable() 35 | { 36 | if (!s_NavMeshModifiers.Contains(this)) 37 | s_NavMeshModifiers.Add(this); 38 | } 39 | 40 | void OnDisable() 41 | { 42 | s_NavMeshModifiers.Remove(this); 43 | } 44 | 45 | public bool AffectsAgentType(int agentTypeID) 46 | { 47 | if (m_AffectedAgents.Count == 0) 48 | return false; 49 | if (m_AffectedAgents[0] == -1) 50 | return true; 51 | return m_AffectedAgents.IndexOf(agentTypeID) != -1; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Formations/SquareGroupFormation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.Formations 5 | { 6 | public class SquareGroupFormation : MonoBehaviour, IFormation 7 | { 8 | /// 9 | /// Makes a square formation around the vector (0, 0, 0), favoring width over depth. 10 | /// 11 | /// The GameObject that is being spawned. 12 | /// The size of the group. 13 | /// Returns an array of positions that is made from the parameters given. 14 | public List MakeFormation(GameObject obj, int groupSize) 15 | { 16 | List positions = new List(); 17 | 18 | int width = Mathf.CeilToInt(Mathf.Sqrt(groupSize)); 19 | int depth = Mathf.CeilToInt((float)groupSize / (float)width); 20 | 21 | Collider col = obj.GetComponent(); 22 | 23 | float spreadWidth = col.bounds.size.x * 1.15f; 24 | float spreadDepth = col.bounds.size.z * 1.15f; 25 | 26 | // Simple calculation take width = 2 & spreadWidth = 1: 27 | // 2 - 1 = 1 28 | // 1 / -2f = -0.5 29 | // -0.5 * 1 = -0.5 30 | // each x or z the spread will be added so the middle of the square is always (0, 0, 0). 31 | float bottomLeftX = ((width - 1) / -2f) * spreadWidth; 32 | float bottomLeftZ = ((depth - 1) / -2f) * spreadDepth; 33 | 34 | // Loop through the depth and rows and make the positions 35 | for (float z = 0; z < depth; z++) 36 | { 37 | for (float x = 0; x < width; x++) 38 | { 39 | // Add the (x * spread) and (z * spread) to their start positions 40 | positions.Add(new Vector3(bottomLeftX + (x * spreadWidth), 0, bottomLeftZ + (z * spreadDepth))); 41 | } 42 | } 43 | 44 | return positions; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /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: 1 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/Wave One/Assets/Scripts/EndPoints/SetAgentDestination.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.AI; 4 | 5 | #pragma warning disable 0649 6 | namespace SemihOrhan.WaveOne.EndPoints 7 | { 8 | public class SetAgentDestination : MonoBehaviour 9 | { 10 | private NavMeshAgent agent; 11 | private List localEndPoints = new List(); 12 | private bool endPointsCopied = false; 13 | 14 | private void Awake() 15 | { 16 | agent = GetComponent(); 17 | } 18 | 19 | public void CalculateValidPath(List endPoints, int presetIndex = -1) 20 | { 21 | if (!endPointsCopied) 22 | { 23 | localEndPoints = endPoints; 24 | endPointsCopied = true; 25 | } 26 | 27 | // If we have a preset index we want to use that otherwise get a random point 28 | int index = presetIndex == -1 ? Random.Range(0, localEndPoints.Count) : presetIndex; 29 | 30 | // Make a new path and calculate that path. 31 | NavMeshPath path = new NavMeshPath(); 32 | agent.CalculatePath(localEndPoints[index].position, path); 33 | 34 | // If the path is partial or invalid destroy this agent. 35 | // Otherwise set the destination. 36 | if (path.status == NavMeshPathStatus.PathPartial || path.status == NavMeshPathStatus.PathInvalid) 37 | { 38 | // Try again but remove the current end point from the list because the path is not valid for that one. 39 | if (localEndPoints.Count > 1) 40 | { 41 | localEndPoints.RemoveAt(index); 42 | CalculateValidPath(localEndPoints); 43 | } 44 | else 45 | { 46 | // We have tried every end point and couldn't get a path so we destroy this object. 47 | Destroy(gameObject); 48 | } 49 | } 50 | else 51 | { 52 | transform.rotation = Quaternion.LookRotation(localEndPoints[index].position); 53 | agent.SetDestination(localEndPoints[index].position); 54 | } 55 | } 56 | } 57 | 58 | } -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_AgentCube.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Mat_AgentCube 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0, b: 0.49803922, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_AgentSphere.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Mat_AgentSphere 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.49803922, g: 0, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_AgentCylinder.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Mat_AgentCylinder 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0.49803922, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/Materials/Mat_GroundPlane.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Mat_GroundPlane 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.6037736, g: 0.6009256, b: 0.6009256, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/ListOfSpheresEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace SemihOrhan.WaveOne.CustomEditors 6 | { 7 | #if UNITY_2019_3_OR_NEWER 8 | #else 9 | [CustomEditor(typeof(ListOfSpheres))] 10 | public class ListOfSpheresEditor : Editor 11 | { 12 | public override void OnInspectorGUI() 13 | { 14 | SerializedObject so = new SerializedObject(target); 15 | so.Update(); 16 | 17 | SerializedProperty startPoints = so.FindProperty("startPoints"); 18 | SerializedProperty drawGizmos = so.FindProperty("drawGizmos"); 19 | 20 | EditorGUILayout.PropertyField(startPoints); 21 | EditorGUI.indentLevel++; 22 | if (startPoints.isExpanded) 23 | { 24 | EditorButtons.ShowAddButton(startPoints); 25 | 26 | for (int i = 0; i < startPoints.arraySize; i++) 27 | { 28 | EditorGUILayout.BeginHorizontal(); 29 | EditorGUILayout.PropertyField(startPoints.GetArrayElementAtIndex(i), new GUIContent("Start point " + (i + 1))); 30 | if (EditorButtons.ShowElementButtons(startPoints, i)) 31 | continue; 32 | EditorGUILayout.EndHorizontal(); 33 | 34 | SerializedProperty transform = startPoints.GetArrayElementAtIndex(i).FindPropertyRelative("transform"); 35 | SerializedProperty radius = startPoints.GetArrayElementAtIndex(i).FindPropertyRelative("radius"); 36 | SerializedProperty minDistanceFromCenter = startPoints.GetArrayElementAtIndex(i).FindPropertyRelative("minDistanceFromCenter"); 37 | 38 | EditorGUI.indentLevel++; 39 | if (startPoints.GetArrayElementAtIndex(i).isExpanded) 40 | { 41 | EditorGUILayout.PropertyField(transform); 42 | EditorGUILayout.PropertyField(radius); 43 | EditorGUILayout.PropertyField(minDistanceFromCenter); 44 | } 45 | EditorGUI.indentLevel--; 46 | } 47 | } 48 | EditorGUI.indentLevel--; 49 | 50 | EditorGUILayout.PropertyField(drawGizmos); 51 | 52 | so.ApplyModifiedProperties(); 53 | } 54 | } 55 | #endif 56 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/Management/WaveManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne 5 | { 6 | public class WaveManager : MonoBehaviour 7 | { 8 | [SerializeField] private bool autoFindConfigs = true; 9 | #if UNITY_2019_3_OR_NEWER 10 | #else 11 | #pragma warning disable 0414 12 | [SerializeField] private bool showListControls = true; 13 | #pragma warning restore 0414 14 | #endif 15 | [SerializeField] private List waveConfigurators = new List(); 16 | 17 | public List WaveConfigurators { get => waveConfigurators; set => waveConfigurators = value; } 18 | 19 | public bool SpawnersStarted { get; private set; } 20 | public int AmountSpawnersFinished { get; private set; } 21 | public bool SpawnersFinished { get; private set; } 22 | 23 | private void Start() 24 | { 25 | if (autoFindConfigs) 26 | { 27 | WaveConfigurator[] arr = FindObjectsOfType(); 28 | for (int i = 0; i < arr.Length; i++) 29 | { 30 | waveConfigurators.Add(arr[i]); 31 | } 32 | } 33 | } 34 | 35 | public void StartAllConfigWaves(int wave = -1) 36 | { 37 | SpawnersStarted = true; 38 | AmountSpawnersFinished = 0; 39 | SpawnersFinished = false; 40 | 41 | for (int i = 0; i < waveConfigurators.Count; i++) 42 | { 43 | if (wave != -1) 44 | { 45 | waveConfigurators[i].SpawnerScript.StartWave(wave); 46 | continue; 47 | } 48 | waveConfigurators[i].SpawnerScript.StartWave(); 49 | } 50 | } 51 | 52 | public void SpawnerFinished(bool val) 53 | { 54 | if (val && SpawnersStarted) 55 | { 56 | AmountSpawnersFinished = 0; 57 | for (int i = 0; i < waveConfigurators.Count; i++) 58 | { 59 | if (waveConfigurators[i].SpawnerScript.IsSpawnerDone()) 60 | AmountSpawnersFinished++; 61 | } 62 | 63 | if (AmountSpawnersFinished == WaveConfigurators.Count) 64 | SpawnersFinished = true; 65 | } 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/StartPoints/ListOfBoxesEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace SemihOrhan.WaveOne.CustomEditors 6 | { 7 | #if UNITY_2019_3_OR_NEWER 8 | #else 9 | [CustomEditor(typeof(ListOfBoxes))] 10 | public class ListOfBoxesEditor : Editor 11 | { 12 | public override void OnInspectorGUI() 13 | { 14 | SerializedObject so = new SerializedObject(target); 15 | so.Update(); 16 | 17 | SerializedProperty startPoints = so.FindProperty("startPoints"); 18 | SerializedProperty setOneAxisToMinimumtPoints = so.FindProperty("setOneAxisToMinimum"); 19 | SerializedProperty drawGizmos = so.FindProperty("drawGizmos"); 20 | 21 | EditorGUILayout.PropertyField(startPoints); 22 | EditorGUI.indentLevel++; 23 | if (startPoints.isExpanded) 24 | { 25 | EditorButtons.ShowAddButton(startPoints); 26 | 27 | for (int i = 0; i < startPoints.arraySize; i++) 28 | { 29 | EditorGUILayout.BeginHorizontal(); 30 | EditorGUILayout.PropertyField(startPoints.GetArrayElementAtIndex(i), new GUIContent("Start point " + (i + 1))); 31 | if (EditorButtons.ShowElementButtons(startPoints, i)) 32 | continue; 33 | EditorGUILayout.EndHorizontal(); 34 | 35 | SerializedProperty transform = startPoints.GetArrayElementAtIndex(i).FindPropertyRelative("transform"); 36 | SerializedProperty size = startPoints.GetArrayElementAtIndex(i).FindPropertyRelative("size"); 37 | SerializedProperty minDistanceFromCenter = startPoints.GetArrayElementAtIndex(i).FindPropertyRelative("minDistanceFromCenter"); 38 | 39 | EditorGUI.indentLevel++; 40 | if (startPoints.GetArrayElementAtIndex(i).isExpanded) 41 | { 42 | EditorGUILayout.PropertyField(transform); 43 | EditorGUILayout.PropertyField(size); 44 | EditorGUILayout.PropertyField(minDistanceFromCenter); 45 | } 46 | EditorGUI.indentLevel--; 47 | } 48 | } 49 | EditorGUI.indentLevel--; 50 | 51 | EditorGUILayout.PropertyField(setOneAxisToMinimumtPoints); 52 | EditorGUILayout.PropertyField(drawGizmos); 53 | 54 | so.ApplyModifiedProperties(); 55 | } 56 | } 57 | #endif 58 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/WaveConfiguratorEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace SemihOrhan.WaveOne.CustomEditors 6 | { 7 | [CustomEditor(typeof(WaveConfigurator))] 8 | public class WaveConfiguratorEditor : Editor 9 | { 10 | public override void OnInspectorGUI() 11 | { 12 | WaveConfigurator waveConfig = target as WaveConfigurator; 13 | SerializedObject so = new SerializedObject(target); 14 | so.Update(); 15 | 16 | SerializedProperty startPointType = so.FindProperty("startPointType"); 17 | SerializedProperty startPointPickerType = so.FindProperty("startPointPickerType"); 18 | SerializedProperty spawnerType = so.FindProperty("spawnerType"); 19 | SerializedProperty spawnerPickerType = so.FindProperty("spawnerPickerType"); 20 | SerializedProperty needSpawnerPicker = so.FindProperty("needSpawnerPicker"); 21 | SerializedProperty endPointsType = so.FindProperty("endPointsType"); 22 | SerializedProperty formationType = so.FindProperty("formationType"); 23 | 24 | EditorGUILayout.PropertyField(startPointType, true); 25 | EditorGUILayout.PropertyField(startPointPickerType, true); 26 | 27 | EditorGUILayout.PropertyField(spawnerType, true); 28 | needSpawnerPicker.boolValue = false; 29 | // We only want to show the spawnerPickerType when we have one of these spawners selected. 30 | if (spawnerType.enumValueIndex == (int)SpawnerEnum.SpawnerType.PerWaveCustom) 31 | { 32 | needSpawnerPicker.boolValue = true; 33 | EditorGUILayout.PropertyField(spawnerPickerType, true); 34 | } 35 | 36 | EditorGUILayout.PropertyField(endPointsType, true); 37 | EditorGUILayout.PropertyField(formationType, true); 38 | 39 | // If we do this after the buttons shit hits the fan. 40 | so.ApplyModifiedProperties(); 41 | 42 | Color oldColor = GUI.backgroundColor; 43 | if (GUILayout.Button("Add components (and destroy old)")) 44 | { 45 | waveConfig.AddStartPointComponents(); 46 | waveConfig.AddSpawnerComponents(); 47 | waveConfig.AddEndPointComponents(); 48 | waveConfig.AddFormationComponents(); 49 | } 50 | 51 | GUI.backgroundColor = Color.red; 52 | if (GUILayout.Button("Remove all components")) 53 | { 54 | if (EditorUtility.DisplayDialog("Delete components", 55 | "You are about to delete all components other than this (WaveConfigurator), are you sure?", 56 | "Delete", 57 | "Cancel")) 58 | { 59 | waveConfig.RemoveAllComponents(); 60 | } 61 | } 62 | GUI.backgroundColor = oldColor; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/TimedSpawnerEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | #if UNITY_2019_3_OR_NEWER 7 | #else 8 | [CustomEditor(typeof(TimedSpawner))] 9 | public class TimedSpawnerEditor : Editor 10 | { 11 | public override void OnInspectorGUI() 12 | { 13 | SerializedObject so = new SerializedObject(target); 14 | so.Update(); 15 | 16 | SerializedProperty showEnemiesListControls = so.FindProperty("showEnemiesListControls"); 17 | SerializedProperty enemyList = so.FindProperty("enemyList"); 18 | SerializedProperty maxTime = so.FindProperty("maxTime"); 19 | SerializedProperty spawnRate = so.FindProperty("spawnRate"); 20 | SerializedProperty enemyParentObject = so.FindProperty("enemyParentObject"); 21 | SerializedProperty eventSpawnerFinished = so.FindProperty("eventSpawnerFinished"); 22 | SerializedProperty eventDeployedEnemies = so.FindProperty("eventDeployedEnemies"); 23 | SerializedProperty eventAliveEnemies = so.FindProperty("eventAliveEnemies"); 24 | 25 | EditorGUILayout.PropertyField(showEnemiesListControls, true); 26 | 27 | // List 28 | EditorGUILayout.PropertyField(enemyList); 29 | EditorGUI.indentLevel++; 30 | if (enemyList.isExpanded) 31 | { 32 | EditorButtons.ShowAddButton(enemyList); 33 | 34 | for (int i = 0; i < enemyList.arraySize; i++) 35 | { 36 | // List list element 37 | EditorGUILayout.BeginHorizontal(); 38 | EditorGUILayout.PropertyField(enemyList.GetArrayElementAtIndex(i)); 39 | if (showEnemiesListControls.boolValue && EditorButtons.ShowElementButtons(enemyList, i)) 40 | continue; 41 | EditorGUILayout.EndHorizontal(); 42 | 43 | SerializedProperty enemies = enemyList.GetArrayElementAtIndex(i).FindPropertyRelative("gameObject"); 44 | SerializedProperty groupSize = enemyList.GetArrayElementAtIndex(i).FindPropertyRelative("groupSize"); 45 | SerializedProperty weight = enemyList.GetArrayElementAtIndex(i).FindPropertyRelative("weight"); 46 | 47 | // EnemyWithWeight elements 48 | EditorGUI.indentLevel++; 49 | if (enemyList.GetArrayElementAtIndex(i).isExpanded) 50 | { 51 | EditorGUILayout.PropertyField(enemies); 52 | EditorGUILayout.PropertyField(groupSize); 53 | EditorGUILayout.PropertyField(weight); 54 | } 55 | EditorGUI.indentLevel--; 56 | } 57 | } 58 | EditorGUI.indentLevel--; 59 | 60 | EditorGUILayout.Space(); 61 | EditorGUILayout.PropertyField(maxTime); 62 | EditorGUILayout.PropertyField(spawnRate); 63 | EditorGUILayout.PropertyField(enemyParentObject); 64 | EditorGUILayout.PropertyField(eventSpawnerFinished); 65 | EditorGUILayout.PropertyField(eventDeployedEnemies); 66 | EditorGUILayout.PropertyField(eventAliveEnemies); 67 | 68 | so.ApplyModifiedProperties(); 69 | } 70 | } 71 | #endif 72 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/ListOfSpheres.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.Shapes; 2 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace SemihOrhan.WaveOne.StartPoints 7 | { 8 | #pragma warning disable 0649 9 | public class ListOfSpheres : MonoBehaviour, IStartPoint 10 | { 11 | [SerializeField] private List startPoints = new List(); 12 | [SerializeField] private bool drawGizmos = true; 13 | 14 | private IStartPointPicker startPointPicker; 15 | private Vector3 v; 16 | 17 | public List StartPoints { get => startPoints; set => startPoints = value; } 18 | 19 | private void Start() 20 | { 21 | startPointPicker = GetComponent(); 22 | startPointPicker.SetListSize(startPoints.Count); 23 | } 24 | 25 | public Vector3 GetPoint() 26 | { 27 | return GetRandomPointInSphere(startPoints[startPointPicker.GetIndex()]); 28 | } 29 | 30 | private Vector3 GetRandomPointInSphere(Sphere sphere) 31 | { 32 | float x = Random.Range(0, 1f) * GetOneOrNegativeOne(); 33 | float y = Random.Range(0, 1f) * GetOneOrNegativeOne(); 34 | float z = Random.Range(0, 1f) * GetOneOrNegativeOne(); 35 | Vector3 dirVector = new Vector3(x, y, z); 36 | 37 | Vector3 randomPoint = dirVector.normalized * Random.Range(sphere.minDistanceFromCenter, sphere.radius); 38 | Vector3 relativePoint = v = sphere.transform.position + randomPoint; 39 | 40 | return relativePoint; 41 | } 42 | 43 | #region Helper functions 44 | /// 45 | /// Get a 1 or -1. 46 | /// 47 | /// 1 or -1. 48 | private int GetOneOrNegativeOne() 49 | { 50 | if (Random.Range(0f, 1f) < .5f) 51 | return -1; 52 | 53 | return 1; 54 | } 55 | #endregion 56 | 57 | #region Validation & Gizmos 58 | private void OnDrawGizmos() 59 | { 60 | if (!drawGizmos) 61 | return; 62 | 63 | for (int i = 0; i < startPoints.Count; i++) 64 | { 65 | if (startPoints[i].transform) 66 | Gizmos.DrawWireSphere(startPoints[i].transform.position, startPoints[i].radius); 67 | } 68 | 69 | Gizmos.color = Color.black; 70 | for (int i = 0; i < startPoints.Count; i++) 71 | { 72 | if (startPoints[i].transform) 73 | Gizmos.DrawSphere(startPoints[i].transform.position, startPoints[i].minDistanceFromCenter); 74 | } 75 | 76 | Gizmos.color = Color.red; 77 | Gizmos.DrawSphere(v, .1f); 78 | } 79 | 80 | private void OnValidate() 81 | { 82 | for (int i = 0; i < startPoints.Count; i++) 83 | { 84 | if (startPoints[i].minDistanceFromCenter > startPoints[i].radius) 85 | { 86 | startPoints[i] = new Sphere 87 | { 88 | transform = startPoints[i].transform, 89 | radius = startPoints[i].radius, 90 | minDistanceFromCenter = startPoints[i].radius 91 | }; 92 | } 93 | else if (startPoints[i].minDistanceFromCenter < 0) 94 | { 95 | startPoints[i] = new Sphere 96 | { 97 | transform = startPoints[i].transform, 98 | radius = startPoints[i].radius, 99 | minDistanceFromCenter = 0 100 | }; 101 | } 102 | } 103 | } 104 | #endregion 105 | } 106 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/EndPoints/EndPoint.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SemihOrhan.WaveOne.EndPoints 5 | { 6 | #pragma warning disable 0649 7 | public class EndPoint : MonoBehaviour 8 | { 9 | #if UNITY_2019_3_OR_NEWER 10 | #else 11 | #pragma warning disable 0414 12 | [Header("Editor controls")] 13 | [SerializeField] private bool showEndPointsListControls = true; 14 | [SerializeField] private bool showEnemiesListControls = true; 15 | [SerializeField] private bool showNoEndPointEnemiesListControls = true; 16 | #pragma warning restore 0414 17 | #endif 18 | 19 | [Header("End point settings")] 20 | [SerializeField] private List endPoints = new List(); 21 | [SerializeField] private bool addColliders; 22 | [SerializeField] private bool triggerColliders; 23 | [SerializeField] private Vector3 colliderSize; 24 | [Tooltip("Put in all the enemies that should not have a end point. " + 25 | "For example if you have your own logic for those enemies.")] 26 | [SerializeField] private List noEndPointEnemies = new List(); 27 | 28 | private Dictionary> enemyEndPointsPairs = new Dictionary>(); 29 | 30 | public List EndPoints { get => endPoints; set => endPoints = value; } 31 | public List NoEndPointEnemies { get => noEndPointEnemies; set => noEndPointEnemies = value; } 32 | 33 | private void Awake() 34 | { 35 | if (addColliders) 36 | { 37 | for (int i = 0; i < endPoints.Count; i++) 38 | { 39 | BoxCollider col = endPoints[i].endPoint.gameObject.AddComponent(); 40 | col.size = colliderSize; 41 | col.isTrigger = triggerColliders; 42 | } 43 | } 44 | } 45 | 46 | public void SetValidEndPointsPerEnemy(GameObject enemy) 47 | { 48 | if (noEndPointEnemies.Contains(enemy) || enemyEndPointsPairs.ContainsKey(enemy)) 49 | return; 50 | 51 | List availableEndPoints = new List(); 52 | 53 | for (int i = 0; i < endPoints.Count; i++) 54 | { 55 | if (endPoints[i].enemies.Contains(enemy) || endPoints[i].enemies.Count == 0) 56 | availableEndPoints.Add(endPoints[i].endPoint); 57 | } 58 | 59 | enemyEndPointsPairs[enemy] = availableEndPoints; 60 | } 61 | 62 | public List GetEndPoints(GameObject enemyPrefab) 63 | { 64 | if (noEndPointEnemies.Contains(enemyPrefab) || !enemyEndPointsPairs.ContainsKey(enemyPrefab)) 65 | return new List(); 66 | 67 | return enemyEndPointsPairs[enemyPrefab]; 68 | } 69 | 70 | #region Custom structs and validation 71 | [System.Serializable] 72 | public struct SinglePoint 73 | { 74 | [HideInInspector] public string name; 75 | public Transform endPoint; 76 | [Tooltip("Drag in all the enemies that are allowed to have this as their end point. " + 77 | "Leave it empty if ALL enemies are allowed to have this as their end point.")] 78 | public List enemies; 79 | } 80 | 81 | private void OnDrawGizmos() 82 | { 83 | for (int i = 0; i < endPoints.Count; i++) 84 | { 85 | if (endPoints[i].endPoint) 86 | { 87 | Gizmos.color = Color.white; 88 | Gizmos.DrawWireSphere(endPoints[i].endPoint.position, 0.1f); 89 | 90 | if (addColliders) 91 | { 92 | Gizmos.color = Color.green; 93 | Gizmos.DrawWireCube(endPoints[i].endPoint.position, colliderSize); 94 | } 95 | } 96 | } 97 | } 98 | 99 | private void OnValidate() 100 | { 101 | for (int i = 0; i < endPoints.Count; i++) 102 | { 103 | endPoints[i] = new SinglePoint 104 | { 105 | name = "End point " + (i + 1), 106 | endPoint = endPoints[i].endPoint, 107 | enemies = endPoints[i].enemies 108 | }; 109 | } 110 | } 111 | #endregion 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents/Agent_Sphere.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6004075313457377879 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: 8376931356910056205} 12 | - component: {fileID: 7599432492533108709} 13 | - component: {fileID: 5906471578595229106} 14 | - component: {fileID: 1953593820203622007} 15 | - component: {fileID: 304868577328162464} 16 | - component: {fileID: 282732596187992115} 17 | - component: {fileID: -7244751601579869128} 18 | m_Layer: 0 19 | m_Name: Agent_Sphere 20 | m_TagString: Untagged 21 | m_Icon: {fileID: 0} 22 | m_NavMeshLayer: 0 23 | m_StaticEditorFlags: 0 24 | m_IsActive: 1 25 | --- !u!4 &8376931356910056205 26 | Transform: 27 | m_ObjectHideFlags: 0 28 | m_CorrespondingSourceObject: {fileID: 0} 29 | m_PrefabInstance: {fileID: 0} 30 | m_PrefabAsset: {fileID: 0} 31 | m_GameObject: {fileID: 6004075313457377879} 32 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 33 | m_LocalPosition: {x: 0, y: 0, z: 0} 34 | m_LocalScale: {x: 1, y: 1, z: 1} 35 | m_Children: [] 36 | m_Father: {fileID: 0} 37 | m_RootOrder: 0 38 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 39 | --- !u!33 &7599432492533108709 40 | MeshFilter: 41 | m_ObjectHideFlags: 0 42 | m_CorrespondingSourceObject: {fileID: 0} 43 | m_PrefabInstance: {fileID: 0} 44 | m_PrefabAsset: {fileID: 0} 45 | m_GameObject: {fileID: 6004075313457377879} 46 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 47 | --- !u!23 &5906471578595229106 48 | MeshRenderer: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | m_GameObject: {fileID: 6004075313457377879} 54 | m_Enabled: 1 55 | m_CastShadows: 1 56 | m_ReceiveShadows: 1 57 | m_DynamicOccludee: 1 58 | m_MotionVectors: 1 59 | m_LightProbeUsage: 1 60 | m_ReflectionProbeUsage: 1 61 | m_RenderingLayerMask: 1 62 | m_RendererPriority: 0 63 | m_Materials: 64 | - {fileID: 2100000, guid: fa962a2ed2673fc4fa496b1cca06218d, type: 2} 65 | m_StaticBatchInfo: 66 | firstSubMesh: 0 67 | subMeshCount: 0 68 | m_StaticBatchRoot: {fileID: 0} 69 | m_ProbeAnchor: {fileID: 0} 70 | m_LightProbeVolumeOverride: {fileID: 0} 71 | m_ScaleInLightmap: 1 72 | m_PreserveUVs: 0 73 | m_IgnoreNormalsForChartDetection: 0 74 | m_ImportantGI: 0 75 | m_StitchLightmapSeams: 1 76 | m_SelectedEditorRenderState: 3 77 | m_MinimumChartSize: 4 78 | m_AutoUVMaxDistance: 0.5 79 | m_AutoUVMaxAngle: 89 80 | m_LightmapParameters: {fileID: 0} 81 | m_SortingLayerID: 0 82 | m_SortingLayer: 0 83 | m_SortingOrder: 0 84 | --- !u!54 &1953593820203622007 85 | Rigidbody: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 6004075313457377879} 91 | serializedVersion: 2 92 | m_Mass: 1 93 | m_Drag: 0 94 | m_AngularDrag: 0.05 95 | m_UseGravity: 1 96 | m_IsKinematic: 1 97 | m_Interpolate: 0 98 | m_Constraints: 0 99 | m_CollisionDetection: 0 100 | --- !u!195 &304868577328162464 101 | NavMeshAgent: 102 | m_ObjectHideFlags: 0 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInstance: {fileID: 0} 105 | m_PrefabAsset: {fileID: 0} 106 | m_GameObject: {fileID: 6004075313457377879} 107 | m_Enabled: 1 108 | m_AgentTypeID: 0 109 | m_Radius: 0.5 110 | m_Speed: 3.5 111 | m_Acceleration: 8 112 | avoidancePriority: 50 113 | m_AngularSpeed: 120 114 | m_StoppingDistance: 1 115 | m_AutoTraverseOffMeshLink: 1 116 | m_AutoBraking: 1 117 | m_AutoRepath: 1 118 | m_Height: 1 119 | m_BaseOffset: 0.5 120 | m_WalkableMask: 4294967295 121 | m_ObstacleAvoidanceType: 4 122 | --- !u!135 &282732596187992115 123 | SphereCollider: 124 | m_ObjectHideFlags: 0 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | m_GameObject: {fileID: 6004075313457377879} 129 | m_Material: {fileID: 0} 130 | m_IsTrigger: 0 131 | m_Enabled: 1 132 | serializedVersion: 2 133 | m_Radius: 0.5 134 | m_Center: {x: 0, y: 0, z: 0} 135 | --- !u!114 &-7244751601579869128 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: 6004075313457377879} 142 | m_Enabled: 1 143 | m_EditorHideFlags: 0 144 | m_Script: {fileID: 11500000, guid: 8ebe352731e58d24c881700dc3765a04, type: 3} 145 | m_Name: 146 | m_EditorClassIdentifier: 147 | layersToCollideWith: 08000000 148 | eventAliveEnemies: {fileID: 11400000, guid: 4729eab659c313a4bb41763a631f42b3, type: 2} 149 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents/Agent_Cube.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4762860196327269951 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: 1766218198405829972} 12 | - component: {fileID: 9078146668997574930} 13 | - component: {fileID: 3315512908979078157} 14 | - component: {fileID: -2168558518179688673} 15 | - component: {fileID: 2910097610888178904} 16 | - component: {fileID: 4537500125929902350} 17 | - component: {fileID: -5581868473880692984} 18 | m_Layer: 0 19 | m_Name: Agent_Cube 20 | m_TagString: Untagged 21 | m_Icon: {fileID: 0} 22 | m_NavMeshLayer: 0 23 | m_StaticEditorFlags: 1 24 | m_IsActive: 1 25 | --- !u!4 &1766218198405829972 26 | Transform: 27 | m_ObjectHideFlags: 0 28 | m_CorrespondingSourceObject: {fileID: 0} 29 | m_PrefabInstance: {fileID: 0} 30 | m_PrefabAsset: {fileID: 0} 31 | m_GameObject: {fileID: 4762860196327269951} 32 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 33 | m_LocalPosition: {x: 0, y: 0, z: 0} 34 | m_LocalScale: {x: 1, y: 1, z: 1} 35 | m_Children: [] 36 | m_Father: {fileID: 0} 37 | m_RootOrder: 0 38 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 39 | --- !u!33 &9078146668997574930 40 | MeshFilter: 41 | m_ObjectHideFlags: 0 42 | m_CorrespondingSourceObject: {fileID: 0} 43 | m_PrefabInstance: {fileID: 0} 44 | m_PrefabAsset: {fileID: 0} 45 | m_GameObject: {fileID: 4762860196327269951} 46 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 47 | --- !u!23 &3315512908979078157 48 | MeshRenderer: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | m_GameObject: {fileID: 4762860196327269951} 54 | m_Enabled: 1 55 | m_CastShadows: 1 56 | m_ReceiveShadows: 1 57 | m_DynamicOccludee: 1 58 | m_MotionVectors: 1 59 | m_LightProbeUsage: 1 60 | m_ReflectionProbeUsage: 1 61 | m_RenderingLayerMask: 1 62 | m_RendererPriority: 0 63 | m_Materials: 64 | - {fileID: 2100000, guid: ee52b15add81ed441afc7e392efebab8, type: 2} 65 | m_StaticBatchInfo: 66 | firstSubMesh: 0 67 | subMeshCount: 0 68 | m_StaticBatchRoot: {fileID: 0} 69 | m_ProbeAnchor: {fileID: 0} 70 | m_LightProbeVolumeOverride: {fileID: 0} 71 | m_ScaleInLightmap: 1 72 | m_PreserveUVs: 0 73 | m_IgnoreNormalsForChartDetection: 0 74 | m_ImportantGI: 0 75 | m_StitchLightmapSeams: 1 76 | m_SelectedEditorRenderState: 3 77 | m_MinimumChartSize: 4 78 | m_AutoUVMaxDistance: 0.5 79 | m_AutoUVMaxAngle: 89 80 | m_LightmapParameters: {fileID: 0} 81 | m_SortingLayerID: 0 82 | m_SortingLayer: 0 83 | m_SortingOrder: 0 84 | --- !u!54 &-2168558518179688673 85 | Rigidbody: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 4762860196327269951} 91 | serializedVersion: 2 92 | m_Mass: 1 93 | m_Drag: 0 94 | m_AngularDrag: 0.05 95 | m_UseGravity: 1 96 | m_IsKinematic: 1 97 | m_Interpolate: 0 98 | m_Constraints: 0 99 | m_CollisionDetection: 0 100 | --- !u!195 &2910097610888178904 101 | NavMeshAgent: 102 | m_ObjectHideFlags: 0 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInstance: {fileID: 0} 105 | m_PrefabAsset: {fileID: 0} 106 | m_GameObject: {fileID: 4762860196327269951} 107 | m_Enabled: 1 108 | m_AgentTypeID: 0 109 | m_Radius: 0.5 110 | m_Speed: 3.5 111 | m_Acceleration: 8 112 | avoidancePriority: 50 113 | m_AngularSpeed: 120 114 | m_StoppingDistance: 1 115 | m_AutoTraverseOffMeshLink: 1 116 | m_AutoBraking: 1 117 | m_AutoRepath: 1 118 | m_Height: 1 119 | m_BaseOffset: 0.5 120 | m_WalkableMask: 4294967295 121 | m_ObstacleAvoidanceType: 4 122 | --- !u!65 &4537500125929902350 123 | BoxCollider: 124 | m_ObjectHideFlags: 0 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | m_GameObject: {fileID: 4762860196327269951} 129 | m_Material: {fileID: 0} 130 | m_IsTrigger: 0 131 | m_Enabled: 1 132 | serializedVersion: 2 133 | m_Size: {x: 1, y: 1, z: 1} 134 | m_Center: {x: 0, y: 0, z: 0} 135 | --- !u!114 &-5581868473880692984 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: 4762860196327269951} 142 | m_Enabled: 1 143 | m_EditorHideFlags: 0 144 | m_Script: {fileID: 11500000, guid: 8ebe352731e58d24c881700dc3765a04, type: 3} 145 | m_Name: 146 | m_EditorClassIdentifier: 147 | layersToCollideWith: 08000000 148 | eventAliveEnemies: {fileID: 11400000, guid: 4729eab659c313a4bb41763a631f42b3, type: 2} 149 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/PreFabs/Agents/Agent_Cylinder.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6253559388872799984 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: 6981523002544971763} 12 | - component: {fileID: 4892975712194169862} 13 | - component: {fileID: 701042549891746431} 14 | - component: {fileID: -307137221260975506} 15 | - component: {fileID: -3757923791462067974} 16 | - component: {fileID: 7466583780475240490} 17 | - component: {fileID: -8312679523633097956} 18 | m_Layer: 0 19 | m_Name: Agent_Cylinder 20 | m_TagString: Untagged 21 | m_Icon: {fileID: 0} 22 | m_NavMeshLayer: 0 23 | m_StaticEditorFlags: 0 24 | m_IsActive: 1 25 | --- !u!4 &6981523002544971763 26 | Transform: 27 | m_ObjectHideFlags: 0 28 | m_CorrespondingSourceObject: {fileID: 0} 29 | m_PrefabInstance: {fileID: 0} 30 | m_PrefabAsset: {fileID: 0} 31 | m_GameObject: {fileID: 6253559388872799984} 32 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 33 | m_LocalPosition: {x: 0, y: 0, z: 0} 34 | m_LocalScale: {x: 1, y: 1, z: 1} 35 | m_Children: [] 36 | m_Father: {fileID: 0} 37 | m_RootOrder: 0 38 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 39 | --- !u!33 &4892975712194169862 40 | MeshFilter: 41 | m_ObjectHideFlags: 0 42 | m_CorrespondingSourceObject: {fileID: 0} 43 | m_PrefabInstance: {fileID: 0} 44 | m_PrefabAsset: {fileID: 0} 45 | m_GameObject: {fileID: 6253559388872799984} 46 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} 47 | --- !u!23 &701042549891746431 48 | MeshRenderer: 49 | m_ObjectHideFlags: 0 50 | m_CorrespondingSourceObject: {fileID: 0} 51 | m_PrefabInstance: {fileID: 0} 52 | m_PrefabAsset: {fileID: 0} 53 | m_GameObject: {fileID: 6253559388872799984} 54 | m_Enabled: 1 55 | m_CastShadows: 1 56 | m_ReceiveShadows: 1 57 | m_DynamicOccludee: 1 58 | m_MotionVectors: 1 59 | m_LightProbeUsage: 1 60 | m_ReflectionProbeUsage: 1 61 | m_RenderingLayerMask: 1 62 | m_RendererPriority: 0 63 | m_Materials: 64 | - {fileID: 2100000, guid: a503770aeed3dfc4b978eff3abced38f, type: 2} 65 | m_StaticBatchInfo: 66 | firstSubMesh: 0 67 | subMeshCount: 0 68 | m_StaticBatchRoot: {fileID: 0} 69 | m_ProbeAnchor: {fileID: 0} 70 | m_LightProbeVolumeOverride: {fileID: 0} 71 | m_ScaleInLightmap: 1 72 | m_PreserveUVs: 0 73 | m_IgnoreNormalsForChartDetection: 0 74 | m_ImportantGI: 0 75 | m_StitchLightmapSeams: 1 76 | m_SelectedEditorRenderState: 3 77 | m_MinimumChartSize: 4 78 | m_AutoUVMaxDistance: 0.5 79 | m_AutoUVMaxAngle: 89 80 | m_LightmapParameters: {fileID: 0} 81 | m_SortingLayerID: 0 82 | m_SortingLayer: 0 83 | m_SortingOrder: 0 84 | --- !u!54 &-307137221260975506 85 | Rigidbody: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 6253559388872799984} 91 | serializedVersion: 2 92 | m_Mass: 1 93 | m_Drag: 0 94 | m_AngularDrag: 0.05 95 | m_UseGravity: 1 96 | m_IsKinematic: 1 97 | m_Interpolate: 0 98 | m_Constraints: 0 99 | m_CollisionDetection: 0 100 | --- !u!195 &-3757923791462067974 101 | NavMeshAgent: 102 | m_ObjectHideFlags: 0 103 | m_CorrespondingSourceObject: {fileID: 0} 104 | m_PrefabInstance: {fileID: 0} 105 | m_PrefabAsset: {fileID: 0} 106 | m_GameObject: {fileID: 6253559388872799984} 107 | m_Enabled: 1 108 | m_AgentTypeID: 0 109 | m_Radius: 0.5000001 110 | m_Speed: 3.5 111 | m_Acceleration: 8 112 | avoidancePriority: 50 113 | m_AngularSpeed: 120 114 | m_StoppingDistance: 1 115 | m_AutoTraverseOffMeshLink: 1 116 | m_AutoBraking: 1 117 | m_AutoRepath: 1 118 | m_Height: 2 119 | m_BaseOffset: 1 120 | m_WalkableMask: 4294967295 121 | m_ObstacleAvoidanceType: 4 122 | --- !u!136 &7466583780475240490 123 | CapsuleCollider: 124 | m_ObjectHideFlags: 0 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInstance: {fileID: 0} 127 | m_PrefabAsset: {fileID: 0} 128 | m_GameObject: {fileID: 6253559388872799984} 129 | m_Material: {fileID: 0} 130 | m_IsTrigger: 0 131 | m_Enabled: 1 132 | m_Radius: 0.5 133 | m_Height: 2 134 | m_Direction: 1 135 | m_Center: {x: 0, y: 0, z: 0} 136 | --- !u!114 &-8312679523633097956 137 | MonoBehaviour: 138 | m_ObjectHideFlags: 0 139 | m_CorrespondingSourceObject: {fileID: 0} 140 | m_PrefabInstance: {fileID: 0} 141 | m_PrefabAsset: {fileID: 0} 142 | m_GameObject: {fileID: 6253559388872799984} 143 | m_Enabled: 1 144 | m_EditorHideFlags: 0 145 | m_Script: {fileID: 11500000, guid: 8ebe352731e58d24c881700dc3765a04, type: 3} 146 | m_Name: 147 | m_EditorClassIdentifier: 148 | layersToCollideWith: 08000000 149 | eventAliveEnemies: {fileID: 11400000, guid: 4729eab659c313a4bb41763a631f42b3, type: 2} 150 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/EndPointEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.EndPoints; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace SemihOrhan.WaveOne.CustomEditors 6 | { 7 | #if UNITY_2019_3_OR_NEWER 8 | #else 9 | [CustomEditor(typeof(EndPoint))] 10 | public class EndPointEditor : Editor 11 | { 12 | public override void OnInspectorGUI() 13 | { 14 | SerializedObject so = new SerializedObject(target); 15 | so.Update(); 16 | 17 | SerializedProperty showEndPointsListControls = so.FindProperty("showEndPointsListControls"); 18 | SerializedProperty showEnemiesListControls = so.FindProperty("showEnemiesListControls"); 19 | SerializedProperty showNoEndPointEnemiesListControls = so.FindProperty("showNoEndPointEnemiesListControls"); 20 | SerializedProperty endPoints = so.FindProperty("endPoints"); 21 | SerializedProperty addColliders = so.FindProperty("addColliders"); 22 | SerializedProperty triggerColliders = so.FindProperty("triggerColliders"); 23 | SerializedProperty colliderSize = so.FindProperty("colliderSize"); 24 | SerializedProperty noEndPointEnemies = so.FindProperty("noEndPointEnemies"); 25 | 26 | EditorGUILayout.PropertyField(showEndPointsListControls); 27 | EditorGUILayout.PropertyField(showEnemiesListControls); 28 | EditorGUILayout.PropertyField(showNoEndPointEnemiesListControls); 29 | 30 | // List 31 | EditorGUILayout.PropertyField(endPoints); 32 | EditorGUI.indentLevel++; 33 | if (endPoints.isExpanded) 34 | { 35 | EditorButtons.ShowAddButton(endPoints); 36 | 37 | for (int i = 0; i < endPoints.arraySize; i++) 38 | { 39 | // List list element 40 | EditorGUILayout.BeginHorizontal(); 41 | EditorGUILayout.PropertyField(endPoints.GetArrayElementAtIndex(i)); 42 | if (showEndPointsListControls.boolValue && EditorButtons.ShowElementButtons(endPoints, i)) 43 | continue; 44 | EditorGUILayout.EndHorizontal(); 45 | 46 | SerializedProperty endPoint = endPoints.GetArrayElementAtIndex(i).FindPropertyRelative("endPoint"); 47 | SerializedProperty enemies = endPoints.GetArrayElementAtIndex(i).FindPropertyRelative("enemies"); 48 | 49 | EditorGUI.indentLevel++; 50 | if (endPoints.GetArrayElementAtIndex(i).isExpanded) 51 | { 52 | EditorGUILayout.PropertyField(endPoint); 53 | // EndPoint List 54 | EditorGUILayout.PropertyField(enemies); 55 | 56 | EditorGUI.indentLevel++; 57 | if (enemies.isExpanded) 58 | { 59 | EditorButtons.ShowAddButton(enemies); 60 | 61 | for (int j = 0; j < enemies.arraySize; j++) 62 | { 63 | // EndPoint List list element 64 | EditorGUILayout.BeginHorizontal(); 65 | EditorGUILayout.PropertyField(enemies.GetArrayElementAtIndex(j), new GUIContent("Enemy " + (j + 1))); 66 | if (showEnemiesListControls.boolValue && EditorButtons.ShowElementButtons(enemies, j)) 67 | continue; 68 | EditorGUILayout.EndHorizontal(); 69 | } 70 | } 71 | EditorGUI.indentLevel--; 72 | } 73 | EditorGUI.indentLevel--; 74 | } 75 | } 76 | EditorGUI.indentLevel--; 77 | 78 | EditorGUILayout.PropertyField(addColliders, true); 79 | 80 | using (var group = new EditorGUILayout.FadeGroupScope(System.Convert.ToSingle(addColliders.boolValue))) 81 | { 82 | if (group.visible) 83 | { 84 | EditorGUILayout.PropertyField(triggerColliders, true); 85 | EditorGUILayout.PropertyField(colliderSize, true); 86 | } 87 | } 88 | 89 | EditorGUILayout.PropertyField(noEndPointEnemies); 90 | EditorGUI.indentLevel++; 91 | if (noEndPointEnemies.isExpanded) 92 | { 93 | EditorButtons.ShowAddButton(noEndPointEnemies); 94 | 95 | for (int i = 0; i < noEndPointEnemies.arraySize; i++) 96 | { 97 | EditorGUILayout.BeginHorizontal(); 98 | EditorGUILayout.PropertyField(noEndPointEnemies.GetArrayElementAtIndex(i), new GUIContent("Enemy " + (i + 1))); 99 | if (showNoEndPointEnemiesListControls.boolValue && EditorButtons.ShowElementButtons(noEndPointEnemies, i)) 100 | continue; 101 | EditorGUILayout.EndHorizontal(); 102 | } 103 | } 104 | EditorGUI.indentLevel--; 105 | 106 | so.ApplyModifiedProperties(); 107 | } 108 | } 109 | #endif 110 | } 111 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Scripts/NavMeshLink.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace UnityEngine.AI 4 | { 5 | [ExecuteInEditMode] 6 | [DefaultExecutionOrder(-101)] 7 | [AddComponentMenu("Navigation/NavMeshLink", 33)] 8 | [HelpURL("https://github.com/Unity-Technologies/NavMeshComponents#documentation-draft")] 9 | public class NavMeshLink : MonoBehaviour 10 | { 11 | [SerializeField] 12 | int m_AgentTypeID; 13 | public int agentTypeID { get { return m_AgentTypeID; } set { m_AgentTypeID = value; UpdateLink(); } } 14 | 15 | [SerializeField] 16 | Vector3 m_StartPoint = new Vector3(0.0f, 0.0f, -2.5f); 17 | public Vector3 startPoint { get { return m_StartPoint; } set { m_StartPoint = value; UpdateLink(); } } 18 | 19 | [SerializeField] 20 | Vector3 m_EndPoint = new Vector3(0.0f, 0.0f, 2.5f); 21 | public Vector3 endPoint { get { return m_EndPoint; } set { m_EndPoint = value; UpdateLink(); } } 22 | 23 | [SerializeField] 24 | float m_Width; 25 | public float width { get { return m_Width; } set { m_Width = value; UpdateLink(); } } 26 | 27 | [SerializeField] 28 | int m_CostModifier = -1; 29 | public int costModifier { get { return m_CostModifier; } set { m_CostModifier = value; UpdateLink(); } } 30 | 31 | [SerializeField] 32 | bool m_Bidirectional = true; 33 | public bool bidirectional { get { return m_Bidirectional; } set { m_Bidirectional = value; UpdateLink(); } } 34 | 35 | [SerializeField] 36 | bool m_AutoUpdatePosition; 37 | public bool autoUpdate { get { return m_AutoUpdatePosition; } set { SetAutoUpdate(value); } } 38 | 39 | [SerializeField] 40 | int m_Area; 41 | public int area { get { return m_Area; } set { m_Area = value; UpdateLink(); } } 42 | 43 | NavMeshLinkInstance m_LinkInstance = new NavMeshLinkInstance(); 44 | 45 | Vector3 m_LastPosition = Vector3.zero; 46 | Quaternion m_LastRotation = Quaternion.identity; 47 | 48 | static readonly List s_Tracked = new List(); 49 | 50 | void OnEnable() 51 | { 52 | AddLink(); 53 | if (m_AutoUpdatePosition && m_LinkInstance.valid) 54 | AddTracking(this); 55 | } 56 | 57 | void OnDisable() 58 | { 59 | RemoveTracking(this); 60 | m_LinkInstance.Remove(); 61 | } 62 | 63 | public void UpdateLink() 64 | { 65 | m_LinkInstance.Remove(); 66 | AddLink(); 67 | } 68 | 69 | static void AddTracking(NavMeshLink link) 70 | { 71 | #if UNITY_EDITOR 72 | if (s_Tracked.Contains(link)) 73 | { 74 | Debug.LogError("Link is already tracked: " + link); 75 | return; 76 | } 77 | #endif 78 | 79 | if (s_Tracked.Count == 0) 80 | NavMesh.onPreUpdate += UpdateTrackedInstances; 81 | 82 | s_Tracked.Add(link); 83 | } 84 | 85 | static void RemoveTracking(NavMeshLink link) 86 | { 87 | s_Tracked.Remove(link); 88 | 89 | if (s_Tracked.Count == 0) 90 | NavMesh.onPreUpdate -= UpdateTrackedInstances; 91 | } 92 | 93 | void SetAutoUpdate(bool value) 94 | { 95 | if (m_AutoUpdatePosition == value) 96 | return; 97 | m_AutoUpdatePosition = value; 98 | if (value) 99 | AddTracking(this); 100 | else 101 | RemoveTracking(this); 102 | } 103 | 104 | void AddLink() 105 | { 106 | #if UNITY_EDITOR 107 | if (m_LinkInstance.valid) 108 | { 109 | Debug.LogError("Link is already added: " + this); 110 | return; 111 | } 112 | #endif 113 | 114 | var link = new NavMeshLinkData(); 115 | link.startPosition = m_StartPoint; 116 | link.endPosition = m_EndPoint; 117 | link.width = m_Width; 118 | link.costModifier = m_CostModifier; 119 | link.bidirectional = m_Bidirectional; 120 | link.area = m_Area; 121 | link.agentTypeID = m_AgentTypeID; 122 | m_LinkInstance = NavMesh.AddLink(link, transform.position, transform.rotation); 123 | if (m_LinkInstance.valid) 124 | m_LinkInstance.owner = this; 125 | 126 | m_LastPosition = transform.position; 127 | m_LastRotation = transform.rotation; 128 | } 129 | 130 | bool HasTransformChanged() 131 | { 132 | if (m_LastPosition != transform.position) return true; 133 | if (m_LastRotation != transform.rotation) return true; 134 | return false; 135 | } 136 | 137 | void OnDidApplyAnimationProperties() 138 | { 139 | UpdateLink(); 140 | } 141 | 142 | static void UpdateTrackedInstances() 143 | { 144 | foreach (var instance in s_Tracked) 145 | { 146 | if (instance.HasTransformChanged()) 147 | instance.UpdateLink(); 148 | } 149 | } 150 | 151 | #if UNITY_EDITOR 152 | void OnValidate() 153 | { 154 | m_Width = Mathf.Max(0.0f, m_Width); 155 | 156 | if (!m_LinkInstance.valid) 157 | return; 158 | 159 | UpdateLink(); 160 | 161 | if (!m_AutoUpdatePosition) 162 | { 163 | RemoveTracking(this); 164 | } 165 | else if (!s_Tracked.Contains(this)) 166 | { 167 | AddTracking(this); 168 | } 169 | } 170 | #endif 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/PerWaveRandomPoolEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | #if UNITY_2019_3_OR_NEWER 7 | #else 8 | [CustomEditor(typeof(PerWaveRandomPool))] 9 | public class PerWaveRandomPoolEditor : Editor 10 | { 11 | public override void OnInspectorGUI() 12 | { 13 | SerializedObject so = new SerializedObject(target); 14 | so.Update(); 15 | 16 | SerializedProperty showWaveListControls = so.FindProperty("showWaveListControls"); 17 | SerializedProperty showEnemiesListControls = so.FindProperty("showEnemiesListControls"); 18 | SerializedProperty enemyWaves = so.FindProperty("enemyWaves"); 19 | SerializedProperty minTimeForNextDeployment = so.FindProperty("minTimeForNextDeployment"); 20 | SerializedProperty maxTimeForNextDeployment = so.FindProperty("maxTimeForNextDeployment"); 21 | SerializedProperty spawnRate = so.FindProperty("spawnRate"); 22 | SerializedProperty autoDeploy = so.FindProperty("autoDeploy"); 23 | SerializedProperty enemyParentObject = so.FindProperty("enemyParentObject"); 24 | SerializedProperty eventSpawnerFinished = so.FindProperty("eventSpawnerFinished"); 25 | SerializedProperty eventTotalEnemies = so.FindProperty("eventTotalEnemies"); 26 | SerializedProperty eventDeployedEnemies = so.FindProperty("eventDeployedEnemies"); 27 | SerializedProperty eventAliveEnemies = so.FindProperty("eventAliveEnemies"); 28 | 29 | EditorGUILayout.PropertyField(showWaveListControls, true); 30 | EditorGUILayout.PropertyField(showEnemiesListControls, true); 31 | 32 | // List 33 | EditorGUILayout.PropertyField(enemyWaves); 34 | EditorGUI.indentLevel++; 35 | if (enemyWaves.isExpanded) 36 | { 37 | EditorButtons.ShowAddButton(enemyWaves); 38 | 39 | for (int i = 0; i < enemyWaves.arraySize; i++) 40 | { 41 | // List list element 42 | EditorGUILayout.BeginHorizontal(); 43 | EditorGUILayout.PropertyField(enemyWaves.GetArrayElementAtIndex(i)); 44 | if (showWaveListControls.boolValue && EditorButtons.ShowElementButtons(enemyWaves, i)) 45 | continue; 46 | EditorGUILayout.EndHorizontal(); 47 | 48 | SerializedProperty enemies = enemyWaves.GetArrayElementAtIndex(i).FindPropertyRelative("enemies"); 49 | SerializedProperty poolSize = enemyWaves.GetArrayElementAtIndex(i).FindPropertyRelative("poolSize"); 50 | SerializedProperty deployments = enemyWaves.GetArrayElementAtIndex(i).FindPropertyRelative("deployments"); 51 | 52 | // SingleWave List 53 | EditorGUI.indentLevel++; 54 | if (enemyWaves.GetArrayElementAtIndex(i).isExpanded) 55 | { 56 | EditorGUILayout.PropertyField(enemies); 57 | 58 | EditorGUI.indentLevel++; 59 | if (enemies.isExpanded) 60 | { 61 | EditorButtons.ShowAddButton(enemies); 62 | 63 | for (int j = 0; j < enemies.arraySize; j++) 64 | { 65 | // SingleWave List list element 66 | EditorGUILayout.BeginHorizontal(); 67 | EditorGUILayout.PropertyField(enemies.GetArrayElementAtIndex(j)); 68 | if (showEnemiesListControls.boolValue && EditorButtons.ShowElementButtons(enemies, j)) 69 | continue; 70 | EditorGUILayout.EndHorizontal(); 71 | 72 | SerializedProperty gameObject = enemies.GetArrayElementAtIndex(j).FindPropertyRelative("gameObject"); 73 | SerializedProperty groupSize = enemies.GetArrayElementAtIndex(j).FindPropertyRelative("groupSize"); 74 | 75 | // EnemyCount values 76 | EditorGUI.indentLevel++; 77 | if (enemies.GetArrayElementAtIndex(j).isExpanded) 78 | { 79 | EditorGUILayout.PropertyField(gameObject); 80 | EditorGUILayout.PropertyField(groupSize); 81 | } 82 | EditorGUI.indentLevel--; 83 | } 84 | } 85 | EditorGUI.indentLevel--; 86 | 87 | // SingleWave poolSize and deployments 88 | EditorGUILayout.PropertyField(poolSize); 89 | EditorGUILayout.PropertyField(deployments); 90 | } 91 | EditorGUI.indentLevel--; 92 | } 93 | } 94 | EditorGUI.indentLevel--; 95 | 96 | EditorGUILayout.Space(); 97 | EditorGUILayout.PropertyField(minTimeForNextDeployment); 98 | EditorGUILayout.PropertyField(maxTimeForNextDeployment); 99 | EditorGUILayout.PropertyField(spawnRate); 100 | EditorGUILayout.PropertyField(autoDeploy); 101 | EditorGUILayout.PropertyField(enemyParentObject); 102 | EditorGUILayout.PropertyField(eventSpawnerFinished); 103 | EditorGUILayout.PropertyField(eventTotalEnemies); 104 | EditorGUILayout.PropertyField(eventDeployedEnemies); 105 | EditorGUILayout.PropertyField(eventAliveEnemies); 106 | 107 | so.ApplyModifiedProperties(); 108 | } 109 | } 110 | #endif 111 | } -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Editor/Spawners/PerWaveCustomEditor.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.Spawners; 2 | using UnityEditor; 3 | 4 | namespace SemihOrhan.WaveOne.CustomEditors 5 | { 6 | #if UNITY_2019_3_OR_NEWER 7 | #else 8 | [CustomEditor(typeof(PerWaveCustom))] 9 | public class PerWaveCustomEditor : Editor 10 | { 11 | public override void OnInspectorGUI() 12 | { 13 | SerializedObject so = new SerializedObject(target); 14 | so.Update(); 15 | 16 | SerializedProperty showWaveListControls = so.FindProperty("showWaveListControls"); 17 | SerializedProperty showEnemiesListControls = so.FindProperty("showEnemiesListControls"); 18 | SerializedProperty enemyWaves = so.FindProperty("enemyWaves"); 19 | SerializedProperty minTimeForNextDeployment = so.FindProperty("minTimeForNextDeployment"); 20 | SerializedProperty maxTimeForNextDeployment = so.FindProperty("maxTimeForNextDeployment"); 21 | SerializedProperty spawnRate = so.FindProperty("spawnRate"); 22 | SerializedProperty autoDeploy = so.FindProperty("autoDeploy"); 23 | SerializedProperty enemyParentObject = so.FindProperty("enemyParentObject"); 24 | SerializedProperty eventSpawnerFinished = so.FindProperty("eventSpawnerFinished"); 25 | SerializedProperty eventTotalEnemies = so.FindProperty("eventTotalEnemies"); 26 | SerializedProperty eventDeployedEnemies = so.FindProperty("eventDeployedEnemies"); 27 | SerializedProperty eventAliveEnemies = so.FindProperty("eventAliveEnemies"); 28 | 29 | EditorGUILayout.PropertyField(showWaveListControls); 30 | EditorGUILayout.PropertyField(showEnemiesListControls); 31 | 32 | // List 33 | EditorGUILayout.PropertyField(enemyWaves); 34 | EditorGUI.indentLevel++; 35 | if (enemyWaves.isExpanded) 36 | { 37 | EditorButtons.ShowAddButton(enemyWaves); 38 | 39 | for (int i = 0; i < enemyWaves.arraySize; i++) 40 | { 41 | // List list element 42 | EditorGUILayout.BeginHorizontal(); 43 | EditorGUILayout.PropertyField(enemyWaves.GetArrayElementAtIndex(i)); 44 | if (showWaveListControls.boolValue && EditorButtons.ShowElementButtons(enemyWaves, i)) 45 | continue; 46 | EditorGUILayout.EndHorizontal(); 47 | 48 | SerializedProperty enemies = enemyWaves.GetArrayElementAtIndex(i).FindPropertyRelative("enemies"); 49 | SerializedProperty deployments = enemyWaves.GetArrayElementAtIndex(i).FindPropertyRelative("deployments"); 50 | 51 | // SingleWave List 52 | EditorGUI.indentLevel++; 53 | if (enemyWaves.GetArrayElementAtIndex(i).isExpanded) 54 | { 55 | EditorGUILayout.PropertyField(enemies); 56 | 57 | EditorGUI.indentLevel++; 58 | if (enemies.isExpanded) 59 | { 60 | EditorButtons.ShowAddButton(enemies); 61 | 62 | for (int j = 0; j < enemies.arraySize; j++) 63 | { 64 | // SingleWave List list element 65 | EditorGUILayout.BeginHorizontal(); 66 | EditorGUILayout.PropertyField(enemies.GetArrayElementAtIndex(j)); 67 | if (showEnemiesListControls.boolValue && EditorButtons.ShowElementButtons(enemies, j)) 68 | continue; 69 | EditorGUILayout.EndHorizontal(); 70 | 71 | SerializedProperty gameObject = enemies.GetArrayElementAtIndex(j).FindPropertyRelative("gameObject"); 72 | SerializedProperty amount = enemies.GetArrayElementAtIndex(j).FindPropertyRelative("amount"); 73 | SerializedProperty groupSize = enemies.GetArrayElementAtIndex(j).FindPropertyRelative("groupSize"); 74 | 75 | // EnemyCount values 76 | EditorGUI.indentLevel++; 77 | if (enemies.GetArrayElementAtIndex(j).isExpanded) 78 | { 79 | EditorGUILayout.PropertyField(gameObject); 80 | EditorGUILayout.PropertyField(amount); 81 | EditorGUILayout.PropertyField(groupSize); 82 | } 83 | EditorGUI.indentLevel--; 84 | } 85 | } 86 | EditorGUI.indentLevel--; 87 | 88 | // SingleWave deployments 89 | EditorGUILayout.PropertyField(deployments); 90 | } 91 | EditorGUI.indentLevel--; 92 | } 93 | } 94 | EditorGUI.indentLevel--; 95 | 96 | EditorGUILayout.Space(); 97 | EditorGUILayout.PropertyField(minTimeForNextDeployment, true); 98 | EditorGUILayout.PropertyField(maxTimeForNextDeployment, true); 99 | EditorGUILayout.PropertyField(spawnRate, true); 100 | EditorGUILayout.PropertyField(autoDeploy, true); 101 | EditorGUILayout.PropertyField(enemyParentObject, true); 102 | EditorGUILayout.PropertyField(eventSpawnerFinished, true); 103 | EditorGUILayout.PropertyField(eventTotalEnemies, true); 104 | EditorGUILayout.PropertyField(eventDeployedEnemies, true); 105 | EditorGUILayout.PropertyField(eventAliveEnemies, true); 106 | 107 | so.ApplyModifiedProperties(); 108 | } 109 | } 110 | #endif 111 | } 112 | -------------------------------------------------------------------------------- /Assets/Wave One/Demo/NavMeshComponents/Editor/NavMeshModifierVolumeEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor.IMGUI.Controls; 2 | using UnityEditorInternal; 3 | using UnityEngine.AI; 4 | using UnityEngine; 5 | 6 | namespace UnityEditor.AI 7 | { 8 | [CanEditMultipleObjects] 9 | [CustomEditor(typeof(NavMeshModifierVolume))] 10 | class NavMeshModifierVolumeEditor : Editor 11 | { 12 | SerializedProperty m_AffectedAgents; 13 | SerializedProperty m_Area; 14 | SerializedProperty m_Center; 15 | SerializedProperty m_Size; 16 | 17 | static Color s_HandleColor = new Color(187f, 138f, 240f, 210f) / 255; 18 | static Color s_HandleColorDisabled = new Color(187f * 0.75f, 138f * 0.75f, 240f * 0.75f, 100f) / 255; 19 | 20 | BoxBoundsHandle m_BoundsHandle = new BoxBoundsHandle(); 21 | 22 | bool editingCollider 23 | { 24 | get { return EditMode.editMode == EditMode.SceneViewEditMode.Collider && EditMode.IsOwner(this); } 25 | } 26 | 27 | void OnEnable() 28 | { 29 | m_AffectedAgents = serializedObject.FindProperty("m_AffectedAgents"); 30 | m_Area = serializedObject.FindProperty("m_Area"); 31 | m_Center = serializedObject.FindProperty("m_Center"); 32 | m_Size = serializedObject.FindProperty("m_Size"); 33 | 34 | NavMeshVisualizationSettings.showNavigation++; 35 | } 36 | 37 | void OnDisable() 38 | { 39 | NavMeshVisualizationSettings.showNavigation--; 40 | } 41 | 42 | Bounds GetBounds() 43 | { 44 | var navModifier = (NavMeshModifierVolume)target; 45 | return new Bounds(navModifier.transform.position, navModifier.size); 46 | } 47 | 48 | public override void OnInspectorGUI() 49 | { 50 | serializedObject.Update(); 51 | 52 | EditMode.DoEditModeInspectorModeButton(EditMode.SceneViewEditMode.Collider, "Edit Volume", 53 | EditorGUIUtility.IconContent("EditCollider"), GetBounds, this); 54 | 55 | EditorGUILayout.PropertyField(m_Size); 56 | EditorGUILayout.PropertyField(m_Center); 57 | 58 | NavMeshComponentsGUIUtility.AreaPopup("Area Type", m_Area); 59 | NavMeshComponentsGUIUtility.AgentMaskPopup("Affected Agents", m_AffectedAgents); 60 | EditorGUILayout.Space(); 61 | 62 | serializedObject.ApplyModifiedProperties(); 63 | } 64 | 65 | [DrawGizmo(GizmoType.Selected | GizmoType.Active)] 66 | static void RenderBoxGizmo(NavMeshModifierVolume navModifier, GizmoType gizmoType) 67 | { 68 | var color = navModifier.enabled ? s_HandleColor : s_HandleColorDisabled; 69 | var colorTrans = new Color(color.r * 0.75f, color.g * 0.75f, color.b * 0.75f, color.a * 0.15f); 70 | 71 | var oldColor = Gizmos.color; 72 | var oldMatrix = Gizmos.matrix; 73 | 74 | Gizmos.matrix = navModifier.transform.localToWorldMatrix; 75 | 76 | Gizmos.color = colorTrans; 77 | Gizmos.DrawCube(navModifier.center, navModifier.size); 78 | 79 | Gizmos.color = color; 80 | Gizmos.DrawWireCube(navModifier.center, navModifier.size); 81 | 82 | Gizmos.matrix = oldMatrix; 83 | Gizmos.color = oldColor; 84 | 85 | Gizmos.DrawIcon(navModifier.transform.position, "NavMeshModifierVolume Icon", true); 86 | } 87 | 88 | [DrawGizmo(GizmoType.NotInSelectionHierarchy | GizmoType.Pickable)] 89 | static void RenderBoxGizmoNotSelected(NavMeshModifierVolume navModifier, GizmoType gizmoType) 90 | { 91 | if (NavMeshVisualizationSettings.showNavigation > 0) 92 | { 93 | var color = navModifier.enabled ? s_HandleColor : s_HandleColorDisabled; 94 | var oldColor = Gizmos.color; 95 | var oldMatrix = Gizmos.matrix; 96 | 97 | Gizmos.matrix = navModifier.transform.localToWorldMatrix; 98 | 99 | Gizmos.color = color; 100 | Gizmos.DrawWireCube(navModifier.center, navModifier.size); 101 | 102 | Gizmos.matrix = oldMatrix; 103 | Gizmos.color = oldColor; 104 | } 105 | 106 | Gizmos.DrawIcon(navModifier.transform.position, "NavMeshModifierVolume Icon", true); 107 | } 108 | 109 | void OnSceneGUI() 110 | { 111 | if (!editingCollider) 112 | return; 113 | 114 | var vol = (NavMeshModifierVolume)target; 115 | var color = vol.enabled ? s_HandleColor : s_HandleColorDisabled; 116 | using (new Handles.DrawingScope(color, vol.transform.localToWorldMatrix)) 117 | { 118 | m_BoundsHandle.center = vol.center; 119 | m_BoundsHandle.size = vol.size; 120 | 121 | EditorGUI.BeginChangeCheck(); 122 | m_BoundsHandle.DrawHandle(); 123 | if (EditorGUI.EndChangeCheck()) 124 | { 125 | Undo.RecordObject(vol, "Modified NavMesh Modifier Volume"); 126 | Vector3 center = m_BoundsHandle.center; 127 | Vector3 size = m_BoundsHandle.size; 128 | vol.center = center; 129 | vol.size = size; 130 | EditorUtility.SetDirty(target); 131 | } 132 | } 133 | } 134 | 135 | [MenuItem("GameObject/AI/NavMesh Modifier Volume", false, 2001)] 136 | static public void CreateNavMeshModifierVolume(MenuCommand menuCommand) 137 | { 138 | var parent = menuCommand.context as GameObject; 139 | var go = NavMeshComponentsGUIUtility.CreateAndSelectGameObject("NavMesh Modifier Volume", parent); 140 | go.AddComponent(); 141 | var view = SceneView.lastActiveSceneView; 142 | if (view != null) 143 | view.MoveToView(go.transform); 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | skinWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | skinWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | skinWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | skinWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | skinWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 0 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo 3DS: 5 223 | Nintendo Switch: 5 224 | PS4: 5 225 | PSP2: 2 226 | Standalone: 5 227 | WebGL: 3 228 | Windows Store Apps: 5 229 | XboxOne: 5 230 | iPhone: 2 231 | tvOS: 2 232 | -------------------------------------------------------------------------------- /Assets/Wave One/Assets/Scripts/StartPoints/ListOfBoxes.cs: -------------------------------------------------------------------------------- 1 | using SemihOrhan.WaveOne.StartPoints.Shapes; 2 | using SemihOrhan.WaveOne.StartPoints.StartPointPickers; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace SemihOrhan.WaveOne.StartPoints 7 | { 8 | #pragma warning disable 0649 9 | public class ListOfBoxes : MonoBehaviour, IStartPoint 10 | { 11 | [SerializeField] private List startPoints = new List(); 12 | [Tooltip("This setting is mostly important if your minimun spawn box is the same size as the full spawn box. " + 13 | "Setting it to false will mean all axi are maxed resulting in a corner spawn. " + 14 | "Setting it to true will mean only 1 axis is maxed resulting in a random spawn on a certain face of the box.")] 15 | [SerializeField] private bool setOneAxisToMinimum = true; 16 | [SerializeField] private bool drawGizmos = true; 17 | 18 | private IStartPointPicker startPointPicker; 19 | private Vector3 v; 20 | 21 | public List StartPoints { get => startPoints; set => startPoints = value; } 22 | 23 | private void Start() 24 | { 25 | startPointPicker = GetComponent(); 26 | startPointPicker.SetListSize(startPoints.Count); 27 | } 28 | 29 | public Vector3 GetPoint() 30 | { 31 | return GetRandomPointInBox(startPoints[startPointPicker.GetIndex()]); 32 | } 33 | 34 | private Vector3 GetRandomPointInBox(Box box) 35 | { 36 | // Get a reference to the half so we don't need to divide often. 37 | Vector3 boxHalf = box.size / 2f; 38 | Vector3 boxMinDistHalf = box.minDistanceFromCenter / 2f; 39 | 40 | // Size is the whole length of a side, so we only want half of each axis. 41 | // We can then randomly invert each so we can reach each octant of the box. 42 | float x = Random.Range(0, boxHalf.x) * GetOneOrNegativeOne(); 43 | float y = Random.Range(0, boxHalf.y) * GetOneOrNegativeOne(); 44 | float z = Random.Range(0, boxHalf.z) * GetOneOrNegativeOne(); 45 | 46 | if (setOneAxisToMinimum) 47 | { 48 | switch (Random.Range(0, 3)) 49 | { 50 | case 0: 51 | x = GetMinUpToMax(x, boxMinDistHalf.x, boxHalf.x); 52 | break; 53 | case 1: 54 | y = GetMinUpToMax(y, boxMinDistHalf.y, boxHalf.y); 55 | break; 56 | case 2: 57 | z = GetMinUpToMax(z, boxMinDistHalf.z, boxHalf.z); 58 | break; 59 | } 60 | } 61 | else 62 | { 63 | x = GetMinUpToMax(x, boxMinDistHalf.x, boxHalf.x); 64 | y = GetMinUpToMax(y, boxMinDistHalf.y, boxHalf.y); 65 | z = GetMinUpToMax(z, boxMinDistHalf.z, boxHalf.z); 66 | } 67 | 68 | // Add the Vector3 we got to the box base position because the box isn't always at (0, 0, 0). 69 | return v = (box.transform.position + new Vector3(x, y, z)); 70 | } 71 | 72 | #region Helper functions 73 | /// 74 | /// Sets the input value to the minimum value and up to the max value. 75 | /// 76 | /// Input value 77 | /// Minimum value 78 | /// Maximum value 79 | /// value that is at least f2 at most f3 or inbetween. 80 | private float GetMinUpToMax(float f1, float f2, float f3) 81 | { 82 | // Check if our float variable against our min float. 83 | // If it's bigger we don't need to do anything otherwise we need a new value. 84 | if (Mathf.Abs(f1) < Mathf.Abs(f2)) 85 | { 86 | // Return the minimum value depening on the state of the original value 87 | // (negative/positive). Then add a random value between the max and min. 88 | if (f1 < 0) 89 | return -f2 - Random.Range(0f, f3 - f2); 90 | else 91 | return f2 + Random.Range(0f, f3 - f2); 92 | } 93 | 94 | return f1; 95 | } 96 | 97 | /// 98 | /// Get a 1 or -1. 99 | /// 100 | /// 1 or -1. 101 | private int GetOneOrNegativeOne() 102 | { 103 | if (Random.Range(0f, 1f) < .5f) 104 | return -1; 105 | 106 | return 1; 107 | } 108 | #endregion 109 | 110 | #region Validation & Gizmos 111 | private void OnDrawGizmos() 112 | { 113 | if (!drawGizmos) 114 | return; 115 | 116 | for (int i = 0; i < startPoints.Count; i++) 117 | { 118 | if (startPoints[i].transform) 119 | Gizmos.DrawWireCube(startPoints[i].transform.position, startPoints[i].size); 120 | } 121 | 122 | Gizmos.color = Color.black; 123 | for (int i = 0; i < startPoints.Count; i++) 124 | { 125 | if (startPoints[i].transform) 126 | Gizmos.DrawCube(startPoints[i].transform.position, startPoints[i].minDistanceFromCenter); 127 | } 128 | 129 | Gizmos.color = Color.red; 130 | Gizmos.DrawSphere(v, .1f); 131 | } 132 | 133 | /// 134 | /// Set the vector value to another vector if conditions meet. 135 | /// 136 | /// Input vector 137 | /// Vector to check the input against 138 | /// The condition to check 139 | /// v1 with xyz capped off at v2 if conditions meet. 140 | private Vector3 SetMinMaxVector(Vector3 v1, Vector3 v2, bool checkIfBigger) 141 | { 142 | if (checkIfBigger) 143 | { 144 | if (v1.x > v2.x) 145 | { 146 | v1.x = v2.x; 147 | } 148 | 149 | if (v1.y > v2.y) 150 | { 151 | v1.y = v2.y; 152 | } 153 | 154 | if (v1.z > v2.z) 155 | { 156 | v1.z = v2.z; 157 | } 158 | } 159 | else 160 | { 161 | if (v1.x < v2.x) 162 | { 163 | v1.x = v2.x; 164 | } 165 | 166 | if (v1.y < v2.y) 167 | { 168 | v1.y = v2.y; 169 | } 170 | 171 | if (v1.z < v2.z) 172 | { 173 | v1.z = v2.z; 174 | } 175 | } 176 | 177 | return v1; 178 | } 179 | 180 | private void OnValidate() 181 | { 182 | for (int i = 0; i < startPoints.Count; i++) 183 | { 184 | // If size values are smaller than 0. 185 | if (startPoints[i].size.x < 0 || 186 | startPoints[i].size.y < 0 || 187 | startPoints[i].size.z < 0) 188 | { 189 | startPoints[i] = new Box 190 | { 191 | transform = startPoints[i].transform, 192 | size = SetMinMaxVector(startPoints[i].size, Vector3.zero, false), 193 | minDistanceFromCenter = startPoints[i].minDistanceFromCenter 194 | }; 195 | } 196 | 197 | // If minDistance values are smaller than 0. 198 | if (startPoints[i].minDistanceFromCenter.x < 0 || 199 | startPoints[i].minDistanceFromCenter.y < 0 || 200 | startPoints[i].minDistanceFromCenter.z < 0) 201 | { 202 | startPoints[i] = new Box 203 | { 204 | transform = startPoints[i].transform, 205 | size = startPoints[i].size, 206 | minDistanceFromCenter = SetMinMaxVector(startPoints[i].minDistanceFromCenter, Vector3.zero, false) 207 | }; 208 | } 209 | 210 | // If minDistance values are bigger than the size. 211 | if (startPoints[i].minDistanceFromCenter.x > startPoints[i].size.x || 212 | startPoints[i].minDistanceFromCenter.y > startPoints[i].size.y || 213 | startPoints[i].minDistanceFromCenter.z > startPoints[i].size.z) 214 | { 215 | startPoints[i] = new Box 216 | { 217 | transform = startPoints[i].transform, 218 | size = startPoints[i].size, 219 | minDistanceFromCenter = SetMinMaxVector(startPoints[i].minDistanceFromCenter, startPoints[i].size, true) 220 | }; 221 | } 222 | } 223 | } 224 | #endregion 225 | } 226 | } --------------------------------------------------------------------------------