An open source Danmaku development kit for Unity3D.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added Rotation Offset to Prefabs

This introduces a setting to rotate the visual appearance of the bullets,
so that ones with oddly rotated sprites will appear correctly.

james713 8992b30c 0a52ee14

+20 -13
+16 -11
Assets/Dependencies/DanmakU/_Core_/DanmakuPrefab.cs
··· 5 5 using System.Collections; 6 6 using System.Collections.Generic; 7 7 using UnityEngine; 8 + using UnityEngine.Rendering; 8 9 using Vexe.Runtime.Types; 9 10 #if UNITY_EDITOR 10 11 using UnityEditor; ··· 32 33 33 34 private void Update() { 34 35 danmakuCount = currentDanmaku.Count; 36 + if (danmakuCount <= 0) 37 + return; 35 38 int count = runtimeSystem.particleCount; 36 39 if (danmakuCount > count) { 37 40 runtimeSystem.maxParticles = Mathf.NextPowerOfTwo(danmakuCount); ··· 143 146 144 147 vertexes = new Vector3[verts.Length]; 145 148 int[] triangles = new int[tris.Length]; 149 + 150 + Matrix4x4 rot = Matrix4x4.TRS(Vector3.zero, 151 + Quaternion.Euler(0f, 0f, rotationOffset), 152 + Vector3.one); 146 153 147 154 for (int i = 0; i < verts.Length; i++) 148 - vertexes[i] = verts[i]; 155 + vertexes[i] = rot * verts[i]; 149 156 150 157 for (int i = 0; i < tris.Length; i++) 151 158 triangles[i] = tris[i]; ··· 222 229 runtimeRenderer.sharedMaterial = renderMaterial; 223 230 runtimeRenderer.sortingLayerID = cachedSortingLayer; 224 231 runtimeRenderer.sortingOrder = cachedSortingOrder; 225 - runtimeRenderer.reflectionProbeUsage = 226 - UnityEngine.Rendering.ReflectionProbeUsage.Off; 232 + runtimeRenderer.reflectionProbeUsage = ReflectionProbeUsage.Off; 227 233 runtimeRenderer.receiveShadows = false; 228 - runtimeRenderer.shadowCastingMode = 229 - UnityEngine.Rendering.ShadowCastingMode.Off; 234 + runtimeRenderer.shadowCastingMode = ShadowCastingMode.Off; 230 235 runtimeRenderer.useLightProbes = false; 231 236 232 237 gameObject.hideFlags = HideFlags.HideInHierarchy; ··· 248 253 Gizmos.color = Color.green; 249 254 switch (collisionType) { 250 255 case Danmaku.ColliderType.Point: 251 - 252 256 //Handles.PositionHandle(Vector3.zero, Quaternion.identity); 253 257 break; 254 258 case Danmaku.ColliderType.Circle: ··· 313 317 314 318 [Serialize, Default(0f, 0f)] 315 319 internal Vector2 colliderOffset; 320 + 321 + [Serialize, fSlider(-180f, 180f)] 322 + private float rotationOffset; 316 323 317 324 #if UNITY_EDITOR 318 325 public override void Reset() { ··· 447 454 #endregion 448 455 449 456 public IEnumerable Infinite() { 450 - FireData fd = this; 451 - while (true) 452 - yield return fd; 457 + return ((FireData)this).Infinite(); 453 458 } 454 459 455 460 public IEnumerator<FireData> GetEnumerator() { 456 - yield return this; 461 + yield return ((FireData) this); 457 462 } 458 463 459 - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() 464 + IEnumerator System.Collections.IEnumerable.GetEnumerator() 460 465 { 461 466 return GetEnumerator(); 462 467 }
+4 -2
Assets/Dependencies/DanmakU/_Core_/DanmakuPrefab.cs.meta
··· 1 1 fileFormatVersion: 2 2 2 guid: 4a07ad0e112c37d44acf76a147bfa444 3 - timeCreated: 1441237559 3 + timeCreated: 1441328220 4 4 licenseType: Free 5 5 MonoImporter: 6 6 serializedVersion: 2 7 - defaultReferences: [] 7 + defaultReferences: 8 + - danmakuSystemPrefab: {fileID: 19876622, guid: 1369960486de0844c8c02f62913f5ffb, 9 + type: 2} 8 10 executionOrder: 0 9 11 icon: {instanceID: 0} 10 12 userData: