├── .gitignore ├── Assets ├── Unity-Bullet-Hell.meta └── Unity-Bullet-Hell │ ├── Materials.meta │ ├── Materials │ ├── Projectile1Material.mat │ ├── Projectile1Material.mat.meta │ ├── Projectile2Material.mat │ └── Projectile2Material.mat.meta │ ├── ProjectileShader.shader │ ├── ProjectileShader.shader.meta │ ├── ProjectileShader_StaticColor.shader │ ├── ProjectileShader_StaticColor.shader.meta │ ├── Resources.meta │ ├── Resources │ ├── Emitters.meta │ ├── Emitters │ │ ├── Flower.prefab │ │ ├── Flower.prefab.meta │ │ ├── SingleShot.prefab │ │ ├── SingleShot.prefab.meta │ │ ├── Spinner.prefab │ │ ├── Spinner.prefab.meta │ │ ├── Spread.prefab │ │ └── Spread.prefab.meta │ ├── IN foldout focus on-5718.png │ ├── IN foldout focus on-5718.png.meta │ ├── IN foldout focus-6510.png │ ├── IN foldout focus-6510.png.meta │ ├── ProjectilePrefabs.meta │ ├── ProjectilePrefabs │ │ ├── Outline.prefab │ │ ├── Outline.prefab.meta │ │ ├── Projectile 1.prefab │ │ ├── Projectile 1.prefab.meta │ │ ├── ProjectileWithShadow.prefab │ │ └── ProjectileWithShadow.prefab.meta │ ├── ProjectileTypes.meta │ ├── ProjectileTypes │ │ ├── Projectile 1.prefab │ │ ├── Projectile 1.prefab.meta │ │ ├── Projectile 2.prefab │ │ ├── Projectile 2.prefab.meta │ │ ├── ProjectileWithShadow.prefab │ │ └── ProjectileWithShadow.prefab.meta │ ├── ShapeTemplates.meta │ └── ShapeTemplates │ │ ├── CircleShape.prefab │ │ ├── CircleShape.prefab.meta │ │ ├── JGShape.prefab │ │ ├── JGShape.prefab.meta │ │ ├── SquareShape.prefab │ │ └── SquareShape.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ ├── LiquidDemo.unity │ ├── LiquidDemo.unity.meta │ ├── SampleScene.unity │ └── SampleScene.unity.meta │ ├── Scripts.meta │ ├── Scripts │ ├── Attributes.meta │ ├── Attributes │ │ ├── ConditionalFieldAttribute.cs │ │ ├── ConditionalFieldAttribute.cs.meta │ │ ├── FoldAttribute.cs │ │ ├── FoldAttribute.cs.meta │ │ ├── FoldManager.cs │ │ ├── FoldManager.cs.meta │ │ ├── SeperatorAttribute.cs │ │ └── SeperatorAttribute.cs.meta │ ├── Controllers.meta │ ├── Controllers │ │ ├── MouseControl.cs │ │ └── MouseControl.cs.meta │ ├── Core.meta │ ├── Core │ │ ├── Pool.cs │ │ ├── Pool.cs.meta │ │ ├── ProjectileData.cs │ │ ├── ProjectileData.cs.meta │ │ ├── ProjectilePrefab.cs │ │ ├── ProjectilePrefab.cs.meta │ │ ├── ProjectileType.cs │ │ └── ProjectileType.cs.meta │ ├── Editor.meta │ ├── Editor │ │ ├── EditorOverride.cs │ │ └── EditorOverride.cs.meta │ ├── Emitters.meta │ ├── Emitters │ │ ├── ColorPulse.cs │ │ ├── ColorPulse.cs.meta │ │ ├── EmitterGroup.cs │ │ ├── EmitterGroup.cs.meta │ │ ├── EmitterSpoke.cs │ │ ├── EmitterSpoke.cs.meta │ │ ├── ProjectileEmitterAdvanced.cs │ │ ├── ProjectileEmitterAdvanced.cs.meta │ │ ├── ProjectileEmitterBase.cs │ │ ├── ProjectileEmitterBase.cs.meta │ │ ├── ProjectileEmitterBasic.cs │ │ ├── ProjectileEmitterBasic.cs.meta │ │ ├── ProjectileEmitterShape.cs │ │ └── ProjectileEmitterShape.cs.meta │ ├── ProjectileManager.cs │ ├── ProjectileManager.cs.meta │ ├── Renderer.meta │ └── Renderer │ │ ├── IndirectRenderer.cs │ │ └── IndirectRenderer.cs.meta │ ├── Textures.meta │ └── Textures │ ├── CircleGradient.png │ ├── CircleGradient.png.meta │ ├── Square.png │ ├── Square.png.meta │ ├── circlewhite.png │ └── circlewhite.png.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e54d58344d73efe4087b58766d132ac7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3eddcb0a7e512344c827120815e60c82 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Materials/Projectile1Material.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: Projectile1Material 11 | m_Shader: {fileID: 4800000, guid: 18e30b6bf63afa143b99ce9d0ccbb5f9, type: 3} 12 | m_ShaderKeywords: _GLOSSYREFLECTIONS_OFF _SPECULARHIGHLIGHTS_OFF 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _AlphaTex: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _SpecGlossMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | m_Floats: 67 | - PixelSnap: 0 68 | - _BlendOp: 0 69 | - _BumpScale: 1 70 | - _CameraFadingEnabled: 0 71 | - _CameraFarFadeDistance: 2 72 | - _CameraNearFadeDistance: 1 73 | - _ColorMode: 0 74 | - _Cull: 2 75 | - _Cutoff: 0.5 76 | - _DetailNormalMapScale: 1 77 | - _DistortionBlend: 0.5 78 | - _DistortionEnabled: 0 79 | - _DistortionStrength: 1 80 | - _DistortionStrengthScaled: 0 81 | - _DstBlend: 0 82 | - _EmissionEnabled: 0 83 | - _EnableExternalAlpha: 0 84 | - _FlipbookMode: 0 85 | - _GlossMapScale: 1 86 | - _Glossiness: 0.5 87 | - _GlossyReflections: 0 88 | - _LightingEnabled: 0 89 | - _Metallic: 0 90 | - _Mode: 0 91 | - _OcclusionStrength: 1 92 | - _Parallax: 0.02 93 | - _SmoothnessTextureChannel: 0 94 | - _SoftParticlesEnabled: 0 95 | - _SoftParticlesFarFadeDistance: 1 96 | - _SoftParticlesNearFadeDistance: 0 97 | - _SpecularHighlights: 0 98 | - _SrcBlend: 1 99 | - _StaticColor: 0 100 | - _UVSec: 0 101 | - _ZWrite: 1 102 | m_Colors: 103 | - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} 104 | - _Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} 105 | - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0} 106 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 107 | - _Flip: {r: 1, g: 1, b: 1, a: 1} 108 | - _RendererColor: {r: 1, g: 1, b: 1, a: 1} 109 | - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} 110 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 111 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Materials/Projectile1Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97f4f3c99dabeb643ab4fb800af62e7c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Materials/Projectile2Material.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: Projectile2Material 11 | m_Shader: {fileID: 4800000, guid: 18e30b6bf63afa143b99ce9d0ccbb5f9, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _AlphaTex: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _ParallaxMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | m_Floats: 63 | - PixelSnap: 0 64 | - _BumpScale: 1 65 | - _Cutoff: 0.5 66 | - _DetailNormalMapScale: 1 67 | - _DstBlend: 0 68 | - _EnableExternalAlpha: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0.5 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Mode: 0 74 | - _OcclusionStrength: 1 75 | - _Parallax: 0.02 76 | - _SmoothnessTextureChannel: 0 77 | - _SpecularHighlights: 1 78 | - _SrcBlend: 1 79 | - _StaticColor: 0 80 | - _UVSec: 0 81 | - _ZIndex: 0.05 82 | - _ZWrite: 1 83 | m_Colors: 84 | - _Color: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} 85 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 86 | - _Flip: {r: 1, g: 1, b: 1, a: 1} 87 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Materials/Projectile2Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9ccc7b3fa3cadd46906168541af5ce2 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/ProjectileShader.shader: -------------------------------------------------------------------------------- 1 | Shader "ProjectileShader" { 2 | Properties { 3 | _MainTex ("Sprite Texture", 2D) = "white" {} 4 | _Color ("Tint", Color) = (1,1,1,1) 5 | [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 6 | [PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {} 7 | [PerRendererData] _EnableExternalAlpha ("Enable External Alpha", Float) = 0 8 | [PowerSlider(1.0)] _ZIndex("ZIndex", Range(0.01, 1)) = 0.01 9 | } 10 | 11 | SubShader { 12 | Tags { 13 | "Queue"="Transparent" 14 | "IgnoreProjector"="True" 15 | "RenderType"="Transparent" 16 | "PreviewType"="Plane" 17 | "CanUseSpriteAtlas"="True" 18 | } 19 | 20 | Cull Off 21 | Lighting Off 22 | ZWrite On 23 | Blend One OneMinusSrcAlpha 24 | 25 | Pass { 26 | CGPROGRAM 27 | #pragma vertex SpriteVert 28 | #pragma fragment SpriteFrag 29 | #pragma target 2.0 30 | #pragma multi_compile_instancing 31 | #pragma multi_compile _ PIXELSNAP_ON 32 | #pragma multi_compile _ ETC1_EXTERNAL_ALPHA 33 | #pragma instancing_options procedural:setup 34 | 35 | #include "UnityCG.cginc" 36 | 37 | CBUFFER_START(UnityPerDrawSprite) 38 | float _EnableExternalAlpha; 39 | CBUFFER_END 40 | 41 | #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) 42 | StructuredBuffer colorBuffer; 43 | #endif 44 | 45 | #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED 46 | StructuredBuffer positionBuffer; 47 | #endif 48 | 49 | struct appdata_t 50 | { 51 | float4 vertex : POSITION; 52 | float4 color : COLOR; 53 | float2 texcoord : TEXCOORD0; 54 | UNITY_VERTEX_INPUT_INSTANCE_ID 55 | }; 56 | 57 | struct v2f 58 | { 59 | float4 vertex : SV_POSITION; 60 | fixed4 color : COLOR; 61 | float2 texcoord : TEXCOORD0; 62 | UNITY_VERTEX_OUTPUT_STEREO 63 | }; 64 | 65 | fixed _ZIndex; 66 | 67 | void setup() { 68 | #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) 69 | 70 | float4 position = positionBuffer[unity_InstanceID]; 71 | 72 | float cosR = cos(position.w) * position.z; 73 | float sinR = sin(position.w) * position.z; 74 | 75 | unity_ObjectToWorld = float4x4( 76 | cosR, -sinR, 0, position.x, 77 | sinR, cosR, 0, position.y, 78 | 0, 0, 0, -_ZIndex, 79 | 0, 0, 0, 1.00f 80 | ); 81 | 82 | unity_WorldToObject = unity_ObjectToWorld; 83 | unity_WorldToObject._14_24_34 *= -1; 84 | unity_WorldToObject._11_22_33 = 1.0f / unity_WorldToObject._11_22_33; 85 | 86 | #endif 87 | } 88 | 89 | fixed4 _Color; 90 | 91 | v2f SpriteVert(appdata_t IN) 92 | { 93 | v2f OUT; 94 | 95 | UNITY_SETUP_INSTANCE_ID (IN); 96 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT); 97 | 98 | OUT.vertex = UnityObjectToClipPos(IN.vertex); 99 | OUT.texcoord = IN.texcoord; 100 | 101 | #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) 102 | OUT.color = IN.color * colorBuffer[unity_InstanceID]; 103 | #else 104 | OUT.color = IN.color * _Color; 105 | #endif 106 | 107 | #ifdef PIXELSNAP_ON 108 | OUT.vertex = UnityPixelSnap (OUT.vertex); 109 | #endif 110 | 111 | return OUT; 112 | } 113 | 114 | sampler2D _MainTex; 115 | sampler2D _AlphaTex; 116 | 117 | fixed4 SampleSpriteTexture (float2 uv) 118 | { 119 | fixed4 color = tex2D (_MainTex, uv); 120 | 121 | #if ETC1_EXTERNAL_ALPHA 122 | fixed4 alpha = tex2D (_AlphaTex, uv); 123 | color.a = lerp (color.a, alpha.r, _EnableExternalAlpha); 124 | #endif 125 | 126 | return color; 127 | } 128 | 129 | fixed4 SpriteFrag(v2f IN) : SV_Target 130 | { 131 | fixed4 c = SampleSpriteTexture (IN.texcoord) * IN.color; 132 | c.rgb *= c.a; 133 | return c; 134 | } 135 | ENDCG 136 | } 137 | } 138 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/ProjectileShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18e30b6bf63afa143b99ce9d0ccbb5f9 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/ProjectileShader_StaticColor.shader: -------------------------------------------------------------------------------- 1 | Shader "ProjectileShader_StaticColor" { 2 | Properties { 3 | _MainTex ("Sprite Texture", 2D) = "white" {} 4 | _Color ("Tint", Color) = (1,1,1,1) 5 | [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 6 | [PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {} 7 | [PerRendererData] _EnableExternalAlpha ("Enable External Alpha", Float) = 0 8 | [PowerSlider(1.0)] _ZIndex("ZIndex", Range(0.01, 1)) = 0.01 9 | } 10 | 11 | SubShader { 12 | Tags { 13 | "Queue"="Transparent" 14 | "IgnoreProjector"="True" 15 | "RenderType"="Transparent" 16 | "PreviewType"="Plane" 17 | "CanUseSpriteAtlas"="True" 18 | } 19 | 20 | Cull Off 21 | Lighting Off 22 | ZWrite On 23 | Blend One OneMinusSrcAlpha 24 | 25 | Pass { 26 | CGPROGRAM 27 | #pragma vertex SpriteVert 28 | #pragma fragment SpriteFrag 29 | #pragma target 2.0 30 | #pragma multi_compile_instancing 31 | #pragma multi_compile _ PIXELSNAP_ON 32 | #pragma multi_compile _ ETC1_EXTERNAL_ALPHA 33 | #pragma instancing_options procedural:setup 34 | 35 | #include "UnityCG.cginc" 36 | 37 | CBUFFER_START(UnityPerDrawSprite) 38 | float _EnableExternalAlpha; 39 | CBUFFER_END 40 | 41 | #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED 42 | StructuredBuffer positionBuffer; 43 | #endif 44 | 45 | struct appdata_t 46 | { 47 | float4 vertex : POSITION; 48 | float4 color : COLOR; 49 | float2 texcoord : TEXCOORD0; 50 | UNITY_VERTEX_INPUT_INSTANCE_ID 51 | }; 52 | 53 | struct v2f 54 | { 55 | float4 vertex : SV_POSITION; 56 | fixed4 color : COLOR; 57 | float2 texcoord : TEXCOORD0; 58 | UNITY_VERTEX_OUTPUT_STEREO 59 | }; 60 | 61 | fixed _ZIndex; 62 | 63 | void setup() { 64 | #if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) 65 | 66 | float4 position = positionBuffer[unity_InstanceID]; 67 | 68 | float cosR = cos(position.w) * position.z; 69 | float sinR = sin(position.w) * position.z; 70 | 71 | unity_ObjectToWorld = float4x4( 72 | cosR, -sinR, 0, position.x, 73 | sinR, cosR, 0, position.y, 74 | 0, 0, 0, -_ZIndex, 75 | 0, 0, 0, 1.00f 76 | ); 77 | 78 | unity_WorldToObject = unity_ObjectToWorld; 79 | unity_WorldToObject._14_24_34 *= -1; 80 | unity_WorldToObject._11_22_33 = 1.0f / unity_WorldToObject._11_22_33; 81 | 82 | #endif 83 | } 84 | 85 | fixed4 _Color; 86 | 87 | v2f SpriteVert(appdata_t IN) 88 | { 89 | v2f OUT; 90 | 91 | UNITY_SETUP_INSTANCE_ID (IN); 92 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT); 93 | 94 | OUT.vertex = UnityObjectToClipPos(IN.vertex); 95 | OUT.texcoord = IN.texcoord; 96 | 97 | OUT.color = IN.color * _Color; 98 | 99 | #ifdef PIXELSNAP_ON 100 | OUT.vertex = UnityPixelSnap (OUT.vertex); 101 | #endif 102 | 103 | return OUT; 104 | } 105 | 106 | sampler2D _MainTex; 107 | sampler2D _AlphaTex; 108 | 109 | fixed4 SampleSpriteTexture (float2 uv) 110 | { 111 | fixed4 color = tex2D (_MainTex, uv); 112 | 113 | #if ETC1_EXTERNAL_ALPHA 114 | fixed4 alpha = tex2D (_AlphaTex, uv); 115 | color.a = lerp (color.a, alpha.r, _EnableExternalAlpha); 116 | #endif 117 | 118 | return color; 119 | } 120 | 121 | fixed4 SpriteFrag(v2f IN) : SV_Target 122 | { 123 | fixed4 c = SampleSpriteTexture (IN.texcoord) * IN.color; 124 | c.rgb *= c.a; 125 | return c; 126 | } 127 | ENDCG 128 | } 129 | } 130 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/ProjectileShader_StaticColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ebb21ec21bba9f478fdc232b0f6efe6 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e08519de9ba032c4ea44bd54159663b4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e32548793dec774fa695dd837e6d0a1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/Flower.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4116700794453242062 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: 4116700794453242096} 12 | - component: {fileID: 4116700794453242097} 13 | m_Layer: 0 14 | m_Name: Flower 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4116700794453242096 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 4116700794453242062} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: -0.757, y: 0.879, z: 0.956423} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &4116700794453242097 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 4116700794453242062} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: b2bc4bb09dfa0bc4aa26ec6beb158f09, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | ProjectilePrefab: {fileID: 8841699598713729355, guid: 4fedefd988960d247aaa18371098f2c1, 47 | type: 3} 48 | INTERVAL: 0.3 49 | Direction: {x: 1, y: 1} 50 | TimeToLive: 30 51 | Speed: 0.2 52 | MaxSpeed: 10 53 | Scale: 0.08 54 | Color: 55 | serializedVersion: 2 56 | key0: {r: 0.7169812, g: 0.7169812, b: 0.7169812, a: 1} 57 | key1: {r: 0.8396226, g: 0.50016683, b: 0.14653791, a: 1} 58 | key2: {r: 0.91039276, g: 1, b: 0, a: 0} 59 | key3: {r: 0, g: 0, b: 0, a: 0} 60 | key4: {r: 0, g: 0, b: 0, a: 0} 61 | key5: {r: 0, g: 0, b: 0, a: 0} 62 | key6: {r: 0, g: 0, b: 0, a: 0} 63 | key7: {r: 0, g: 0, b: 0, a: 0} 64 | ctime0: 0 65 | ctime1: 30647 66 | ctime2: 65535 67 | ctime3: 0 68 | ctime4: 0 69 | ctime5: 0 70 | ctime6: 0 71 | ctime7: 0 72 | atime0: 0 73 | atime1: 65535 74 | atime2: 0 75 | atime3: 0 76 | atime4: 0 77 | atime5: 0 78 | atime6: 0 79 | atime7: 0 80 | m_Mode: 0 81 | m_NumColorKeys: 3 82 | m_NumAlphaKeys: 2 83 | RotationSpeed: 10 84 | AutoFire: 1 85 | BounceOffSurfaces: 1 86 | CullProjectilesOutsideCameraBounds: 1 87 | CollisionDetection: 1 88 | ProjectilePoolSize: 5000 89 | DrawOutlines: 1 90 | OutlineSize: 0.03 91 | OutlineColor: 92 | serializedVersion: 2 93 | key0: {r: 1, g: 1, b: 1, a: 1} 94 | key1: {r: 1, g: 1, b: 1, a: 1} 95 | key2: {r: 0, g: 0, b: 0, a: 0} 96 | key3: {r: 0, g: 0, b: 0, a: 0} 97 | key4: {r: 0, g: 0, b: 0, a: 0} 98 | key5: {r: 0, g: 0, b: 0, a: 0} 99 | key6: {r: 0, g: 0, b: 0, a: 0} 100 | key7: {r: 0, g: 0, b: 0, a: 0} 101 | ctime0: 0 102 | ctime1: 65535 103 | ctime2: 0 104 | ctime3: 0 105 | ctime4: 0 106 | ctime5: 0 107 | ctime6: 0 108 | ctime7: 0 109 | atime0: 0 110 | atime1: 65535 111 | atime2: 0 112 | atime3: 0 113 | atime4: 0 114 | atime5: 0 115 | atime6: 0 116 | atime7: 0 117 | m_Mode: 0 118 | m_NumColorKeys: 2 119 | m_NumAlphaKeys: 2 120 | Gravity: {x: 0, y: 0} 121 | BounceAbsorbtionY: 0 122 | BounceAbsorbtionX: 0 123 | Acceleration: 0 124 | UseColorPulse: 1 125 | PulseSpeed: 6.71 126 | UseStaticPulse: 0 127 | GroupCount: 4 128 | SpokeCount: 2 129 | SpokeSpacing: 28 130 | MirrorRotation: 1 131 | UseFollowTarget: 0 132 | Target: {fileID: 0} 133 | FollowIntensity: 0.6 134 | UseOutlineColorPulse: 1 135 | OutlinePulseSpeed: 0 136 | UseOutlineStaticPulse: 0 137 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/Flower.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abbb1d180e50df14da03aa479034d459 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/SingleShot.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3453500415576585352 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: 3453500415576585398} 12 | - component: {fileID: 3453500415576585399} 13 | m_Layer: 0 14 | m_Name: SingleShot 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &3453500415576585398 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 3453500415576585352} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: -0.757, y: 0.879, z: 0.956423} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &3453500415576585399 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 3453500415576585352} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: b2bc4bb09dfa0bc4aa26ec6beb158f09, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | ProjectilePrefab: {fileID: 8841699598713729355, guid: 4fedefd988960d247aaa18371098f2c1, 47 | type: 3} 48 | INTERVAL: 0.3 49 | Direction: {x: 1, y: 1} 50 | TimeToLive: 30 51 | Speed: 1.63 52 | MaxSpeed: 10 53 | Scale: 0.08 54 | Color: 55 | serializedVersion: 2 56 | key0: {r: 0.6226415, g: 0, b: 0, a: 1} 57 | key1: {r: 0.3679245, g: 0, b: 0, a: 1} 58 | key2: {r: 0.91039276, g: 1, b: 0, a: 0} 59 | key3: {r: 0, g: 0, b: 0, a: 0} 60 | key4: {r: 0, g: 0, b: 0, a: 0} 61 | key5: {r: 0, g: 0, b: 0, a: 0} 62 | key6: {r: 0, g: 0, b: 0, a: 0} 63 | key7: {r: 0, g: 0, b: 0, a: 0} 64 | ctime0: 0 65 | ctime1: 65535 66 | ctime2: 65535 67 | ctime3: 0 68 | ctime4: 0 69 | ctime5: 0 70 | ctime6: 0 71 | ctime7: 0 72 | atime0: 0 73 | atime1: 65535 74 | atime2: 0 75 | atime3: 0 76 | atime4: 0 77 | atime5: 0 78 | atime6: 0 79 | atime7: 0 80 | m_Mode: 0 81 | m_NumColorKeys: 2 82 | m_NumAlphaKeys: 2 83 | RotationSpeed: 0 84 | AutoFire: 1 85 | BounceOffSurfaces: 1 86 | CullProjectilesOutsideCameraBounds: 1 87 | CollisionDetection: 1 88 | ProjectilePoolSize: 5000 89 | DrawOutlines: 1 90 | OutlineSize: 0.03 91 | OutlineColor: 92 | serializedVersion: 2 93 | key0: {r: 0.7169812, g: 0.7169812, b: 0.7169812, a: 1} 94 | key1: {r: 0.8396226, g: 0.50016683, b: 0.14653791, a: 1} 95 | key2: {r: 0.91039276, g: 1, b: 0, a: 0} 96 | key3: {r: 0, g: 0, b: 0, a: 0} 97 | key4: {r: 0, g: 0, b: 0, a: 0} 98 | key5: {r: 0, g: 0, b: 0, a: 0} 99 | key6: {r: 0, g: 0, b: 0, a: 0} 100 | key7: {r: 0, g: 0, b: 0, a: 0} 101 | ctime0: 0 102 | ctime1: 30647 103 | ctime2: 65535 104 | ctime3: 0 105 | ctime4: 0 106 | ctime5: 0 107 | ctime6: 0 108 | ctime7: 0 109 | atime0: 0 110 | atime1: 65535 111 | atime2: 0 112 | atime3: 0 113 | atime4: 0 114 | atime5: 0 115 | atime6: 0 116 | atime7: 0 117 | m_Mode: 0 118 | m_NumColorKeys: 3 119 | m_NumAlphaKeys: 2 120 | Gravity: {x: 0, y: 0} 121 | BounceAbsorbtionY: 0 122 | BounceAbsorbtionX: 0 123 | Acceleration: 0 124 | UseColorPulse: 1 125 | PulseSpeed: 25 126 | UseStaticPulse: 1 127 | GroupCount: 1 128 | SpokeCount: 1 129 | SpokeSpacing: 1 130 | MirrorRotation: 0 131 | UseFollowTarget: 0 132 | Target: {fileID: 0} 133 | FollowIntensity: 0.6 134 | UseOutlineColorPulse: 1 135 | OutlinePulseSpeed: 0 136 | UseOutlineStaticPulse: 0 137 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/SingleShot.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ffa35d3cefc3894c8637e5fe90f0cc1 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/Spinner.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5656796718786279399 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: 5656796718786279385} 12 | - component: {fileID: 5656796718786279384} 13 | m_Layer: 0 14 | m_Name: Spinner 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &5656796718786279385 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5656796718786279399} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 2.66, y: 1.35, z: 0.956423} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &5656796718786279384 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 5656796718786279399} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: b2bc4bb09dfa0bc4aa26ec6beb158f09, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | TimeToLive: 15 47 | Direction: {x: 0, y: 1} 48 | Color: 49 | serializedVersion: 2 50 | key0: {r: 0.8867924, g: 0.545715, b: 0, a: 1} 51 | key1: {r: 0.0754717, g: 0.0754717, b: 0.0754717, a: 1} 52 | key2: {r: 0, g: 0, b: 0, a: 0} 53 | key3: {r: 0, g: 0, b: 0, a: 0} 54 | key4: {r: 0, g: 0, b: 0, a: 0} 55 | key5: {r: 0, g: 0, b: 0, a: 0} 56 | key6: {r: 0, g: 0, b: 0, a: 0} 57 | key7: {r: 0, g: 0, b: 0, a: 0} 58 | ctime0: 0 59 | ctime1: 65535 60 | ctime2: 0 61 | ctime3: 0 62 | ctime4: 0 63 | ctime5: 0 64 | ctime6: 0 65 | ctime7: 0 66 | atime0: 0 67 | atime1: 65535 68 | atime2: 0 69 | atime3: 0 70 | atime4: 0 71 | atime5: 0 72 | atime6: 0 73 | atime7: 0 74 | m_Mode: 0 75 | m_NumColorKeys: 2 76 | m_NumAlphaKeys: 2 77 | INTERVAL: 0.1 78 | Speed: 1 79 | Acceleration: 0 80 | Scale: 0.05 81 | RotationSpeed: 6 82 | BounceOffSurfaces: 1 83 | ProjectileType: {fileID: 545596377748671019, guid: 70930bc239ea32b44a88214c58f621a1, 84 | type: 3} 85 | GroupCount: 3 86 | SpokeCount: 5 87 | SpokeSpacing: 13.7 88 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/Spinner.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5de2ec52633851489395577541c20f5 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/Spread.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5637193097534451155 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: 5637193097534451153} 12 | - component: {fileID: 5637193097534451152} 13 | m_Layer: 0 14 | m_Name: Spread 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &5637193097534451153 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5637193097534451155} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: -2.72, y: -1.59, z: -0.9884469} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &5637193097534451152 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 5637193097534451155} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: b2bc4bb09dfa0bc4aa26ec6beb158f09, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | TimeToLive: 15 47 | Direction: {x: 0, y: 1} 48 | Color: 49 | serializedVersion: 2 50 | key0: {r: 0.87652814, g: 0.8962264, b: 0, a: 1} 51 | key1: {r: 0, g: 0, b: 0, a: 1} 52 | key2: {r: 0, g: 0, b: 0, a: 0} 53 | key3: {r: 0, g: 0, b: 0, a: 0} 54 | key4: {r: 0, g: 0, b: 0, a: 0} 55 | key5: {r: 0, g: 0, b: 0, a: 0} 56 | key6: {r: 0, g: 0, b: 0, a: 0} 57 | key7: {r: 0, g: 0, b: 0, a: 0} 58 | ctime0: 0 59 | ctime1: 65535 60 | ctime2: 0 61 | ctime3: 0 62 | ctime4: 0 63 | ctime5: 0 64 | ctime6: 0 65 | ctime7: 0 66 | atime0: 0 67 | atime1: 65535 68 | atime2: 0 69 | atime3: 0 70 | atime4: 0 71 | atime5: 0 72 | atime6: 0 73 | atime7: 0 74 | m_Mode: 0 75 | m_NumColorKeys: 2 76 | m_NumAlphaKeys: 2 77 | INTERVAL: 0.1 78 | Speed: 1 79 | Acceleration: 0 80 | Scale: 0.05 81 | RotationSpeed: 0 82 | BounceOffSurfaces: 1 83 | ProjectileType: {fileID: 0} 84 | GroupCount: 1 85 | SpokeCount: 10 86 | SpokeSpacing: 10 87 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/Emitters/Spread.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3901bae36dc6884da48a493d489cb35 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/IN foldout focus on-5718.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongallant/Unity-Bullet-Hell/547c67323fad0d599c1477066181471f486da1cc/Assets/Unity-Bullet-Hell/Resources/IN foldout focus on-5718.png -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/IN foldout focus on-5718.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07896d08487bbb049b494e9e216360ad 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: -1 37 | mipBias: -100 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: -1 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 1 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 1 54 | spriteTessellationDetail: -1 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 1 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 1 78 | - serializedVersion: 3 79 | buildTarget: Standalone 80 | maxTextureSize: 2048 81 | resizeAlgorithm: 0 82 | textureFormat: -1 83 | textureCompression: 1 84 | compressionQuality: 50 85 | crunchedCompression: 0 86 | allowsAlphaSplitting: 0 87 | overridden: 0 88 | androidETC2FallbackOverride: 0 89 | forceMaximumCompressionQuality_BC6H_BC7: 1 90 | - serializedVersion: 3 91 | buildTarget: WebGL 92 | maxTextureSize: 2048 93 | resizeAlgorithm: 0 94 | textureFormat: -1 95 | textureCompression: 1 96 | compressionQuality: 50 97 | crunchedCompression: 0 98 | allowsAlphaSplitting: 0 99 | overridden: 0 100 | androidETC2FallbackOverride: 0 101 | forceMaximumCompressionQuality_BC6H_BC7: 1 102 | spriteSheet: 103 | serializedVersion: 2 104 | sprites: [] 105 | outline: [] 106 | physicsShape: [] 107 | bones: [] 108 | spriteID: 5e97eb03825dee720800000000000000 109 | internalID: 0 110 | vertices: [] 111 | indices: 112 | edges: [] 113 | weights: [] 114 | secondaryTextures: [] 115 | spritePackingTag: 116 | pSDRemoveMatte: 0 117 | pSDShowRemoveMatteOption: 0 118 | userData: 119 | assetBundleName: 120 | assetBundleVariant: 121 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/IN foldout focus-6510.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongallant/Unity-Bullet-Hell/547c67323fad0d599c1477066181471f486da1cc/Assets/Unity-Bullet-Hell/Resources/IN foldout focus-6510.png -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/IN foldout focus-6510.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 795626f49ade9024a86e0c1a58aa004b 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 0 36 | aniso: -1 37 | mipBias: -100 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: -1 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 1 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 1 54 | spriteTessellationDetail: -1 55 | textureType: 8 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 1 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 1 78 | - serializedVersion: 3 79 | buildTarget: Standalone 80 | maxTextureSize: 2048 81 | resizeAlgorithm: 0 82 | textureFormat: -1 83 | textureCompression: 1 84 | compressionQuality: 50 85 | crunchedCompression: 0 86 | allowsAlphaSplitting: 0 87 | overridden: 0 88 | androidETC2FallbackOverride: 0 89 | forceMaximumCompressionQuality_BC6H_BC7: 1 90 | - serializedVersion: 3 91 | buildTarget: WebGL 92 | maxTextureSize: 2048 93 | resizeAlgorithm: 0 94 | textureFormat: -1 95 | textureCompression: 1 96 | compressionQuality: 50 97 | crunchedCompression: 0 98 | allowsAlphaSplitting: 0 99 | overridden: 0 100 | androidETC2FallbackOverride: 0 101 | forceMaximumCompressionQuality_BC6H_BC7: 1 102 | spriteSheet: 103 | serializedVersion: 2 104 | sprites: [] 105 | outline: [] 106 | physicsShape: [] 107 | bones: [] 108 | spriteID: 5e97eb03825dee720800000000000000 109 | internalID: 0 110 | vertices: [] 111 | indices: 112 | edges: [] 113 | weights: [] 114 | secondaryTextures: [] 115 | spritePackingTag: 116 | pSDRemoveMatte: 0 117 | pSDShowRemoveMatteOption: 0 118 | userData: 119 | assetBundleName: 120 | assetBundleVariant: 121 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65d216c667d5a53409659a7a8c389a65 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs/Outline.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &9078202255659004729 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: 8340221231775535798} 12 | - component: {fileID: 7946185625395132580} 13 | m_Layer: 0 14 | m_Name: Outline 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &8340221231775535798 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 9078202255659004729} 27 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &7946185625395132580 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 9078202255659004729} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 1372cc78658a0c840b3ae45ca69dc32e, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | Texture: {fileID: 0} 47 | Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 48 | ZIndez: 0 49 | PixelSnap: 0 50 | StaticColor: 0 51 | Color: {r: 0, g: 0, b: 0, a: 0} 52 | MaxProjectileCount: 50000 53 | Outline: {fileID: 0} 54 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs/Outline.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37c8dfb28b3db6442a984cbbd84fbe90 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs/Projectile 1.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8915451977496097697 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: 8436723084842580069} 12 | - component: {fileID: 6229722539795054817} 13 | m_Layer: 0 14 | m_Name: Projectile 1 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &8436723084842580069 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 8915451977496097697} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: -3.8598063, y: 0.36934716, z: -0.91796875} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &6229722539795054817 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 8915451977496097697} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 1372cc78658a0c840b3ae45ca69dc32e, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | Texture: {fileID: 0} 47 | Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 48 | ZIndez: 0 49 | PixelSnap: 0 50 | StaticColor: 0 51 | Color: {r: 0, g: 0, b: 0, a: 0} 52 | MaxProjectileCount: 50000 53 | Outline: {fileID: 0} 54 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs/Projectile 1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a7afad562aa38c49a4365e8c56bdedd 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs/ProjectileWithShadow.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1392230877552907710 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: 1392230877552907708} 12 | - component: {fileID: 8841699598713729355} 13 | m_Layer: 0 14 | m_Name: ProjectileWithShadow 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1392230877552907708 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 1392230877552907710} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 1.2799948, y: 1.5716133, z: 0.16089734} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &8841699598713729355 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 1392230877552907710} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 1372cc78658a0c840b3ae45ca69dc32e, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | Texture: {fileID: 0} 47 | Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 48 | ZIndez: 0.03 49 | PixelSnap: 1 50 | StaticColor: 0 51 | Color: {r: 0, g: 0, b: 0, a: 0} 52 | MaxProjectileCount: 50000 53 | Outline: {fileID: 7946185625395132580, guid: 37c8dfb28b3db6442a984cbbd84fbe90, type: 3} 54 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectilePrefabs/ProjectileWithShadow.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f551be8e27b097479e5473b72406f5b 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdd003754b3fad9439a23fdec7292259 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes/Projectile 1.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8915451977496097697 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: 8436723084842580069} 12 | - component: {fileID: 545596377748671019} 13 | m_Layer: 0 14 | m_Name: Projectile 1 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &8436723084842580069 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 8915451977496097697} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: -3.8598063, y: 0.36934716, z: -0.91796875} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &545596377748671019 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 8915451977496097697} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 33f0bbd617478444e885e632f29f78dd, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | BufferIndex: 0 47 | Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 48 | Material: {fileID: 0} 49 | MaxProjectileCount: 50000 50 | ActiveProjectileCount: 0 51 | Shadow: {fileID: 0} 52 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes/Projectile 1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bf517a598120a448ae6548d712261ca 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes/Projectile 2.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5453279212770597779 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: 5453279212770597777} 12 | - component: {fileID: 5453279212770597778} 13 | m_Layer: 0 14 | m_Name: Projectile 2 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &5453279212770597777 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5453279212770597779} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0.0032426454, y: -0.3808337, z: -0.91796875} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &5453279212770597778 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 5453279212770597779} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: 33f0bbd617478444e885e632f29f78dd, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | BufferIndex: 1 47 | Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 48 | Material: {fileID: 0} 49 | MaxProjectileCount: 20000 50 | ActiveProjectileCount: 0 51 | Shadow: {fileID: 0} 52 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes/Projectile 2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8742c1fcd899944dad57725c7753227 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes/ProjectileWithShadow.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1392230877552907710 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: 1392230877552907708} 12 | - component: {fileID: 1392230877552907709} 13 | m_Layer: 0 14 | m_Name: ProjectileWithShadow 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1392230877552907708 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 1392230877552907710} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 1.2799948, y: 1.5716133, z: 0.16089734} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: 31 | - {fileID: 2691168547400493628} 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!114 &1392230877552907709 36 | MonoBehaviour: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 1392230877552907710} 42 | m_Enabled: 1 43 | m_EditorHideFlags: 0 44 | m_Script: {fileID: 11500000, guid: 33f0bbd617478444e885e632f29f78dd, type: 3} 45 | m_Name: 46 | m_EditorClassIdentifier: 47 | BufferIndex: 0 48 | Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 49 | Material: {fileID: 0} 50 | MaxProjectileCount: 50000 51 | ActiveProjectileCount: 0 52 | Border: {fileID: 8045426002043853702} 53 | --- !u!1 &3106032760814308275 54 | GameObject: 55 | m_ObjectHideFlags: 0 56 | m_CorrespondingSourceObject: {fileID: 0} 57 | m_PrefabInstance: {fileID: 0} 58 | m_PrefabAsset: {fileID: 0} 59 | serializedVersion: 6 60 | m_Component: 61 | - component: {fileID: 2691168547400493628} 62 | - component: {fileID: 8045426002043853702} 63 | m_Layer: 0 64 | m_Name: Shadow 65 | m_TagString: Untagged 66 | m_Icon: {fileID: 0} 67 | m_NavMeshLayer: 0 68 | m_StaticEditorFlags: 0 69 | m_IsActive: 1 70 | --- !u!4 &2691168547400493628 71 | Transform: 72 | m_ObjectHideFlags: 0 73 | m_CorrespondingSourceObject: {fileID: 0} 74 | m_PrefabInstance: {fileID: 0} 75 | m_PrefabAsset: {fileID: 0} 76 | m_GameObject: {fileID: 3106032760814308275} 77 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 78 | m_LocalPosition: {x: 0, y: 0, z: 0} 79 | m_LocalScale: {x: 1, y: 1, z: 1} 80 | m_Children: [] 81 | m_Father: {fileID: 1392230877552907708} 82 | m_RootOrder: 0 83 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 84 | --- !u!114 &8045426002043853702 85 | MonoBehaviour: 86 | m_ObjectHideFlags: 0 87 | m_CorrespondingSourceObject: {fileID: 0} 88 | m_PrefabInstance: {fileID: 0} 89 | m_PrefabAsset: {fileID: 0} 90 | m_GameObject: {fileID: 3106032760814308275} 91 | m_Enabled: 1 92 | m_EditorHideFlags: 0 93 | m_Script: {fileID: 11500000, guid: 33f0bbd617478444e885e632f29f78dd, type: 3} 94 | m_Name: 95 | m_EditorClassIdentifier: 96 | BufferIndex: 0 97 | Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 98 | Material: {fileID: 0} 99 | MaxProjectileCount: 1000 100 | ActiveProjectileCount: 0 101 | Border: {fileID: 0} 102 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ProjectileTypes/ProjectileWithShadow.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1db2a9208345784ebb02f8511a6a3cf 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ShapeTemplates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22c088c35ddb3ee4f87b03b849bce975 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ShapeTemplates/CircleShape.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adf737e987110c84ca7b24d66de867cb 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ShapeTemplates/JGShape.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 271a8598a6f273b4b804d5ac6c481abf 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Resources/ShapeTemplates/SquareShape.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75f953dc66ad6f347baca45d9722f1f0 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da0bce729248ddf4c93a3f99e51d2b45 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scenes/LiquidDemo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 979ba1d655ce5414db22c8ff9a875bca 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1070b9e9ead88e48a9e88484e2ede86 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a69256217ba25f438aef685b909438f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ae641d111120a541a789855d300c55d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/ConditionalFieldAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using System.Collections.ObjectModel; 6 | using System.Reflection; 7 | 8 | namespace BulletHell 9 | { 10 | /// 11 | /// Conditionally Show/Hide field in inspector, based on some other field value 12 | /// 13 | [AttributeUsage(AttributeTargets.Field)] 14 | public class ConditionalFieldAttribute : PropertyAttribute 15 | { 16 | public readonly string FieldToCheck; 17 | public readonly string[] CompareValues; 18 | public readonly bool Inverse; 19 | 20 | /// String name of field to check value 21 | /// Inverse check result 22 | /// On which values field will be shown in inspector 23 | public ConditionalFieldAttribute(string fieldToCheck, bool inverse = false, params object[] compareValues) 24 | { 25 | FieldToCheck = fieldToCheck; 26 | Inverse = inverse; 27 | CompareValues = compareValues.Select(c => c.ToString().ToUpper()).ToArray(); 28 | } 29 | } 30 | } 31 | 32 | #if UNITY_EDITOR 33 | namespace BulletHell 34 | { 35 | using UnityEditor; 36 | 37 | [CustomPropertyDrawer(typeof(ConditionalFieldAttribute))] 38 | public class ConditionalFieldAttributeDrawer : PropertyDrawer 39 | { 40 | private ConditionalFieldAttribute _attribute; 41 | 42 | private bool _customDrawersCached; 43 | private static IEnumerable _typesCache; 44 | private bool _multipleAttributes; 45 | private bool _specialType; 46 | private PropertyAttribute _genericAttribute; 47 | private PropertyDrawer _genericDrawerInstance; 48 | private Type _genericDrawerType; 49 | private Type _genericType; 50 | private PropertyDrawer _genericTypeDrawerInstance; 51 | private Type _genericTypeDrawerType; 52 | 53 | 54 | /// 55 | /// If conditional is part of type in collection, we need to link properties as in collection 56 | /// 57 | private readonly Dictionary _conditionalToTarget = 58 | new Dictionary(); 59 | private bool _toShow = true; 60 | 61 | 62 | private void Initialize(SerializedProperty property) 63 | { 64 | if (_attribute == null) _attribute = attribute as ConditionalFieldAttribute; 65 | if (_attribute == null) return; 66 | 67 | if (!_conditionalToTarget.ContainsKey(property)) 68 | _conditionalToTarget.Add(property, ConditionalFieldUtility.FindRelativeProperty(property, _attribute.FieldToCheck)); 69 | 70 | 71 | if (_customDrawersCached) return; 72 | if (_typesCache == null) 73 | { 74 | _typesCache = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes()) 75 | .Where(x => typeof(PropertyDrawer).IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract); 76 | } 77 | 78 | if (fieldInfo.GetCustomAttributes(typeof(PropertyAttribute), false).Count() > 1) 79 | { 80 | _multipleAttributes = true; 81 | GetPropertyDrawerType(property); 82 | } 83 | else if (!fieldInfo.FieldType.Module.ScopeName.Equals(typeof(int).Module.ScopeName)) 84 | { 85 | _specialType = true; 86 | GetTypeDrawerType(property); 87 | } 88 | 89 | _customDrawersCached = true; 90 | } 91 | 92 | 93 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 94 | { 95 | Initialize(property); 96 | 97 | _toShow = ConditionalFieldUtility.PropertyIsVisible(_conditionalToTarget[property], _attribute.Inverse, _attribute.CompareValues); 98 | if (!_toShow) return 0; 99 | 100 | if (_genericDrawerInstance != null) 101 | return _genericDrawerInstance.GetPropertyHeight(property, label); 102 | if (_genericTypeDrawerInstance != null) 103 | return _genericTypeDrawerInstance.GetPropertyHeight(property, label); 104 | return EditorGUI.GetPropertyHeight(property); 105 | } 106 | 107 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) 108 | { 109 | if (!_toShow) return; 110 | 111 | if (_multipleAttributes && _genericDrawerInstance != null) 112 | { 113 | try 114 | { 115 | _genericDrawerInstance.OnGUI(position, property, label); 116 | } 117 | catch (Exception e) 118 | { 119 | EditorGUI.PropertyField(position, property, label); 120 | LogWarning("Unable to instantiate " + _genericAttribute.GetType() + " : " + e, property); 121 | } 122 | } 123 | else if (_specialType && _genericTypeDrawerInstance != null) 124 | { 125 | try 126 | { 127 | _genericTypeDrawerInstance.OnGUI(position, property, label); 128 | } 129 | catch (Exception e) 130 | { 131 | EditorGUI.PropertyField(position, property, label); 132 | LogWarning("Unable to instantiate " + _genericType + " : " + e, property); 133 | } 134 | } 135 | else 136 | { 137 | EditorGUI.PropertyField(position, property, label); 138 | } 139 | } 140 | 141 | private void LogWarning(string log, SerializedProperty property) 142 | { 143 | var warning = "Property " + fieldInfo.Name + ""; 144 | if (fieldInfo.DeclaringType != null) warning += " on behaviour " + fieldInfo.DeclaringType.Name + ""; 145 | warning += " caused: " + log; 146 | } 147 | 148 | 149 | #region Get Custom Property/Type drawers 150 | 151 | private void GetPropertyDrawerType(SerializedProperty property) 152 | { 153 | if (_genericDrawerInstance != null) return; 154 | 155 | //Get the second attribute flag 156 | try 157 | { 158 | _genericAttribute = (PropertyAttribute)fieldInfo.GetCustomAttributes(typeof(PropertyAttribute), false)[1]; 159 | 160 | if (_genericAttribute is ContextMenuItemAttribute) 161 | { 162 | LogWarning("[ConditionalField] does not work with " + _genericAttribute.GetType(), property); 163 | return; 164 | } 165 | 166 | if (_genericAttribute is TooltipAttribute) return; 167 | } 168 | catch (Exception e) 169 | { 170 | LogWarning("Can't find stacked propertyAttribute after ConditionalProperty: " + e, property); 171 | return; 172 | } 173 | 174 | //Get the associated attribute drawer 175 | try 176 | { 177 | _genericDrawerType = _typesCache.First(x => 178 | (Type)CustomAttributeData.GetCustomAttributes(x).First().ConstructorArguments.First().Value == _genericAttribute.GetType()); 179 | } 180 | catch (Exception e) 181 | { 182 | LogWarning("Can't find property drawer from CustomPropertyAttribute of " + _genericAttribute.GetType() + " : " + e, property); 183 | return; 184 | } 185 | 186 | //Create instances of each (including the arguments) 187 | try 188 | { 189 | _genericDrawerInstance = (PropertyDrawer)Activator.CreateInstance(_genericDrawerType); 190 | //Get arguments 191 | IList attributeParams = fieldInfo.GetCustomAttributesData()[1].ConstructorArguments; 192 | IList unpackedParams = new List(); 193 | //Unpack any params object[] args 194 | foreach (CustomAttributeTypedArgument singleParam in attributeParams) 195 | { 196 | if (singleParam.Value.GetType() == typeof(ReadOnlyCollection)) 197 | { 198 | foreach (CustomAttributeTypedArgument unpackedSingleParam in (ReadOnlyCollection)singleParam 199 | .Value) 200 | { 201 | unpackedParams.Add(unpackedSingleParam); 202 | } 203 | } 204 | else 205 | { 206 | unpackedParams.Add(singleParam); 207 | } 208 | } 209 | 210 | object[] attributeParamsObj = unpackedParams.Select(x => x.Value).ToArray(); 211 | 212 | if (attributeParamsObj.Any()) 213 | { 214 | _genericAttribute = (PropertyAttribute)Activator.CreateInstance(_genericAttribute.GetType(), attributeParamsObj); 215 | } 216 | else 217 | { 218 | _genericAttribute = (PropertyAttribute)Activator.CreateInstance(_genericAttribute.GetType()); 219 | } 220 | } 221 | catch (Exception e) 222 | { 223 | LogWarning("No constructor available in " + _genericAttribute.GetType() + " : " + e, property); 224 | return; 225 | } 226 | 227 | //Reassign the attribute field in the drawer so it can access the argument values 228 | try 229 | { 230 | _genericDrawerType.GetField("m_Attribute", BindingFlags.Instance | BindingFlags.NonPublic) 231 | .SetValue(_genericDrawerInstance, _genericAttribute); 232 | } 233 | catch (Exception e) 234 | { 235 | LogWarning("Unable to assign attribute to " + _genericDrawerInstance.GetType() + " : " + e, property); 236 | } 237 | } 238 | 239 | 240 | private void GetTypeDrawerType(SerializedProperty property) 241 | { 242 | if (_genericTypeDrawerInstance != null) return; 243 | 244 | //Get the type 245 | _genericType = fieldInfo.FieldType; 246 | 247 | var _genericObject = fieldInfo; 248 | 249 | //Get the associated attribute drawer 250 | try 251 | { 252 | _genericTypeDrawerType = _typesCache.First(x => 253 | (Type)CustomAttributeData.GetCustomAttributes(x).First().ConstructorArguments.First().Value == _genericType); 254 | } 255 | catch (Exception) 256 | { 257 | // Commented out because of multiple false warnings on Behaviour types 258 | //LogWarning("[ConditionalField] does not work with "+_genericType+". Unable to find property drawer from the Type", property); 259 | return; 260 | } 261 | 262 | //Create instances of each (including the arguments) 263 | try 264 | { 265 | _genericTypeDrawerInstance = (PropertyDrawer)Activator.CreateInstance(_genericTypeDrawerType); 266 | } 267 | catch (Exception e) 268 | { 269 | LogWarning("no constructor available in " + _genericType + " : " + e, property); 270 | return; 271 | } 272 | 273 | //Reassign the attribute field in the drawer so it can access the argument values 274 | try 275 | { 276 | _genericTypeDrawerType.GetField("m_Attribute", BindingFlags.Instance | BindingFlags.NonPublic) 277 | .SetValue(_genericTypeDrawerInstance, _genericObject); 278 | } 279 | catch (Exception) 280 | { 281 | //LogWarning("Unable to assign attribute to " + _genericTypeDrawerInstance.GetType() + " : " + e, property); 282 | } 283 | } 284 | 285 | #endregion 286 | } 287 | 288 | public static class ConditionalFieldUtility 289 | { 290 | #region Property Is Visible 291 | 292 | public static bool PropertyIsVisible(SerializedProperty property, bool inverse, string[] compareAgainst) 293 | { 294 | if (property == null) return true; 295 | 296 | string asString = SerializedPropertyAsStringValue(property).ToUpper(); 297 | 298 | if (compareAgainst != null && compareAgainst.Length > 0) 299 | { 300 | var matchAny = CompareAgainstValues(asString, compareAgainst); 301 | if (inverse) matchAny = !matchAny; 302 | return matchAny; 303 | } 304 | 305 | bool someValueAssigned = asString != "FALSE" && asString != "0" && asString != "NULL"; 306 | if (someValueAssigned) return !inverse; 307 | 308 | return inverse; 309 | } 310 | 311 | /// 312 | /// True if the property value matches any of the values in '_compareValues' 313 | /// 314 | private static bool CompareAgainstValues(string propertyValueAsString, string[] compareAgainst) 315 | { 316 | for (var i = 0; i < compareAgainst.Length; i++) 317 | { 318 | bool valueMatches = compareAgainst[i] == propertyValueAsString; 319 | 320 | // One of the value is equals to the property value. 321 | if (valueMatches) return true; 322 | } 323 | 324 | // None of the value is equals to the property value. 325 | return false; 326 | } 327 | 328 | #endregion 329 | 330 | 331 | #region Find Relative Property 332 | 333 | public static SerializedProperty FindRelativeProperty(SerializedProperty property, string propertyName) 334 | { 335 | if (property.depth == 0) return property.serializedObject.FindProperty(propertyName); 336 | 337 | var path = property.propertyPath.Replace(".Array.data[", "["); 338 | var elements = path.Split('.'); 339 | 340 | var nestedProperty = NestedPropertyOrigin(property, elements); 341 | 342 | // if nested property is null = we hit an array property 343 | if (nestedProperty == null) 344 | { 345 | var cleanPath = path.Substring(0, path.IndexOf('[')); 346 | var arrayProp = property.serializedObject.FindProperty(cleanPath); 347 | var target = arrayProp.serializedObject.targetObject; 348 | 349 | var who = "Property " + arrayProp.name + " in object " + target.name + " caused: "; 350 | var warning = who + "Array fields is not supported by [ConditionalFieldAttribute]"; 351 | 352 | return null; 353 | } 354 | 355 | return nestedProperty.FindPropertyRelative(propertyName); 356 | } 357 | 358 | // For [Serialized] types with [Conditional] fields 359 | private static SerializedProperty NestedPropertyOrigin(SerializedProperty property, string[] elements) 360 | { 361 | SerializedProperty parent = null; 362 | 363 | for (int i = 0; i < elements.Length - 1; i++) 364 | { 365 | var element = elements[i]; 366 | int index = -1; 367 | if (element.Contains("[")) 368 | { 369 | index = Convert.ToInt32(element.Substring(element.IndexOf("[", StringComparison.Ordinal)) 370 | .Replace("[", "").Replace("]", "")); 371 | element = element.Substring(0, element.IndexOf("[", StringComparison.Ordinal)); 372 | } 373 | 374 | parent = i == 0 375 | ? property.serializedObject.FindProperty(element) 376 | : parent != null 377 | ? parent.FindPropertyRelative(element) 378 | : null; 379 | 380 | if (index >= 0 && parent != null) parent = parent.GetArrayElementAtIndex(index); 381 | } 382 | 383 | return parent; 384 | } 385 | 386 | #endregion 387 | 388 | 389 | #region SerializedPropertyAsStringValue 390 | 391 | private static string SerializedPropertyAsStringValue(SerializedProperty prop) 392 | { 393 | switch (prop.propertyType) 394 | { 395 | case SerializedPropertyType.String: 396 | return prop.stringValue; 397 | 398 | case SerializedPropertyType.Character: 399 | case SerializedPropertyType.Integer: 400 | if (prop.type == "char") return Convert.ToChar(prop.intValue).ToString(); 401 | return prop.intValue.ToString(); 402 | 403 | case SerializedPropertyType.ObjectReference: 404 | return prop.objectReferenceValue != null ? prop.objectReferenceValue.ToString() : "null"; 405 | 406 | case SerializedPropertyType.Boolean: 407 | return prop.boolValue.ToString(); 408 | 409 | case SerializedPropertyType.Enum: 410 | return prop.enumNames[prop.enumValueIndex]; 411 | 412 | default: 413 | return string.Empty; 414 | } 415 | } 416 | 417 | #endregion 418 | 419 | 420 | #region Behaviour Property Is Visible 421 | 422 | public static bool BehaviourPropertyIsVisible(MonoBehaviour behaviour, string propertyName, ConditionalFieldAttribute appliedAttribute) 423 | { 424 | if (string.IsNullOrEmpty(appliedAttribute.FieldToCheck)) return true; 425 | 426 | var so = new SerializedObject(behaviour); 427 | var property = so.FindProperty(propertyName); 428 | var targetProperty = ConditionalFieldUtility.FindRelativeProperty(property, appliedAttribute.FieldToCheck); 429 | 430 | return ConditionalFieldUtility.PropertyIsVisible(targetProperty, appliedAttribute.Inverse, appliedAttribute.CompareValues); 431 | } 432 | 433 | #endregion 434 | } 435 | } 436 | #endif -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/ConditionalFieldAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ded37b79bed9254091e73da64f2d484 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/FoldAttribute.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BulletHell 4 | { 5 | public class FoldoutAttribute : PropertyAttribute 6 | { 7 | public string Id; 8 | public string Name; 9 | public bool FoldEverything; 10 | 11 | public FoldoutAttribute(string name, bool foldEverything = false) 12 | { 13 | this.FoldEverything = foldEverything; 14 | this.Name = name; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/FoldAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbd7a841b9057ba4d843a21268cee34a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/FoldManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | #if UNITY_EDITOR 3 | public static class FoldManager 4 | { 5 | public static bool GetFold(string name) 6 | { 7 | if (!EditorPrefs.HasKey(name)) { 8 | EditorPrefs.SetBool(name, false); 9 | } 10 | 11 | return EditorPrefs.GetBool(name); 12 | } 13 | 14 | public static void SetFold(string name, bool value) 15 | { 16 | EditorPrefs.SetBool(name, value); 17 | } 18 | } 19 | #endif -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/FoldManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98256e103abcd904b94fddd414255b92 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/SeperatorAttribute.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | #if UNITY_EDITOR 4 | using UnityEditor; 5 | #endif 6 | 7 | namespace BulletHell 8 | { 9 | public class SeparatorAttribute : PropertyAttribute 10 | { 11 | public readonly string Title; 12 | public readonly bool WithOffset; 13 | 14 | 15 | public SeparatorAttribute() 16 | { 17 | Title = ""; 18 | } 19 | 20 | public SeparatorAttribute(string title, bool withOffset = false) 21 | { 22 | Title = title; 23 | WithOffset = withOffset; 24 | } 25 | } 26 | } 27 | 28 | #if UNITY_EDITOR 29 | namespace BulletHell 30 | { 31 | [CustomPropertyDrawer(typeof(SeparatorAttribute))] 32 | public class SeparatorAttributeDrawer : DecoratorDrawer 33 | { 34 | private SeparatorAttribute separatorAttribute 35 | { 36 | get { return ((SeparatorAttribute)attribute); } 37 | } 38 | 39 | public override void OnGUI(Rect _position) 40 | { 41 | if (separatorAttribute.Title == "") 42 | { 43 | _position.height = 1; 44 | _position.y += 19; 45 | GUI.Box(_position, ""); 46 | } 47 | else 48 | { 49 | Vector2 textSize = GUI.skin.label.CalcSize(new GUIContent(separatorAttribute.Title)); 50 | float separatorWidth = (_position.width - textSize.x) / 2.0f - 5.0f; 51 | _position.y += 19; 52 | 53 | GUI.Box(new Rect(_position.xMin, _position.yMin, separatorWidth, 1), ""); 54 | GUI.Label(new Rect(_position.xMin + separatorWidth + 5.0f, _position.yMin - 8.0f, textSize.x, 20), separatorAttribute.Title); 55 | GUI.Box(new Rect(_position.xMin + separatorWidth + 10.0f + textSize.x, _position.yMin, separatorWidth, 1), ""); 56 | } 57 | } 58 | 59 | public override float GetHeight() 60 | { 61 | return separatorAttribute.WithOffset ? 36.0f : 26f; 62 | } 63 | } 64 | } 65 | #endif -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Attributes/SeperatorAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d1a98f62068b0e4ca31cd578fefa1c1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Controllers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdc6d6d04f433c543bec5f1e2ccc50bc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Controllers/MouseControl.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using BulletHell; 3 | 4 | public class MouseControl : MonoBehaviour 5 | { 6 | ProjectileEmitterAdvanced Emitter; 7 | Camera Camera; 8 | 9 | float Charge; 10 | float ChargeSpeed = 0.75f; 11 | float MaxCharge = 1f; 12 | float MinCharge = 0.2f; 13 | 14 | GameObject ChargePreview; 15 | 16 | void Awake() 17 | { 18 | Camera = Camera.main; 19 | 20 | Emitter = transform.GetComponent(); 21 | if (Emitter == null) 22 | Debug.Log("MouseControl script must be attached to a gameobject that contains a ProjectileEmitterAdvanced component."); 23 | 24 | ChargePreview = transform.Find("ChargePreview").gameObject; 25 | 26 | Emitter.AutoFire = false; 27 | } 28 | 29 | void Update() 30 | { 31 | Vector2 mousePos = Camera.ScreenToWorldPoint(Input.mousePosition); 32 | 33 | ChargePreview.transform.localScale = new Vector2(Charge, Charge); 34 | 35 | if (Input.GetMouseButton(0)) 36 | { 37 | Charge += ChargeSpeed * Time.deltaTime; 38 | Charge = Mathf.Clamp(Charge, MinCharge, MaxCharge); 39 | } 40 | 41 | if (Input.GetMouseButtonUp(0)) 42 | { 43 | Vector2 direction = mousePos - new Vector2(this.transform.position.x, this.transform.position.y); 44 | Emitter.Scale = Charge / 5f; 45 | Emitter.FireProjectile(direction, 0); 46 | Charge = 0; 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Controllers/MouseControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da2392dc1d1982441a172e0ea4a46256 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dae67b7335f40c64d9d9ed84669fc73f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/Pool.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace BulletHell 4 | { 5 | public class Pool where T : new() 6 | { 7 | public struct Node 8 | { 9 | internal int NodeIndex; 10 | public T Item; 11 | public bool Active; 12 | } 13 | 14 | private Node[] Nodes; 15 | private Queue Available; 16 | 17 | public int ActiveNodes 18 | { 19 | get 20 | { 21 | return Nodes.Length - AvailableCount; 22 | } 23 | } 24 | 25 | public int AvailableCount 26 | { 27 | get { return Available.Count; } 28 | } 29 | 30 | public Pool(int capacity) 31 | { 32 | Nodes = new Node[capacity]; 33 | Available = new Queue(capacity); 34 | 35 | for (int i = 0; i < capacity; i++) 36 | { 37 | Nodes[i] = new Node(); 38 | 39 | Nodes[i].Active = false; 40 | Nodes[i].NodeIndex = i; 41 | Nodes[i].Item = new T(); 42 | 43 | Available.Enqueue(i); 44 | } 45 | } 46 | 47 | public void Clear() 48 | { 49 | Available.Clear(); 50 | for (int i = 0; i < Nodes.Length; i++) 51 | { 52 | Nodes[i].Active = false; 53 | Available.Enqueue(i); 54 | } 55 | } 56 | 57 | public Node GetActive(int index) 58 | { 59 | return Nodes[index]; 60 | } 61 | 62 | public Node Get() 63 | { 64 | int index = Available.Dequeue(); 65 | Nodes[index].Active = true; 66 | return Nodes[index]; 67 | } 68 | 69 | public void Return(int index) 70 | { 71 | if (Nodes[index].Active) 72 | { 73 | Nodes[index].Active = false; 74 | Available.Enqueue(Nodes[index].NodeIndex); 75 | } 76 | } 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/Pool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88d5f315854ef6741bbe9c2676eeb858 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/ProjectileData.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BulletHell 4 | { 5 | public class ProjectileData 6 | { 7 | public Vector2 Velocity; 8 | public float Acceleration; 9 | public Vector2 Gravity; 10 | public Vector2 Position; 11 | public float Rotation; 12 | public Color Color; 13 | public float Scale; 14 | public float TimeToLive; 15 | public float Speed; 16 | 17 | public ColorPulse Pulse; 18 | public ColorPulse OutlinePulse; 19 | 20 | public Transform Target; 21 | public bool FollowTarget; 22 | public float FollowIntensity; 23 | 24 | // Stores the pooled node that is used to draw the shadow for this projectile 25 | public Pool.Node Outline; 26 | } 27 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/ProjectileData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f34718fe030b63438dce5d0d566f502 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/ProjectilePrefab.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace BulletHell 5 | { 6 | public class ProjectilePrefab : MonoBehaviour 7 | { 8 | public int Index { get; protected set; } // To identify the ProjectilePrefab 9 | public int BufferIndex { get; protected set; } // To identify which computebuffer is used for this type 10 | 11 | public Texture Texture; 12 | public Mesh Mesh; 13 | public float ZIndez; 14 | public bool PixelSnap; 15 | 16 | [SerializeField] protected bool StaticColor = false; 17 | [ConditionalField(nameof(StaticColor)), SerializeField] protected Color Color; 18 | [SerializeField, Range(1, 1000000)] private int MaxProjectileCount; 19 | 20 | public bool IsStaticColor { get { return StaticColor; } } 21 | public Material Material { get; protected set; } 22 | 23 | public ProjectilePrefab Outline; 24 | 25 | public void Initialize(int index) 26 | { 27 | Index = index; 28 | 29 | // If no value set for MaxProjectiles default to 50000 30 | if (MaxProjectileCount <= 0) 31 | MaxProjectileCount = 50000; 32 | 33 | if (StaticColor) 34 | Material = new Material(Shader.Find("ProjectileShader_StaticColor")); 35 | else 36 | Material = new Material(Shader.Find("ProjectileShader")); 37 | 38 | Material.enableInstancing = true; 39 | Material.SetColor("_Color", Color); 40 | Material.SetFloat("_ZIndex", ZIndez); 41 | Material.SetFloat("PixelSnap", Convert.ToSingle(PixelSnap)); 42 | 43 | if (Texture != null) 44 | Material.SetTexture("_MainTex", Texture); 45 | } 46 | 47 | public void IncrementBufferIndex() 48 | { 49 | BufferIndex++; 50 | } 51 | 52 | public void ResetBufferIndex() 53 | { 54 | BufferIndex = 0; 55 | } 56 | 57 | public int GetMaxProjectileCount() 58 | { 59 | return MaxProjectileCount; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/ProjectilePrefab.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1372cc78658a0c840b3ae45ca69dc32e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/ProjectileType.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BulletHell 4 | { 5 | public class ProjectileType : MonoBehaviour 6 | { 7 | public int Index { get; private set; } 8 | public int BufferIndex; 9 | public Mesh Mesh; 10 | public Material Material; 11 | public int MaxProjectileCount; 12 | public int ActiveProjectileCount; 13 | 14 | public ProjectileType Border; 15 | 16 | public void Initialize(int index) 17 | { 18 | Index = index; 19 | Material = new Material(Shader.Find("ProjectileShader")); 20 | Material.enableInstancing = true; 21 | Material.SetFloat("_StaticColor", 0); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Core/ProjectileType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33f0bbd617478444e885e632f29f78dd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 538d94bbc253a8748a16860431db280e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Editor/EditorOverride.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using UnityEditor; 6 | using UnityEngine; 7 | using Object = UnityEngine.Object; 8 | 9 | namespace BulletHell 10 | { 11 | [CustomEditor(typeof(Object), true, isFallback = true)] 12 | [CanEditMultipleObjects] 13 | public class EditorOverride : Editor 14 | { 15 | private Dictionary cache = new Dictionary(); 16 | private List props = new List(); 17 | private SerializedProperty propScript; 18 | private Type type; 19 | private int length; 20 | private List objectFields; 21 | private bool initialized; 22 | private Colors colors; 23 | private FoldoutAttribute prevFold; 24 | private GUIStyle style; 25 | 26 | private void Awake() 27 | { 28 | var uiTex_in = Resources.Load("IN foldout focus-6510"); 29 | var uiTex_in_on = Resources.Load("IN foldout focus on-5718"); 30 | 31 | var c_on = Color.white; 32 | 33 | style = new GUIStyle(EditorStyles.foldout); 34 | 35 | style.overflow = new RectOffset(-10, 0, 3, 0); 36 | style.padding = new RectOffset(25, 0, -3, 0); 37 | 38 | style.active.textColor = c_on; 39 | style.active.background = uiTex_in; 40 | style.onActive.textColor = c_on; 41 | style.onActive.background = uiTex_in_on; 42 | 43 | style.focused.textColor = c_on; 44 | style.focused.background = uiTex_in; 45 | style.onFocused.textColor = c_on; 46 | style.onFocused.background = uiTex_in_on; 47 | } 48 | 49 | void OnEnable() 50 | { 51 | bool pro = EditorGUIUtility.isProSkin; 52 | if (!pro) 53 | { 54 | colors = new Colors(); 55 | colors.col0 = new Color(0.2f, 0.2f, 0.2f, 1f); 56 | colors.col1 = new Color(1, 1, 1, 0.55f); 57 | colors.col2 = new Color(0.7f, 0.7f, 0.7f, 1f); 58 | } 59 | else 60 | { 61 | colors = new Colors(); 62 | colors.col0 = new Color(0.2f, 0.2f, 0.2f, 1f); 63 | colors.col1 = new Color(1, 1, 1, 0.1f); 64 | colors.col2 = new Color(0.25f, 0.25f, 0.25f, 1f); 65 | } 66 | 67 | var t = target.GetType(); 68 | var typeTree = t.GetTypeTree(); 69 | 70 | objectFields = target.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).OrderByDescending(x => typeTree.IndexOf(x.DeclaringType)).ToList(); 71 | length = objectFields.Count; 72 | 73 | Repaint(); 74 | initialized = false; 75 | } 76 | 77 | private void OnDisable() 78 | { 79 | foreach (var cach in cache) 80 | { 81 | FoldManager.SetFold(cach.Value.atr.Id, cach.Value.expanded); 82 | cach.Value.Dispose(); 83 | } 84 | } 85 | 86 | public override void OnInspectorGUI() 87 | { 88 | serializedObject.Update(); 89 | 90 | if (!initialized) 91 | { 92 | for (var i = 0; i < length; i++) 93 | { 94 | var fold = Attribute.GetCustomAttribute(objectFields[i], typeof(FoldoutAttribute)) as FoldoutAttribute; 95 | 96 | Cache c; 97 | if (fold == null) 98 | { 99 | if (prevFold != null && prevFold.FoldEverything) 100 | { 101 | if (!cache.TryGetValue(prevFold.Name, out c)) { 102 | cache.Add(prevFold.Name, new Cache {atr = prevFold, types = new HashSet {objectFields[i].Name}}); 103 | cache[prevFold.Name].expanded = FoldManager.GetFold(prevFold.Id); 104 | } 105 | else 106 | { 107 | c.types.Add(objectFields[i].Name); 108 | } 109 | } 110 | continue; 111 | } 112 | 113 | prevFold = fold; 114 | fold.Id = fold.Name + target.GetHashCode().ToString(); 115 | 116 | if (!cache.TryGetValue(fold.Name, out c)) 117 | { 118 | cache.Add(fold.Name, new Cache {atr = fold, types = new HashSet {objectFields[i].Name}}); 119 | cache[prevFold.Name].expanded = FoldManager.GetFold(fold.Id); 120 | } 121 | else 122 | { 123 | c.types.Add(objectFields[i].Name); 124 | } 125 | } 126 | 127 | var property = serializedObject.GetIterator(); 128 | var next = property.NextVisible(true); 129 | if (next) 130 | { 131 | do 132 | { 133 | HandleProp(property); 134 | } while (property.NextVisible(false)); 135 | } 136 | } 137 | 138 | if (props.Count == 0) 139 | { 140 | DrawDefaultInspector(); 141 | return; 142 | } 143 | 144 | initialized = true; 145 | 146 | using (new EditorGUI.DisabledScope("m_Script" == props[0].propertyPath)) 147 | { 148 | EditorGUILayout.PropertyField(props[0], true); 149 | } 150 | 151 | EditorGUILayout.Space(); 152 | 153 | foreach (var pair in cache) 154 | { 155 | var rect = EditorGUILayout.BeginVertical(); 156 | EditorGUILayout.Space(); 157 | EditorGUI.DrawRect(new Rect(rect.x - 1, rect.y - 1, rect.width + 1, rect.height + 1), colors.col0); 158 | EditorGUI.DrawRect(new Rect(rect.x - 1, rect.y - 1, rect.width + 1, rect.height + 1), colors.col1); 159 | 160 | pair.Value.expanded = EditorGUILayout.Foldout(pair.Value.expanded, pair.Value.atr.Name, true, style != null ? style : EditorStyles.foldout); 161 | 162 | EditorGUILayout.EndVertical(); 163 | 164 | rect = EditorGUILayout.BeginVertical(); 165 | 166 | EditorGUI.DrawRect(new Rect(rect.x - 1, rect.y - 1, rect.width + 1, rect.height + 1), colors.col2); 167 | 168 | if (pair.Value.expanded) 169 | { 170 | for (int i = 0; i < pair.Value.props.Count; i++) 171 | { 172 | EditorGUI.indentLevel = 1; 173 | 174 | EditorGUILayout.PropertyField(pair.Value.props[i], 175 | new GUIContent(pair.Value.props[i].name.FirstLetterToUpperCase()), true); 176 | if (i == pair.Value.props.Count - 1) 177 | EditorGUILayout.Space(); 178 | } 179 | } 180 | 181 | EditorGUI.indentLevel = 0; 182 | EditorGUILayout.EndVertical(); 183 | } 184 | 185 | for (var i = 1; i < props.Count; i++) 186 | { 187 | EditorGUILayout.PropertyField(props[i], true); 188 | } 189 | 190 | serializedObject.ApplyModifiedProperties(); 191 | EditorGUILayout.Space(); 192 | } 193 | 194 | public void HandleProp(SerializedProperty prop) 195 | { 196 | bool shouldBeFolded = false; 197 | 198 | foreach (var pair in cache) 199 | { 200 | if (pair.Value.types.Contains(prop.name)) 201 | { 202 | shouldBeFolded = true; 203 | pair.Value.props.Add(prop.Copy()); 204 | 205 | break; 206 | } 207 | } 208 | 209 | if (shouldBeFolded == false) 210 | { 211 | props.Add(prop.Copy()); 212 | } 213 | } 214 | 215 | private struct Colors 216 | { 217 | public Color col0; 218 | public Color col1; 219 | public Color col2; 220 | } 221 | 222 | private class Cache 223 | { 224 | public HashSet types = new HashSet(); 225 | public List props = new List(); 226 | public FoldoutAttribute atr; 227 | public bool expanded; 228 | 229 | public void Dispose() 230 | { 231 | props.Clear(); 232 | types.Clear(); 233 | atr = null; 234 | } 235 | } 236 | } 237 | 238 | public static partial class FrameworkExtensions 239 | { 240 | public static string FirstLetterToUpperCase(this string s) 241 | { 242 | if (string.IsNullOrEmpty(s)) 243 | return string.Empty; 244 | 245 | char[] a = s.ToCharArray(); 246 | a[0] = char.ToUpper(a[0]); 247 | return new string(a); 248 | } 249 | 250 | public static IList GetTypeTree(this Type t) 251 | { 252 | var types = new List(); 253 | while (t.BaseType != null) 254 | { 255 | types.Add(t); 256 | t = t.BaseType; 257 | } 258 | 259 | return types; 260 | } 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Editor/EditorOverride.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64cf0dc6f5150ed4f93b799e6e9c68ef 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d77f36e79372fb94aa66394b2550a00d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ColorPulse.cs: -------------------------------------------------------------------------------- 1 | namespace BulletHell 2 | { 3 | public struct ColorPulse 4 | { 5 | private const float PULSE_TIME = 10; 6 | private float Time; 7 | private bool PulseDown; 8 | 9 | public float Fraction 10 | { 11 | get 12 | { 13 | return Time / PULSE_TIME; 14 | } 15 | } 16 | 17 | public void Update(float tick, float speed) 18 | { 19 | if (PulseDown) 20 | { 21 | Time -= speed * tick; 22 | if (Time <= 0) 23 | { 24 | Time = 0; 25 | PulseDown = false; 26 | } 27 | } 28 | else 29 | { 30 | Time += speed * tick; 31 | if (Time >= PULSE_TIME) 32 | { 33 | Time = PULSE_TIME; 34 | PulseDown = true; 35 | } 36 | } 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ColorPulse.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e93580b701457a341b6f2303d10d7e55 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/EmitterGroup.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BulletHell 4 | { 5 | // Used with ProjectileEmitterFlower to control spoke groupings 6 | public class EmitterGroup 7 | { 8 | public Vector2 Direction; 9 | public int SpokeCount; 10 | public float SpokeSpacing; 11 | public bool InvertRotation; 12 | 13 | public EmitterGroup(Vector2 direction, int spokeCount, float spokeSpacing, bool invertRotation) 14 | { 15 | Set(direction, spokeCount, spokeSpacing, invertRotation); 16 | } 17 | 18 | public void Set(Vector2 direction, int spokeCount, float spokeSpacing, bool invertRotation) 19 | { 20 | Direction = direction; 21 | SpokeCount = spokeCount; 22 | SpokeSpacing = spokeSpacing; 23 | InvertRotation = invertRotation; 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/EmitterGroup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acc3d755689e9ef469f0f2c48a3755de 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/EmitterSpoke.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class EmitterSpoke : MonoBehaviour 4 | { 5 | float Direction; 6 | 7 | void UpdateProjectile() 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/EmitterSpoke.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 878364ecbe2db164b876bb988dbf5b22 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterAdvanced.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2bc4bb09dfa0bc4aa26ec6beb158f09 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterBase.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | 4 | namespace BulletHell 5 | { 6 | public enum CollisionDetectionType 7 | { 8 | Raycast, 9 | CircleCast 10 | }; 11 | 12 | public abstract class ProjectileEmitterBase : MonoBehaviour 13 | { 14 | protected float Interval; 15 | 16 | // Each emitter has its own ProjectileData pool 17 | protected Pool Projectiles; 18 | protected Pool ProjectileOutlines; 19 | 20 | [Foldout("Appearance", true)] 21 | public ProjectilePrefab ProjectilePrefab; 22 | [Range(0.01f, 2f)] public float Scale = 0.05f; 23 | public Gradient Color; 24 | 25 | [Foldout("General", true)] 26 | public float TimeToLive = 5; 27 | [Range(0.01f, 5f)] public float CoolOffTime = 0.1f; 28 | public bool AutoFire = true; 29 | public Vector2 Direction = Vector2.up; 30 | [Range(0.001f, 10f)] public float Speed = 1; 31 | [Range(1f, 100f)] public float MaxSpeed = 100; 32 | public float RotationSpeed = 0; 33 | public CollisionDetectionType CollisionDetection = CollisionDetectionType.CircleCast; 34 | public bool BounceOffSurfaces = true; 35 | public bool CullProjectilesOutsideCameraBounds = true; 36 | public bool IsFixedTimestep = true; 37 | [ConditionalField(nameof(IsFixedTimestep)), Range(0.01f, 0.02f)] public float FixedTimestepRate = 0.01f; 38 | 39 | [Foldout("Outline", true)] 40 | public bool DrawOutlines; 41 | [ConditionalField(nameof(DrawOutlines)), Range(0.0f, 1f)] public float OutlineSize; 42 | [ConditionalField(nameof(DrawOutlines))] public Gradient OutlineColor; 43 | 44 | [Foldout("Modifiers", true)] 45 | public Vector2 Gravity = Vector2.zero; 46 | [Range(0.0f, 1f)] public float BounceAbsorbtionY; 47 | [Range(0.0f, 1f)] public float BounceAbsorbtionX; 48 | [Range(-10f, 10f)] public float Acceleration = 0; 49 | 50 | // Current active projectiles from this emitter 51 | public int ActiveProjectileCount { get; protected set; } 52 | public int ActiveOutlineCount { get; protected set; } 53 | 54 | // Collision layer 55 | protected int LayerMask = 1; 56 | protected RaycastHit2D[] RaycastHitBuffer = new RaycastHit2D[1]; 57 | 58 | // For cull check 59 | protected Plane[] Planes = new Plane[6]; 60 | 61 | protected Camera Camera; 62 | protected ContactFilter2D ContactFilter; 63 | protected ProjectileManager ProjectileManager; 64 | 65 | float Timer = 0; 66 | int ProjectilesWaiting; 67 | protected int[] ActiveProjectileIndexes; 68 | protected int[] PreviousActiveProjectileIndexes; 69 | protected int ActiveProjectileIndexesPosition; 70 | 71 | public void Awake() 72 | { 73 | Interval = CoolOffTime + 0.25f; // Start with a delay to allow time for scene to load 74 | Camera = Camera.main; 75 | 76 | ContactFilter = new ContactFilter2D 77 | { 78 | layerMask = LayerMask, 79 | useTriggers = false, 80 | }; 81 | 82 | ProjectileManager = ProjectileManager.Instance; 83 | 84 | // If projectile type is not set, use default 85 | if (ProjectilePrefab == null) 86 | ProjectilePrefab = ProjectileManager.Instance.GetProjectilePrefab(0); 87 | } 88 | 89 | public void Initialize(int size) 90 | { 91 | Projectiles = new Pool(size); 92 | if (ProjectilePrefab.Outline != null) 93 | { 94 | ProjectileOutlines = new Pool(size); 95 | } 96 | 97 | ActiveProjectileIndexes = new int[size]; 98 | PreviousActiveProjectileIndexes = new int[size]; 99 | } 100 | 101 | public void UpdateEmitter(float tick) 102 | { 103 | if (AutoFire) 104 | { 105 | Interval -= tick; 106 | } 107 | else 108 | { 109 | // not autofire, so just deal with the cooldown 110 | if (Interval > 0) 111 | { 112 | Interval -= tick; 113 | } 114 | } 115 | 116 | 117 | if (IsFixedTimestep) 118 | { 119 | if (AutoFire) 120 | { 121 | // Interval has expired 122 | while (Interval <= 0) 123 | { 124 | Interval += CoolOffTime; 125 | // Fixed timestep, we must wait until next fixed frame to fire projectile 126 | ProjectilesWaiting++; 127 | } 128 | } 129 | 130 | bool updateExecuted = false; 131 | Timer += tick; 132 | 133 | // fixed timestep timer internal loop 134 | while (Timer > FixedTimestepRate) 135 | { 136 | Timer -= FixedTimestepRate; 137 | UpdateProjectiles(FixedTimestepRate); // Must call UpdateProjectiles before firing new projectiles 138 | 139 | if (AutoFire) 140 | { 141 | while (ProjectilesWaiting > 0) 142 | { 143 | ProjectilesWaiting--; 144 | FireProjectile(Direction, ProjectilesWaiting * FixedTimestepRate); 145 | } 146 | } 147 | 148 | updateExecuted = true; 149 | } 150 | 151 | // Update the data buffers 152 | if (!updateExecuted) 153 | UpdateBuffers(tick); // update was not executed so re-use buffers but still remove tick from TTL 154 | else 155 | UpdateBuffers(0); // already removed tick from TTL - don't do it again 156 | } 157 | else 158 | { 159 | // Variable time step -- just update the projectiles with deltatime 160 | UpdateProjectiles(tick); 161 | UpdateBuffers(0); 162 | 163 | if (AutoFire) 164 | { 165 | while (Interval <= 0) 166 | { 167 | float leakedTime = Mathf.Abs(Interval); 168 | Interval += CoolOffTime; 169 | FireProjectile(Direction, leakedTime); 170 | } 171 | } 172 | } 173 | } 174 | 175 | // Function to rotate a vector by x degrees 176 | public static Vector2 Rotate(Vector2 v, float degrees) 177 | { 178 | float sin = Mathf.Sin(degrees * Mathf.Deg2Rad); 179 | float cos = Mathf.Cos(degrees * Mathf.Deg2Rad); 180 | 181 | float tx = v.x; 182 | float ty = v.y; 183 | 184 | v.x = (cos * tx) - (sin * ty); 185 | v.y = (sin * tx) + (cos * ty); 186 | 187 | return v; 188 | } 189 | 190 | public abstract Pool.Node FireProjectile(Vector2 direction, float leakedTime); 191 | 192 | protected abstract void UpdateProjectile(ref Pool.Node node, float tick); 193 | 194 | protected virtual void UpdateProjectiles(float tick) 195 | { 196 | 197 | ActiveProjectileCount = 0; 198 | ActiveOutlineCount = 0; 199 | 200 | //Update camera planes if needed 201 | if (CullProjectilesOutsideCameraBounds) 202 | { 203 | GeometryUtility.CalculateFrustumPlanes(Camera, Planes); 204 | } 205 | 206 | int previousIndexCount = ActiveProjectileIndexesPosition; 207 | ActiveProjectileIndexesPosition = 0; 208 | 209 | // Only loop through currently active projectiles 210 | for (int i = 0; i < PreviousActiveProjectileIndexes.Length - 1; i++) 211 | { 212 | // End of array is set to -1 213 | if (PreviousActiveProjectileIndexes[i] == -1) 214 | break; 215 | 216 | Pool.Node node = Projectiles.GetActive(PreviousActiveProjectileIndexes[i]); 217 | UpdateProjectile(ref node, tick); 218 | 219 | // If still active store in our active projectile collection 220 | if (node.Active) 221 | { 222 | ActiveProjectileIndexes[ActiveProjectileIndexesPosition] = node.NodeIndex; 223 | ActiveProjectileIndexesPosition++; 224 | } 225 | } 226 | 227 | // Set end point of array so we know when to stop looping 228 | ActiveProjectileIndexes[ActiveProjectileIndexesPosition] = -1; 229 | 230 | // Overwrite old previous active projectile index array 231 | System.Array.Copy(ActiveProjectileIndexes, PreviousActiveProjectileIndexes, Mathf.Max(ActiveProjectileIndexesPosition, previousIndexCount)); 232 | } 233 | 234 | protected virtual void UpdateProjectileColor(ref ProjectileData data) 235 | { 236 | data.Color = Color.Evaluate(1 - data.TimeToLive / TimeToLive); 237 | if (data.Outline.Item != null) 238 | { 239 | data.Outline.Item.Color = OutlineColor.Evaluate(1 - data.TimeToLive / TimeToLive); 240 | } 241 | } 242 | 243 | protected void UpdateBuffers(float tick) 244 | { 245 | ActiveProjectileCount = 0; 246 | ActiveOutlineCount = 0; 247 | 248 | for (int i = 0; i < ActiveProjectileIndexes.Length; i++) 249 | { 250 | // End of array is set to -1 251 | if (ActiveProjectileIndexes[i] == -1) 252 | break; 253 | 254 | Pool.Node node = Projectiles.GetActive(ActiveProjectileIndexes[i]); 255 | 256 | node.Item.TimeToLive -= tick; 257 | 258 | ProjectileManager.UpdateBufferData(ProjectilePrefab, node.Item); 259 | ActiveProjectileCount++; 260 | } 261 | 262 | // faster to do two loops than to update the outlines at the same time due to the renderer swapping 263 | for (int i = 0; i < ActiveProjectileIndexes.Length; i++) 264 | { 265 | // End of array is set to -1 266 | if (ActiveProjectileIndexes[i] == -1) 267 | break; 268 | 269 | Pool.Node node = Projectiles.GetActive(ActiveProjectileIndexes[i]); 270 | 271 | //handle outline 272 | if (node.Item.Outline.Item != null) 273 | { 274 | ProjectileManager.UpdateBufferData(ProjectilePrefab.Outline, node.Item.Outline.Item); 275 | ActiveOutlineCount++; 276 | } 277 | } 278 | } 279 | 280 | protected void ReturnNode(Pool.Node node) 281 | { 282 | if (node.Active) 283 | { 284 | node.Item.TimeToLive = -1; 285 | if (node.Item.Outline.Item != null) 286 | { 287 | ProjectileOutlines.Return(node.Item.Outline.NodeIndex); 288 | node.Item.Outline.Item = null; 289 | } 290 | 291 | Projectiles.Return(node.NodeIndex); 292 | node.Active = false; 293 | } 294 | } 295 | 296 | public void ClearAllProjectiles() 297 | { 298 | for (int i = 0; i < ActiveProjectileIndexes.Length; i++) 299 | { 300 | // End of array is set to -1 301 | if (ActiveProjectileIndexes[i] == -1) 302 | break; 303 | 304 | Pool.Node node = Projectiles.GetActive(ActiveProjectileIndexes[i]); 305 | ReturnNode(node); 306 | 307 | ActiveProjectileIndexes[i] = -1; 308 | } 309 | 310 | ActiveProjectileIndexesPosition = 0; 311 | } 312 | 313 | void OnDisable() 314 | { 315 | ClearAllProjectiles(); 316 | } 317 | 318 | } 319 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c5a81b6449699d4a8ac1a13e8b6178e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterBasic.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BulletHell 4 | { 5 | // Most basic emitter implementation 6 | public class ProjectileEmitterBasic : ProjectileEmitterBase 7 | { 8 | public override Pool.Node FireProjectile(Vector2 direction, float leakedTime) 9 | { 10 | Pool.Node node = Projectiles.Get(); 11 | 12 | node.Item.Position = transform.position; 13 | node.Item.Scale = Scale; 14 | node.Item.TimeToLive = TimeToLive - leakedTime; 15 | node.Item.Velocity = Speed * Direction.normalized; 16 | node.Item.Position += node.Item.Velocity * leakedTime; 17 | node.Item.Color = new Color(0.6f, 0.7f, 0.6f, 1); 18 | node.Item.Acceleration = Acceleration; 19 | 20 | Direction = Rotate(Direction, RotationSpeed); 21 | 22 | return node; 23 | } 24 | 25 | protected override void UpdateProjectile(ref Pool.Node node, float tick) 26 | { 27 | throw new System.NotImplementedException(); 28 | } 29 | 30 | protected override void UpdateProjectiles(float tick) 31 | { 32 | throw new System.NotImplementedException(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterBasic.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff02b1c669fbb2b4c9be5951c317d272 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterShape.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace BulletHell 5 | { 6 | // Emitter to fire pre-defined shape patterns 7 | public class ProjectileEmitterShape : ProjectileEmitterAdvanced 8 | { 9 | [SerializeField] 10 | public GameObject ShapeTemplate; 11 | private List TemplatePositions; 12 | 13 | new void Awake() 14 | { 15 | base.Awake(); 16 | 17 | if (ShapeTemplate == null) 18 | { 19 | ShapeTemplate = Resources.Load(@"ShapeTemplates\CircleShape"); 20 | } 21 | 22 | TemplatePositions = new List(); 23 | foreach (Transform child in ShapeTemplate.transform) 24 | { 25 | TemplatePositions.Add(child.transform.localPosition); 26 | } 27 | } 28 | 29 | public override Pool.Node FireProjectile(Vector2 direction, float leakedTime) 30 | { 31 | Pool.Node node = new Pool.Node(); 32 | 33 | if (Projectiles.AvailableCount >= TemplatePositions.Count) 34 | { 35 | for (int n = 0; n < TemplatePositions.Count; n++) 36 | { 37 | node = Projectiles.Get(); 38 | 39 | node.Item.Position = transform.position + TemplatePositions[n]; 40 | node.Item.Scale = Scale; 41 | node.Item.TimeToLive = TimeToLive - leakedTime; 42 | node.Item.Velocity = Speed * Direction.normalized; 43 | node.Item.Position += node.Item.Velocity * leakedTime; 44 | node.Item.Color = new Color(0.6f, 0.7f, 0.6f, 1); 45 | node.Item.Acceleration = Acceleration; 46 | 47 | // Setup outline if we have one 48 | if (ProjectilePrefab.Outline != null && DrawOutlines) 49 | { 50 | Pool.Node outlineNode = ProjectileOutlines.Get(); 51 | 52 | outlineNode.Item.Position = node.Item.Position; 53 | outlineNode.Item.Scale = node.Item.Scale + OutlineSize; 54 | outlineNode.Item.Color = OutlineColor.Evaluate(0); 55 | 56 | node.Item.Outline = outlineNode; 57 | } 58 | 59 | // Keep track of active projectiles 60 | PreviousActiveProjectileIndexes[ActiveProjectileIndexesPosition] = node.NodeIndex; 61 | ActiveProjectileIndexesPosition++; 62 | if (ActiveProjectileIndexesPosition < ActiveProjectileIndexes.Length) 63 | { 64 | PreviousActiveProjectileIndexes[ActiveProjectileIndexesPosition] = -1; 65 | } 66 | else 67 | { 68 | Debug.Log("Error: Projectile was fired before list of active projectiles was refreshed."); 69 | } 70 | 71 | UpdateProjectile(ref node, leakedTime); 72 | 73 | } 74 | 75 | 76 | 77 | Direction = Rotate(Direction, RotationSpeed); 78 | } 79 | 80 | return node; 81 | } 82 | 83 | public new void UpdateEmitter(float tick) 84 | { 85 | base.UpdateEmitter(tick); 86 | } 87 | 88 | protected override void UpdateProjectile(ref Pool.Node node, float tick) 89 | { 90 | base.UpdateProjectile(ref node, tick); 91 | //throw new System.NotImplementedException(); 92 | } 93 | 94 | protected override void UpdateProjectiles(float tick) 95 | { 96 | base.UpdateProjectiles(tick); 97 | //throw new System.NotImplementedException(); 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Emitters/ProjectileEmitterShape.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e3662c32dab22546bd2397e9c79cdb7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/ProjectileManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | namespace BulletHell 5 | { 6 | public class ProjectileManager : MonoBehaviour 7 | { 8 | private bool Initialized = false; 9 | 10 | // Lists out all the projectile types found in Assets 11 | [SerializeField] 12 | private List ProjectilePrefabs; 13 | 14 | // Each projectile type has its own material, therefore, own IndirectRenderer 15 | private Dictionary IndirectRenderers; 16 | 17 | // Cache the last accessed IndirectRenderer to reduce the Dict lookup for batches 18 | private int LastAccessedProjectileTypeIndex = -1; 19 | private IndirectRenderer LastAccessedRenderer; 20 | 21 | // Counters to keep track of Projectile Group information 22 | private Dictionary ProjectileTypeCounters; 23 | 24 | [SerializeField] 25 | private ProjectileEmitterBase[] EmittersArray; 26 | private int MaxEmitters = 100; 27 | private int EmitterCount = 0; 28 | 29 | // Singleton 30 | private static ProjectileManager instance = null; 31 | public static ProjectileManager Instance 32 | { 33 | get 34 | { 35 | if (instance == null) 36 | { 37 | instance = FindObjectOfType(); 38 | if (instance == null) 39 | { 40 | GameObject go = new GameObject(); 41 | go.name = "ProjectileManager"; 42 | instance = go.AddComponent(); 43 | DontDestroyOnLoad(go); 44 | } 45 | } 46 | return instance; 47 | } 48 | } 49 | 50 | void Awake() 51 | { 52 | Instance.Initialize(); 53 | } 54 | 55 | [RuntimeInitializeOnLoadMethod] 56 | static void EnableInstance() 57 | { 58 | Instance.Initialized = false; 59 | } 60 | 61 | void Initialize() 62 | { 63 | if (!Initialized) 64 | { 65 | // Grab a list of Projectile Types founds in assets folder "ProjectilePrefabs" 66 | GameObject[] projectileTypes = Resources.LoadAll("ProjectilePrefabs"); 67 | ProjectilePrefabs = new List(); 68 | IndirectRenderers = new Dictionary(); 69 | ProjectileTypeCounters = new Dictionary(); 70 | 71 | // Process projectile types 72 | int currentIndex = 0; 73 | for (int n = 0; n < projectileTypes.Length; n++) 74 | { 75 | ProjectilePrefab type = projectileTypes[n].GetComponent(); 76 | 77 | // if script is not attached, then we skip as it is invalid. 78 | if (type == null) 79 | continue; 80 | 81 | type.Initialize(currentIndex); 82 | ProjectilePrefabs.Add(type); 83 | 84 | // If material is set to be a static color ensure we do not send color data to shader 85 | IndirectRenderers.Add(currentIndex, new IndirectRenderer(type.GetMaxProjectileCount(), type.Material, type.Mesh, type.IsStaticColor)); 86 | ProjectileTypeCounters.Add(currentIndex, new ProjectileTypeCounters()); 87 | 88 | currentIndex++; 89 | } 90 | 91 | EmittersArray = new ProjectileEmitterBase[MaxEmitters]; 92 | 93 | // Get a list of all emitters in the scene 94 | RegisterEmitters(); 95 | 96 | Initialized = true; 97 | } 98 | } 99 | 100 | // Adds a new emitter at runtime 101 | public void AddEmitter(ProjectileEmitterBase emitter, int allocation) 102 | { 103 | // Default projectile if no projectile type set 104 | if (emitter.ProjectilePrefab == null) 105 | emitter.ProjectilePrefab = GetProjectilePrefab(0); 106 | 107 | // Increment group counter 108 | ProjectileTypeCounters[emitter.ProjectilePrefab.Index].TotalGroups++; 109 | 110 | // Should be a way to not allocate more than projectile type will allow - across all emitters 111 | emitter.Initialize(allocation); 112 | 113 | EmitterCount++; 114 | } 115 | 116 | // Only should be used in DEBUG mode when adding Emitters during runtime 117 | // This rebuilds the entire Emitters array -- If adding emitters at runtime you should use the AddEmitter method. 118 | private void RefreshEmitters() 119 | { 120 | ProjectileEmitterBase[] emittersTemp = GameObject.FindObjectsOfType(); 121 | 122 | if (emittersTemp.Length != EmitterCount) 123 | { 124 | EmitterCount = 0; 125 | 126 | // reset group counter 127 | for (int n = 0; n < ProjectilePrefabs.Count; n++) 128 | { 129 | ProjectileTypeCounters[ProjectilePrefabs[n].Index].TotalGroups = 0; 130 | ProjectileTypeCounters[ProjectilePrefabs[n].Index].TotalProjectilesAssigned = 0; 131 | } 132 | 133 | for (int n = 0; n < EmittersArray.Length; n++) 134 | { 135 | if (EmittersArray[n] != null) 136 | { 137 | EmittersArray[n].ClearAllProjectiles(); 138 | EmittersArray[n] = null; 139 | } 140 | } 141 | 142 | RegisterEmitters(); 143 | } 144 | } 145 | 146 | public void RegisterEmitters() 147 | { 148 | // Register Emitters that are currently in the scene 149 | ProjectileEmitterBase[] emittersTemp = GameObject.FindObjectsOfType(); 150 | 151 | 152 | for (int n = 0; n < emittersTemp.Length; n++) 153 | { 154 | EmittersArray[n] = emittersTemp[n]; 155 | // Default projectile if no projectile type set 156 | if (EmittersArray[n].ProjectilePrefab == null) 157 | EmittersArray[n].ProjectilePrefab = GetProjectilePrefab(0); 158 | 159 | // Increment group counter 160 | ProjectileTypeCounters[EmittersArray[n].ProjectilePrefab.Index].TotalGroups++; 161 | } 162 | 163 | // Initialize the emitters -- if value is set fo projectilePoolSize -- system will use it 164 | // Make sure to not assign projectilePoolSize larger than total material type projectile count 165 | for (int n = 0; n < EmittersArray.Length; n++) 166 | { 167 | if (EmittersArray[n] != null) 168 | { 169 | int projectilesToAssign = EmittersArray[n].ProjectilePrefab.GetMaxProjectileCount(); 170 | 171 | if (projectilesToAssign == -1) 172 | { 173 | //EmittersArray[n].ProjectilePoolSize = 1000; 174 | projectilesToAssign = 1000; 175 | } 176 | 177 | EmittersArray[n].Initialize(projectilesToAssign); 178 | ProjectileTypeCounters[EmittersArray[n].ProjectilePrefab.Index].TotalProjectilesAssigned += projectilesToAssign; 179 | 180 | EmitterCount++; 181 | } 182 | } 183 | 184 | // Check assignments - output error if too many assigned 185 | for (int n = 0; n < ProjectilePrefabs.Count; n++) 186 | { 187 | if (ProjectileTypeCounters[ProjectilePrefabs[n].Index].TotalProjectilesAssigned > ProjectilePrefabs[n].GetMaxProjectileCount()) 188 | { 189 | Debug.Log("Projectile Type '" + ProjectilePrefabs[n].name + "' emitters assigned too many projectiles: " + ProjectileTypeCounters[ProjectilePrefabs[n].Index].TotalProjectilesAssigned + " assigned with max of " + ProjectilePrefabs[n].GetMaxProjectileCount() + ". Reduce Max Projectiles on Emitters that use this projectile type."); 190 | } 191 | } 192 | 193 | } 194 | 195 | // When adding emitter during play mode - you can register them with this function 196 | public void RegisterEmitter(ProjectileEmitterBase emitter) 197 | { 198 | // Should probably use Emittercount here - find the next empty slot in the array 199 | int nextEmpty = -1; 200 | for (int n = 0; n < EmittersArray.Length; n++) 201 | { 202 | if (EmittersArray[n] == null) 203 | nextEmpty = n; 204 | } 205 | 206 | if (nextEmpty == -1) 207 | { 208 | Debug.Log("Max Emitters reached. Raise MaxEmitters if you need more. Max set to " + MaxEmitters + "."); 209 | } 210 | else 211 | { 212 | EmittersArray[nextEmpty] = emitter; 213 | ProjectileTypeCounters[emitter.ProjectilePrefab.Index].TotalGroups++; 214 | 215 | int projectilesToAssign = emitter.ProjectilePrefab.GetMaxProjectileCount(); 216 | 217 | if (projectilesToAssign == -1) 218 | { 219 | //emitter.ProjectilePoolSize = 1000; 220 | projectilesToAssign = 1000; 221 | } 222 | 223 | // Initialize Emitter pool size 224 | emitter.Initialize(projectilesToAssign); 225 | ProjectileTypeCounters[emitter.ProjectilePrefab.Index].TotalProjectilesAssigned += projectilesToAssign; 226 | 227 | EmitterCount++; 228 | } 229 | 230 | } 231 | 232 | public ProjectilePrefab GetProjectilePrefab(int index) 233 | { 234 | return ProjectilePrefabs[index]; 235 | } 236 | 237 | public void UpdateBufferData(ProjectilePrefab projectileType, ProjectileData data) 238 | { 239 | if (projectileType.Index != LastAccessedProjectileTypeIndex) 240 | { 241 | LastAccessedProjectileTypeIndex = projectileType.Index; 242 | LastAccessedRenderer = IndirectRenderers[LastAccessedProjectileTypeIndex]; 243 | } 244 | 245 | LastAccessedRenderer.UpdateBufferData(projectileType.BufferIndex, data); 246 | projectileType.IncrementBufferIndex(); 247 | } 248 | 249 | public void Update() 250 | { 251 | // Example of adding an emitter at runtime 252 | //if (Input.GetKeyDown(KeyCode.F)) 253 | //{ 254 | // GameObject go = GameObject.Instantiate(Resources.Load("Emitters/Spinner") as GameObject); 255 | // go.transform.position = new Vector2(1, 0); 256 | // AddEmitter(go.GetComponent(), 1000); 257 | // RegisterEmitter(go.GetComponent()); 258 | //} 259 | 260 | 261 | // Provides a simple way to update active Emitters if removing/adding them at runtime for debugging purposes 262 | // You should be using AddEmitter() if you want to add Emitters at runtime (See above comment). 263 | #if UNITY_EDITOR 264 | RefreshEmitters(); 265 | #endif 266 | 267 | DrawEmitters(); 268 | UpdateEmitters(); 269 | } 270 | 271 | public void UpdateEmitters() 272 | { 273 | //reset 274 | for (int n = 0; n < ProjectilePrefabs.Count; n++) 275 | { 276 | ProjectileTypeCounters[n].ActiveProjectiles = 0; 277 | ProjectilePrefabs[n].ResetBufferIndex(); 278 | } 279 | 280 | for (int n = 0; n < EmittersArray.Length; n++) 281 | { 282 | if (EmittersArray[n] != null) 283 | { 284 | if (EmittersArray[n].gameObject.activeSelf && EmittersArray[n].enabled) 285 | { 286 | EmittersArray[n].UpdateEmitter(Time.deltaTime); 287 | 288 | // Update projectile counters 289 | ProjectileTypeCounters[EmittersArray[n].ProjectilePrefab.Index].ActiveProjectiles += EmittersArray[n].ActiveProjectileCount; 290 | 291 | // update outlines 292 | if (EmittersArray[n].ProjectilePrefab.Outline != null) 293 | ProjectileTypeCounters[EmittersArray[n].ProjectilePrefab.Outline.Index].ActiveProjectiles += EmittersArray[n].ActiveOutlineCount; 294 | } 295 | else 296 | { 297 | // if the gameobject was disabled then clear all projectiles from this emitter 298 | EmittersArray[n].ClearAllProjectiles(); 299 | } 300 | } 301 | } 302 | } 303 | 304 | public void DrawEmitters() 305 | { 306 | // We draw all emitters at the same time based on their Projectile Type. 1 draw call per projectile type. 307 | for (int n = 0; n < ProjectilePrefabs.Count; n++) 308 | { 309 | if (ProjectileTypeCounters[ProjectilePrefabs[n].Index].ActiveProjectiles > 0) 310 | { 311 | IndirectRenderers[ProjectilePrefabs[n].Index].Draw(ProjectileTypeCounters[ProjectilePrefabs[n].Index].ActiveProjectiles); 312 | } 313 | } 314 | } 315 | 316 | void OnGUI() 317 | { 318 | int total = 0; 319 | for (int n = 0; n < ProjectileTypeCounters.Count; n++) 320 | { 321 | total += ProjectileTypeCounters[n].ActiveProjectiles; 322 | } 323 | GUI.Label(new Rect(5, 5, 300, 20), "Projectiles: " + total.ToString()); 324 | } 325 | 326 | void OnApplicationQuit() 327 | { 328 | foreach (KeyValuePair kvp in IndirectRenderers) 329 | { 330 | kvp.Value.ReleaseBuffers(true); 331 | } 332 | } 333 | 334 | void OnDisable() 335 | { 336 | foreach (KeyValuePair kvp in IndirectRenderers) 337 | { 338 | kvp.Value.ReleaseBuffers(true); 339 | } 340 | } 341 | } 342 | 343 | public class ProjectileTypeCounters 344 | { 345 | public int ActiveProjectiles; 346 | public int TotalProjectilesAssigned; 347 | public int TotalGroups; 348 | } 349 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/ProjectileManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79e0bb7bc4770a949b8851e7f872699d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Renderer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d15adc65b970d446a7cf6c51133adae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Renderer/IndirectRenderer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace BulletHell 4 | { 5 | public class IndirectRenderer 6 | { 7 | private ComputeBuffer ArgsBuffer; 8 | private ComputeBuffer TransformBuffer; 9 | private ComputeBuffer ColorBuffer; 10 | 11 | // Data buffers 12 | private Vector4[] TransformData; 13 | private Vector4[] ColorData; 14 | 15 | // Projectile Details 16 | private Mesh Mesh; 17 | private Material Material; 18 | 19 | // When set true - color data not sent to gpu 20 | // If using a static color make sure to check this to true on the Material for performance boost. 21 | private bool StaticColor; 22 | 23 | // DrawMeshInstancedIndirect requires an args buffer 24 | // [index count per instance, instance count, start index location, base vertex location, start instance location] 25 | private uint[] args = new uint[5] { 0, 0, 0, 0, 0 }; 26 | 27 | public IndirectRenderer(int maxProjectiles, Material material, Mesh mesh, bool staticColor) 28 | { 29 | //Turn off v-sync 30 | QualitySettings.vSyncCount = 0; 31 | 32 | StaticColor = staticColor; 33 | Mesh = mesh; 34 | Material = material; 35 | 36 | ArgsBuffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); 37 | InitializeBuffers(maxProjectiles); 38 | } 39 | 40 | void InitializeBuffers(int maxProjectiles) 41 | { 42 | ReleaseBuffers(false); 43 | 44 | // Create Compute Buffers 45 | TransformBuffer = new ComputeBuffer(maxProjectiles, sizeof(float) * 4); 46 | if (!StaticColor) 47 | ColorBuffer = new ComputeBuffer(maxProjectiles, sizeof(float) * 4); 48 | 49 | // Create Data Buffers 50 | TransformData = new Vector4[maxProjectiles]; 51 | if (!StaticColor) 52 | ColorData = new Vector4[maxProjectiles]; 53 | 54 | // Set the active buffers on the material 55 | Material.SetBuffer("positionBuffer", TransformBuffer); 56 | if (!StaticColor) 57 | Material.SetBuffer("colorBuffer", ColorBuffer); 58 | 59 | // Update argument buffer 60 | uint numIndices = (Mesh != null) ? (uint)Mesh.GetIndexCount(0) : 0; 61 | args[0] = numIndices; 62 | args[1] = (uint)maxProjectiles; 63 | ArgsBuffer.SetData(args); 64 | } 65 | 66 | public void UpdateBufferData(int index, ProjectileData data) 67 | { 68 | if (index < TransformData.Length) 69 | { 70 | TransformData[index] = new Vector4(data.Position.x, data.Position.y, data.Scale, data.Rotation); 71 | if (!StaticColor) 72 | ColorData[index] = new Vector4(data.Color.r, data.Color.g, data.Color.b, data.Color.a); 73 | } 74 | else 75 | { 76 | Debug.Log("Error: Initialized more projectiles than Projectile Type allows."); 77 | } 78 | } 79 | 80 | public void Draw(int activeProjectileCount) 81 | { 82 | // Update our compute buffers with latest data 83 | TransformBuffer.SetData(TransformData, 0, 0, activeProjectileCount); 84 | if (!StaticColor) 85 | ColorBuffer.SetData(ColorData, 0, 0, activeProjectileCount); 86 | args[1] = (uint)activeProjectileCount; 87 | ArgsBuffer.SetData(args); 88 | 89 | // Instruct the GPU to draw 90 | Graphics.DrawMeshInstancedIndirect(Mesh, 0, Material, new Bounds(Vector3.zero, new Vector3(100.0f, 100.0f, 100.0f)), ArgsBuffer); 91 | } 92 | 93 | // Cleanup 94 | public void ReleaseBuffers(bool releaseArgs) 95 | { 96 | if (TransformBuffer != null) 97 | TransformBuffer.Release(); 98 | TransformBuffer = null; 99 | 100 | if (ColorBuffer != null) 101 | ColorBuffer.Release(); 102 | ColorBuffer = null; 103 | 104 | if (releaseArgs) 105 | { 106 | if (ArgsBuffer != null) 107 | ArgsBuffer.Release(); 108 | ArgsBuffer = null; 109 | } 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Scripts/Renderer/IndirectRenderer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 408cf22b6b269584ca169e36e20c2645 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e85321ef800cb874d9b06ef28a1feee8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures/CircleGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongallant/Unity-Bullet-Hell/547c67323fad0d599c1477066181471f486da1cc/Assets/Unity-Bullet-Hell/Textures/CircleGradient.png -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures/CircleGradient.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 140cc34eeb6c6f349979936397bda84c 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 512 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 931044182c18761419b5a3ac07e4fcc2 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongallant/Unity-Bullet-Hell/547c67323fad0d599c1477066181471f486da1cc/Assets/Unity-Bullet-Hell/Textures/Square.png -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures/Square.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 761d163fd0dd7e2408531cd0639e2d73 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 32 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: de629e9bfea367c47b17805056864241 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures/circlewhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jongallant/Unity-Bullet-Hell/547c67323fad0d599c1477066181471f486da1cc/Assets/Unity-Bullet-Hell/Textures/circlewhite.png -------------------------------------------------------------------------------- /Assets/Unity-Bullet-Hell/Textures/circlewhite.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8066b9c66771543409ab3e52fc14bd57 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 128 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 2048 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 2048 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 491341f662797054fa2d65aee14bf6c9 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 jgallant 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/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/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Unity-Bullet-Hell/Scenes/SampleScene.unity 10 | guid: d1070b9e9ead88e48a9e88484e2ede86 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 1 11 | m_SpritePackerMode: 4 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 37 | m_PreloadedShaders: [] 38 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 39 | type: 0} 40 | m_CustomRenderPipeline: {fileID: 0} 41 | m_TransparencySortMode: 0 42 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 43 | m_DefaultRenderingPath: 1 44 | m_DefaultMobileRenderingPath: 1 45 | m_TierSettings: 46 | - serializedVersion: 5 47 | m_BuildTarget: 1 48 | m_Tier: 0 49 | m_Settings: 50 | standardShaderQuality: 2 51 | renderingPath: 3 52 | hdrMode: 1 53 | realtimeGICPUUsage: 25 54 | useReflectionProbeBoxProjection: 1 55 | useReflectionProbeBlending: 1 56 | useHDR: 0 57 | useDetailNormalMap: 1 58 | useCascadedShadowMaps: 1 59 | prefer32BitShadowMaps: 0 60 | enableLPPV: 1 61 | useDitherMaskForAlphaBlendedShadows: 1 62 | m_Automatic: 1 63 | - serializedVersion: 5 64 | m_BuildTarget: 1 65 | m_Tier: 1 66 | m_Settings: 67 | standardShaderQuality: 2 68 | renderingPath: 3 69 | hdrMode: 1 70 | realtimeGICPUUsage: 25 71 | useReflectionProbeBoxProjection: 1 72 | useReflectionProbeBlending: 1 73 | useHDR: 0 74 | useDetailNormalMap: 1 75 | useCascadedShadowMaps: 1 76 | prefer32BitShadowMaps: 0 77 | enableLPPV: 1 78 | useDitherMaskForAlphaBlendedShadows: 1 79 | m_Automatic: 1 80 | - serializedVersion: 5 81 | m_BuildTarget: 1 82 | m_Tier: 2 83 | m_Settings: 84 | standardShaderQuality: 2 85 | renderingPath: 3 86 | hdrMode: 1 87 | realtimeGICPUUsage: 50 88 | useReflectionProbeBoxProjection: 1 89 | useReflectionProbeBlending: 1 90 | useHDR: 0 91 | useDetailNormalMap: 1 92 | useCascadedShadowMaps: 1 93 | prefer32BitShadowMaps: 0 94 | enableLPPV: 1 95 | useDitherMaskForAlphaBlendedShadows: 1 96 | m_Automatic: 1 97 | m_LightmapStripping: 1 98 | m_FogStripping: 0 99 | m_InstancingStripping: 0 100 | m_LightmapKeepPlain: 0 101 | m_LightmapKeepDirCombined: 0 102 | m_LightmapKeepDynamicPlain: 0 103 | m_LightmapKeepDynamicDirCombined: 0 104 | m_LightmapKeepShadowMask: 0 105 | m_LightmapKeepSubtractive: 0 106 | m_FogKeepLinear: 1 107 | m_FogKeepExp: 1 108 | m_FogKeepExp2: 1 109 | m_AlbedoSwatchInfos: [] 110 | m_LightsUseLinearIntensity: 0 111 | m_LightsUseColorTemperature: 0 112 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 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: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 20 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: bfcfc320427f8224bbb7a96f3d3aebad, 13 | type: 2} 14 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: a4adc9cdb32bf2a4793d0827dbfaf832 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: BulletBattle 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 1 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | resizableWindow: 1 83 | useMacAppStoreValidation: 0 84 | macAppStoreCategory: public.app-category.games 85 | gpuSkinning: 0 86 | graphicsJobs: 0 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | graphicsJobMode: 0 95 | fullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | xboxOneResolution: 0 102 | xboxOneSResolution: 0 103 | xboxOneXResolution: 3 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 0 109 | switchQueueControlMemory: 16384 110 | switchQueueComputeMemory: 262144 111 | switchNVNShaderPoolsGranularity: 33554432 112 | switchNVNDefaultPoolsGranularity: 16777216 113 | switchNVNOtherPoolsGranularity: 16777216 114 | vulkanEnableSetSRGBWrite: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 0.1 122 | preloadedAssets: 123 | - {fileID: 4800000, guid: 18e30b6bf63afa143b99ce9d0ccbb5f9, type: 3} 124 | - {fileID: 4800000, guid: 5ebb21ec21bba9f478fdc232b0f6efe6, type: 3} 125 | metroInputSource: 0 126 | wsaTransparentSwapchain: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | isWsaHolographicRemotingEnabled: 0 131 | vrSettings: 132 | cardboard: 133 | depthFormat: 0 134 | enableTransitionView: 0 135 | daydream: 136 | depthFormat: 0 137 | useSustainedPerformanceMode: 0 138 | enableVideoLayer: 0 139 | useProtectedVideoMemory: 0 140 | minimumSupportedHeadTracking: 0 141 | maximumSupportedHeadTracking: 1 142 | hololens: 143 | depthFormat: 1 144 | depthBufferSharingEnabled: 0 145 | oculus: 146 | sharedDepthBuffer: 1 147 | dashSupport: 1 148 | enable360StereoCapture: 0 149 | protectGraphicsMemory: 0 150 | enableFrameTimingStats: 0 151 | useHDRDisplay: 0 152 | m_ColorGamuts: 00000000 153 | targetPixelDensity: 30 154 | resolutionScalingMode: 0 155 | androidSupportedAspectRatio: 1 156 | androidMaxAspectRatio: 2.1 157 | applicationIdentifier: 158 | Standalone: com.Company.ProductName 159 | buildNumber: {} 160 | AndroidBundleVersionCode: 1 161 | AndroidMinSdkVersion: 16 162 | AndroidTargetSdkVersion: 0 163 | AndroidPreferredInstallLocation: 1 164 | aotOptions: 165 | stripEngineCode: 1 166 | iPhoneStrippingLevel: 0 167 | iPhoneScriptCallOptimization: 0 168 | ForceInternetPermission: 0 169 | ForceSDCardPermission: 0 170 | CreateWallpaper: 0 171 | APKExpansionFiles: 0 172 | keepLoadedShadersAlive: 0 173 | StripUnusedMeshComponents: 1 174 | VertexChannelCompressionMask: 4054 175 | iPhoneSdkVersion: 988 176 | iOSTargetOSVersionString: 9.0 177 | tvOSSdkVersion: 0 178 | tvOSRequireExtendedGameController: 0 179 | tvOSTargetOSVersionString: 9.0 180 | uIPrerenderedIcon: 0 181 | uIRequiresPersistentWiFi: 0 182 | uIRequiresFullScreen: 1 183 | uIStatusBarHidden: 1 184 | uIExitOnSuspend: 0 185 | uIStatusBarStyle: 0 186 | iPhoneSplashScreen: {fileID: 0} 187 | iPhoneHighResSplashScreen: {fileID: 0} 188 | iPhoneTallHighResSplashScreen: {fileID: 0} 189 | iPhone47inSplashScreen: {fileID: 0} 190 | iPhone55inPortraitSplashScreen: {fileID: 0} 191 | iPhone55inLandscapeSplashScreen: {fileID: 0} 192 | iPhone58inPortraitSplashScreen: {fileID: 0} 193 | iPhone58inLandscapeSplashScreen: {fileID: 0} 194 | iPadPortraitSplashScreen: {fileID: 0} 195 | iPadHighResPortraitSplashScreen: {fileID: 0} 196 | iPadLandscapeSplashScreen: {fileID: 0} 197 | iPadHighResLandscapeSplashScreen: {fileID: 0} 198 | appleTVSplashScreen: {fileID: 0} 199 | appleTVSplashScreen2x: {fileID: 0} 200 | tvOSSmallIconLayers: [] 201 | tvOSSmallIconLayers2x: [] 202 | tvOSLargeIconLayers: [] 203 | tvOSLargeIconLayers2x: [] 204 | tvOSTopShelfImageLayers: [] 205 | tvOSTopShelfImageLayers2x: [] 206 | tvOSTopShelfImageWideLayers: [] 207 | tvOSTopShelfImageWideLayers2x: [] 208 | iOSLaunchScreenType: 0 209 | iOSLaunchScreenPortrait: {fileID: 0} 210 | iOSLaunchScreenLandscape: {fileID: 0} 211 | iOSLaunchScreenBackgroundColor: 212 | serializedVersion: 2 213 | rgba: 0 214 | iOSLaunchScreenFillPct: 100 215 | iOSLaunchScreenSize: 100 216 | iOSLaunchScreenCustomXibPath: 217 | iOSLaunchScreeniPadType: 0 218 | iOSLaunchScreeniPadImage: {fileID: 0} 219 | iOSLaunchScreeniPadBackgroundColor: 220 | serializedVersion: 2 221 | rgba: 0 222 | iOSLaunchScreeniPadFillPct: 100 223 | iOSLaunchScreeniPadSize: 100 224 | iOSLaunchScreeniPadCustomXibPath: 225 | iOSUseLaunchScreenStoryboard: 0 226 | iOSLaunchScreenCustomStoryboardPath: 227 | iOSDeviceRequirements: [] 228 | iOSURLSchemes: [] 229 | iOSBackgroundModes: 0 230 | iOSMetalForceHardShadows: 0 231 | metalEditorSupport: 1 232 | metalAPIValidation: 1 233 | iOSRenderExtraFrameOnPause: 0 234 | appleDeveloperTeamID: 235 | iOSManualSigningProvisioningProfileID: 236 | tvOSManualSigningProvisioningProfileID: 237 | iOSManualSigningProvisioningProfileType: 0 238 | tvOSManualSigningProvisioningProfileType: 0 239 | appleEnableAutomaticSigning: 0 240 | iOSRequireARKit: 0 241 | iOSAutomaticallyDetectAndAddCapabilities: 1 242 | appleEnableProMotion: 0 243 | clonedFromGUID: 5f34be1353de5cf4398729fda238591b 244 | templatePackageId: com.unity.template.2d@1.0.2 245 | templateDefaultScene: Assets/Scenes/SampleScene.unity 246 | AndroidTargetArchitectures: 5 247 | AndroidSplashScreenScale: 0 248 | androidSplashScreen: {fileID: 0} 249 | AndroidKeystoreName: 250 | AndroidKeyaliasName: 251 | AndroidBuildApkPerCpuArchitecture: 0 252 | AndroidTVCompatibility: 1 253 | AndroidIsGame: 1 254 | AndroidEnableTango: 0 255 | androidEnableBanner: 1 256 | androidUseLowAccuracyLocation: 0 257 | m_AndroidBanners: 258 | - width: 320 259 | height: 180 260 | banner: {fileID: 0} 261 | androidGamepadSupportLevel: 0 262 | resolutionDialogBanner: {fileID: 0} 263 | m_BuildTargetIcons: [] 264 | m_BuildTargetPlatformIcons: [] 265 | m_BuildTargetBatching: [] 266 | m_BuildTargetGraphicsAPIs: 267 | - m_BuildTarget: WindowsStandaloneSupport 268 | m_APIs: 02000000 269 | m_Automatic: 1 270 | m_BuildTargetVRSettings: [] 271 | m_BuildTargetEnableVuforiaSettings: [] 272 | openGLRequireES31: 0 273 | openGLRequireES31AEP: 0 274 | m_TemplateCustomTags: {} 275 | mobileMTRendering: 276 | Android: 1 277 | iPhone: 1 278 | tvOS: 1 279 | m_BuildTargetGroupLightmapEncodingQuality: [] 280 | m_BuildTargetGroupLightmapSettings: [] 281 | playModeTestRunnerEnabled: 0 282 | runPlayModeTestAsEditModeTest: 0 283 | actionOnDotNetUnhandledException: 1 284 | enableInternalProfiler: 0 285 | logObjCUncaughtExceptions: 1 286 | enableCrashReportAPI: 0 287 | cameraUsageDescription: 288 | locationUsageDescription: 289 | microphoneUsageDescription: 290 | switchNetLibKey: 291 | switchSocketMemoryPoolSize: 6144 292 | switchSocketAllocatorPoolSize: 128 293 | switchSocketConcurrencyLimit: 14 294 | switchScreenResolutionBehavior: 2 295 | switchUseCPUProfiler: 0 296 | switchApplicationID: 0x01004b9000490000 297 | switchNSODependencies: 298 | switchTitleNames_0: 299 | switchTitleNames_1: 300 | switchTitleNames_2: 301 | switchTitleNames_3: 302 | switchTitleNames_4: 303 | switchTitleNames_5: 304 | switchTitleNames_6: 305 | switchTitleNames_7: 306 | switchTitleNames_8: 307 | switchTitleNames_9: 308 | switchTitleNames_10: 309 | switchTitleNames_11: 310 | switchTitleNames_12: 311 | switchTitleNames_13: 312 | switchTitleNames_14: 313 | switchPublisherNames_0: 314 | switchPublisherNames_1: 315 | switchPublisherNames_2: 316 | switchPublisherNames_3: 317 | switchPublisherNames_4: 318 | switchPublisherNames_5: 319 | switchPublisherNames_6: 320 | switchPublisherNames_7: 321 | switchPublisherNames_8: 322 | switchPublisherNames_9: 323 | switchPublisherNames_10: 324 | switchPublisherNames_11: 325 | switchPublisherNames_12: 326 | switchPublisherNames_13: 327 | switchPublisherNames_14: 328 | switchIcons_0: {fileID: 0} 329 | switchIcons_1: {fileID: 0} 330 | switchIcons_2: {fileID: 0} 331 | switchIcons_3: {fileID: 0} 332 | switchIcons_4: {fileID: 0} 333 | switchIcons_5: {fileID: 0} 334 | switchIcons_6: {fileID: 0} 335 | switchIcons_7: {fileID: 0} 336 | switchIcons_8: {fileID: 0} 337 | switchIcons_9: {fileID: 0} 338 | switchIcons_10: {fileID: 0} 339 | switchIcons_11: {fileID: 0} 340 | switchIcons_12: {fileID: 0} 341 | switchIcons_13: {fileID: 0} 342 | switchIcons_14: {fileID: 0} 343 | switchSmallIcons_0: {fileID: 0} 344 | switchSmallIcons_1: {fileID: 0} 345 | switchSmallIcons_2: {fileID: 0} 346 | switchSmallIcons_3: {fileID: 0} 347 | switchSmallIcons_4: {fileID: 0} 348 | switchSmallIcons_5: {fileID: 0} 349 | switchSmallIcons_6: {fileID: 0} 350 | switchSmallIcons_7: {fileID: 0} 351 | switchSmallIcons_8: {fileID: 0} 352 | switchSmallIcons_9: {fileID: 0} 353 | switchSmallIcons_10: {fileID: 0} 354 | switchSmallIcons_11: {fileID: 0} 355 | switchSmallIcons_12: {fileID: 0} 356 | switchSmallIcons_13: {fileID: 0} 357 | switchSmallIcons_14: {fileID: 0} 358 | switchManualHTML: 359 | switchAccessibleURLs: 360 | switchLegalInformation: 361 | switchMainThreadStackSize: 1048576 362 | switchPresenceGroupId: 363 | switchLogoHandling: 0 364 | switchReleaseVersion: 0 365 | switchDisplayVersion: 1.0.0 366 | switchStartupUserAccount: 0 367 | switchTouchScreenUsage: 0 368 | switchSupportedLanguagesMask: 0 369 | switchLogoType: 0 370 | switchApplicationErrorCodeCategory: 371 | switchUserAccountSaveDataSize: 0 372 | switchUserAccountSaveDataJournalSize: 0 373 | switchApplicationAttribute: 0 374 | switchCardSpecSize: -1 375 | switchCardSpecClock: -1 376 | switchRatingsMask: 0 377 | switchRatingsInt_0: 0 378 | switchRatingsInt_1: 0 379 | switchRatingsInt_2: 0 380 | switchRatingsInt_3: 0 381 | switchRatingsInt_4: 0 382 | switchRatingsInt_5: 0 383 | switchRatingsInt_6: 0 384 | switchRatingsInt_7: 0 385 | switchRatingsInt_8: 0 386 | switchRatingsInt_9: 0 387 | switchRatingsInt_10: 0 388 | switchRatingsInt_11: 0 389 | switchLocalCommunicationIds_0: 390 | switchLocalCommunicationIds_1: 391 | switchLocalCommunicationIds_2: 392 | switchLocalCommunicationIds_3: 393 | switchLocalCommunicationIds_4: 394 | switchLocalCommunicationIds_5: 395 | switchLocalCommunicationIds_6: 396 | switchLocalCommunicationIds_7: 397 | switchParentalControl: 0 398 | switchAllowsScreenshot: 1 399 | switchAllowsVideoCapturing: 1 400 | switchAllowsRuntimeAddOnContentInstall: 0 401 | switchDataLossConfirmation: 0 402 | switchUserAccountLockEnabled: 0 403 | switchSystemResourceMemory: 16777216 404 | switchSupportedNpadStyles: 3 405 | switchNativeFsCacheSize: 32 406 | switchIsHoldTypeHorizontal: 0 407 | switchSupportedNpadCount: 8 408 | switchSocketConfigEnabled: 0 409 | switchTcpInitialSendBufferSize: 32 410 | switchTcpInitialReceiveBufferSize: 64 411 | switchTcpAutoSendBufferSizeMax: 256 412 | switchTcpAutoReceiveBufferSizeMax: 256 413 | switchUdpSendBufferSize: 9 414 | switchUdpReceiveBufferSize: 42 415 | switchSocketBufferEfficiency: 4 416 | switchSocketInitializeEnabled: 1 417 | switchNetworkInterfaceManagerInitializeEnabled: 1 418 | switchPlayerConnectionEnabled: 1 419 | ps4NPAgeRating: 12 420 | ps4NPTitleSecret: 421 | ps4NPTrophyPackPath: 422 | ps4ParentalLevel: 11 423 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 424 | ps4Category: 0 425 | ps4MasterVersion: 01.00 426 | ps4AppVersion: 01.00 427 | ps4AppType: 0 428 | ps4ParamSfxPath: 429 | ps4VideoOutPixelFormat: 0 430 | ps4VideoOutInitialWidth: 1920 431 | ps4VideoOutBaseModeInitialWidth: 1920 432 | ps4VideoOutReprojectionRate: 60 433 | ps4PronunciationXMLPath: 434 | ps4PronunciationSIGPath: 435 | ps4BackgroundImagePath: 436 | ps4StartupImagePath: 437 | ps4StartupImagesFolder: 438 | ps4IconImagesFolder: 439 | ps4SaveDataImagePath: 440 | ps4SdkOverride: 441 | ps4BGMPath: 442 | ps4ShareFilePath: 443 | ps4ShareOverlayImagePath: 444 | ps4PrivacyGuardImagePath: 445 | ps4NPtitleDatPath: 446 | ps4RemotePlayKeyAssignment: -1 447 | ps4RemotePlayKeyMappingDir: 448 | ps4PlayTogetherPlayerCount: 0 449 | ps4EnterButtonAssignment: 1 450 | ps4ApplicationParam1: 0 451 | ps4ApplicationParam2: 0 452 | ps4ApplicationParam3: 0 453 | ps4ApplicationParam4: 0 454 | ps4DownloadDataSize: 0 455 | ps4GarlicHeapSize: 2048 456 | ps4ProGarlicHeapSize: 2560 457 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 458 | ps4pnSessions: 1 459 | ps4pnPresence: 1 460 | ps4pnFriends: 1 461 | ps4pnGameCustomData: 1 462 | playerPrefsSupport: 0 463 | enableApplicationExit: 0 464 | resetTempFolder: 1 465 | restrictedAudioUsageRights: 0 466 | ps4UseResolutionFallback: 0 467 | ps4ReprojectionSupport: 0 468 | ps4UseAudio3dBackend: 0 469 | ps4SocialScreenEnabled: 0 470 | ps4ScriptOptimizationLevel: 0 471 | ps4Audio3dVirtualSpeakerCount: 14 472 | ps4attribCpuUsage: 0 473 | ps4PatchPkgPath: 474 | ps4PatchLatestPkgPath: 475 | ps4PatchChangeinfoPath: 476 | ps4PatchDayOne: 0 477 | ps4attribUserManagement: 0 478 | ps4attribMoveSupport: 0 479 | ps4attrib3DSupport: 0 480 | ps4attribShareSupport: 0 481 | ps4attribExclusiveVR: 0 482 | ps4disableAutoHideSplash: 0 483 | ps4videoRecordingFeaturesUsed: 0 484 | ps4contentSearchFeaturesUsed: 0 485 | ps4attribEyeToEyeDistanceSettingVR: 0 486 | ps4IncludedModules: [] 487 | monoEnv: 488 | splashScreenBackgroundSourceLandscape: {fileID: 0} 489 | splashScreenBackgroundSourcePortrait: {fileID: 0} 490 | spritePackerPolicy: 491 | webGLMemorySize: 256 492 | webGLExceptionSupport: 1 493 | webGLNameFilesAsHashes: 0 494 | webGLDataCaching: 1 495 | webGLDebugSymbols: 0 496 | webGLEmscriptenArgs: 497 | webGLModulesDirectory: 498 | webGLTemplate: APPLICATION:Default 499 | webGLAnalyzeBuildSize: 0 500 | webGLUseEmbeddedResources: 0 501 | webGLCompressionFormat: 1 502 | webGLLinkerTarget: 1 503 | webGLThreadsSupport: 0 504 | scriptingDefineSymbols: {} 505 | platformArchitecture: {} 506 | scriptingBackend: {} 507 | il2cppCompilerConfiguration: {} 508 | managedStrippingLevel: {} 509 | incrementalIl2cppBuild: {} 510 | allowUnsafeCode: 0 511 | additionalIl2CppArgs: 512 | scriptingRuntimeVersion: 1 513 | apiCompatibilityLevelPerPlatform: {} 514 | m_RenderingPath: 1 515 | m_MobileRenderingPath: 1 516 | metroPackageName: Template_2D 517 | metroPackageVersion: 518 | metroCertificatePath: 519 | metroCertificatePassword: 520 | metroCertificateSubject: 521 | metroCertificateIssuer: 522 | metroCertificateNotAfter: 0000000000000000 523 | metroApplicationDescription: Template_2D 524 | wsaImages: {} 525 | metroTileShortName: 526 | metroTileShowName: 0 527 | metroMediumTileShowName: 0 528 | metroLargeTileShowName: 0 529 | metroWideTileShowName: 0 530 | metroSupportStreamingInstall: 0 531 | metroLastRequiredScene: 0 532 | metroDefaultTileSize: 1 533 | metroTileForegroundText: 2 534 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 535 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 536 | a: 1} 537 | metroSplashScreenUseBackgroundColor: 0 538 | platformCapabilities: {} 539 | metroTargetDeviceFamilies: {} 540 | metroFTAName: 541 | metroFTAFileTypes: [] 542 | metroProtocolName: 543 | metroCompilationOverrides: 1 544 | XboxOneProductId: 545 | XboxOneUpdateKey: 546 | XboxOneSandboxId: 547 | XboxOneContentId: 548 | XboxOneTitleId: 549 | XboxOneSCId: 550 | XboxOneGameOsOverridePath: 551 | XboxOnePackagingOverridePath: 552 | XboxOneAppManifestOverridePath: 553 | XboxOneVersion: 1.0.0.0 554 | XboxOnePackageEncryption: 0 555 | XboxOnePackageUpdateGranularity: 2 556 | XboxOneDescription: 557 | XboxOneLanguage: 558 | - enus 559 | XboxOneCapability: [] 560 | XboxOneGameRating: {} 561 | XboxOneIsContentPackage: 0 562 | XboxOneEnableGPUVariability: 0 563 | XboxOneSockets: {} 564 | XboxOneSplashScreen: {fileID: 0} 565 | XboxOneAllowedProductIds: [] 566 | XboxOnePersistentLocalStorageSize: 0 567 | XboxOneXTitleMemory: 8 568 | xboxOneScriptCompiler: 0 569 | XboxOneOverrideIdentityName: 570 | vrEditorSettings: 571 | daydream: 572 | daydreamIconForeground: {fileID: 0} 573 | daydreamIconBackground: {fileID: 0} 574 | cloudServicesEnabled: 575 | UNet: 1 576 | luminIcon: 577 | m_Name: 578 | m_ModelFolderPath: 579 | m_PortalFolderPath: 580 | luminCert: 581 | m_CertPath: 582 | m_PrivateKeyPath: 583 | luminIsChannelApp: 0 584 | luminVersion: 585 | m_VersionCode: 1 586 | m_VersionName: 587 | facebookSdkVersion: 7.9.4 588 | facebookAppId: 589 | facebookCookies: 1 590 | facebookLogging: 1 591 | facebookStatus: 1 592 | facebookXfbml: 0 593 | facebookFrictionlessRequests: 1 594 | apiCompatibilityLevel: 6 595 | cloudProjectId: 596 | framebufferDepthMemorylessMode: 0 597 | projectName: 598 | organizationId: 599 | cloudEnabled: 0 600 | enableNativePlatformBackendsForNewInputSystem: 0 601 | disableOldInputManagerSupport: 0 602 | legacyClampBlendShapeWeights: 0 603 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.0f1 2 | m_EditorVersionWithRevision: 2020.3.0f1 (c7b5465681fb) 3 | -------------------------------------------------------------------------------- /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: 0 17 | shadowNearPlaneOffset: 0 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | 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 | blendWeights: 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: 0 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 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 0 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: 0 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 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 0 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 0 133 | billboardsFaceCameraPosition: 0 134 | vSyncCount: 0 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: 0 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 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 0 164 | antiAliasing: 0 165 | softParticles: 0 166 | softVegetation: 1 167 | realtimeReflectionProbes: 0 168 | billboardsFaceCameraPosition: 0 169 | vSyncCount: 0 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: 0 188 | shadowResolution: 0 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 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 1 199 | antiAliasing: 4 200 | softParticles: 0 201 | softVegetation: 1 202 | realtimeReflectionProbes: 0 203 | billboardsFaceCameraPosition: 0 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 | Nintendo 3DS: 5 222 | Nintendo Switch: 5 223 | PS4: 5 224 | PSM: 5 225 | PSP2: 2 226 | Standalone: 5 227 | Tizen: 2 228 | WebGL: 3 229 | WiiU: 5 230 | Windows Store Apps: 5 231 | XboxOne: 5 232 | iPhone: 2 233 | tvOS: 2 234 | -------------------------------------------------------------------------------- /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 | - 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 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /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: 1 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity-Bullet-Hell 2 | An extremely efficient projectile and particle generator for Unity. 3 | 4 | ## What is it? 5 | ![Animated Gif](http://www.jgallant.com/images/unitybullethell/flower.gif) 6 | 7 | This system makes use of Unity's Graphics.DrawMeshInstancedIndirect functionality, resulting in a single draw call per Projectile Type. This highly efficient system is able to handle an incredibly large number of projectiles at the same time. 8 | 9 | This projectile system is tuned for 2D usage, and provides a multitude of options and configurations. 10 | 11 | ## How do I use this? 12 | This system is composed of a couple of parts. 13 | 14 | #### Projectile Prefabs 15 | ![Projectile Example](http://www.jgallant.com/images/unitybullethell/prefab.png) 16 | 17 | Projectile Prefabs are prefabs with an attached "ProjectilePrefab.cs" Monobehaviour derived script. They are stored in the "/Resources/ProjectilePrefabs" folder. These define the Mesh, Texture, Z-Index and other properties related to the Projectile Shader. It defines the appearance of the projectile, and the maximum number of projectiles per material instance. 18 | 19 | You will want to tweak the "Max Projectile Count" value to be as low as possible for your application, in order to maximize efficiency. This caps the size of the buffers and data pools. If it is set too low, you will run out of projectiles to fire. If set too high, you will have reserved too much memory for your application. 20 | 21 | #### Emitters 22 | ![Emitter Example](http://www.jgallant.com/images/unitybullethell/emitter3.png) 23 | 24 | Emitters spawn projectiles into the world, based on a set of properties. All of these properties can be programmatically controller or animated. 25 | 26 | #### Shape Emitters 27 | ![Shape Example](http://www.jgallant.com/images/unitybullethell/shape.png) 28 | 29 | You can also create a custom shape template, and place it in "/Resources/ShapeTemplates". You can then use this Shape Template, on the ProjectileEmitterShape instance, and it will spawn the pattern you specified. 30 | 31 | #### One Draw Call 32 | The most amazing part is that you can draw large amounts of meshes in a single draw call. In the example below, every dot of color is a sphere mesh, and is all done in a single draw call. 33 | 34 | http://www.jgallant.com/images/unitybullethell/test.gif 35 | --------------------------------------------------------------------------------