An open source Danmaku development kit for Unity3D.
0
fork

Configure Feed

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

Generalized "From" modifier to all Components

Previously it would only work on Component. Now with a generic argument,
it can take any Component subclass instance as well.

james713 63307494 923afe97

+100 -13
+3
Assets/Dependencies/DanmakU/_Core_/FireData.cs
··· 6 6 using System.Collections; 7 7 using System.Collections.Generic; 8 8 using UnityEngine; 9 + using Vexe.Runtime.Types; 9 10 10 11 namespace Hourai.DanmakU { 11 12 ··· 16 17 [Serializable] 17 18 public class FireData : IEnumerable<FireData> { 18 19 20 + [Hide] 19 21 public Vector2 Position; 22 + [Hide] 20 23 public float Rotation; 21 24 public Color? Color; 22 25 public float Damage;
+6 -6
Assets/Dependencies/DanmakU/_Core_/Modifiers/PositionModifiers.cs
··· 109 109 return component ? data.From(component.gameObject) : data; 110 110 } 111 111 112 - public static IEnumerable From(this IEnumerable coroutine, 113 - Func<FireData, IEnumerable<Component>> components, 114 - Func<FireData, bool> filter = null) 112 + public static IEnumerable From<T>(this IEnumerable coroutine, 113 + Func<FireData, IEnumerable<T>> components, 114 + Func<FireData, bool> filter = null) where T : Component 115 115 { 116 116 return coroutine.Duplicate(components, ((data, o) => data.Position = o.transform.position), false, filter); 117 117 } 118 118 119 - public static IEnumerable From(this IEnumerable coroutine, 120 - IEnumerable<Component> components, 121 - Func<FireData, bool> filter = null) 119 + public static IEnumerable From<T>(this IEnumerable coroutine, 120 + IEnumerable<T> components, 121 + Func<FireData, bool> filter = null) where T : Component 122 122 { 123 123 return coroutine.From(fd => components, filter); 124 124 }
+89 -5
Assets/Test/Test Scene.unity
··· 147 147 m_PrefabInternal: {fileID: 0} 148 148 m_GameObject: {fileID: 15054798} 149 149 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 150 + --- !u!1 &47657700 151 + GameObject: 152 + m_ObjectHideFlags: 0 153 + m_PrefabParentObject: {fileID: 0} 154 + m_PrefabInternal: {fileID: 0} 155 + serializedVersion: 4 156 + m_Component: 157 + - 4: {fileID: 47657702} 158 + - 114: {fileID: 47657701} 159 + m_Layer: 0 160 + m_Name: GameObject 161 + m_TagString: Untagged 162 + m_Icon: {fileID: 0} 163 + m_NavMeshLayer: 0 164 + m_StaticEditorFlags: 0 165 + m_IsActive: 1 166 + --- !u!114 &47657701 167 + MonoBehaviour: 168 + m_ObjectHideFlags: 0 169 + m_PrefabParentObject: {fileID: 0} 170 + m_PrefabInternal: {fileID: 0} 171 + m_GameObject: {fileID: 47657700} 172 + m_Enabled: 1 173 + m_EditorHideFlags: 0 174 + m_Script: {fileID: 11500000, guid: 2f9d204c2576fb742b935f8154cd6251, type: 3} 175 + m_Name: 176 + m_EditorClassIdentifier: 177 + _id: -572542 178 + dbg: 0 179 + _serializationData: 180 + serializedObjects: 181 + - {fileID: 11409350, guid: 5c0c5bf0c434853449fa68def8d34e65, type: 2} 182 + - {fileID: 47657702} 183 + serializedStrings: 184 + keys: 185 + - DanmakuPrefab Prefab 186 + - Transform[] sources 187 + - float delay 188 + values: 189 + - 0 190 + - '[1]' 191 + - 1.0 192 + sources: 193 + - {fileID: 47657702} 194 + delay: 1 195 + --- !u!4 &47657702 196 + Transform: 197 + m_ObjectHideFlags: 0 198 + m_PrefabParentObject: {fileID: 0} 199 + m_PrefabInternal: {fileID: 0} 200 + m_GameObject: {fileID: 47657700} 201 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 202 + m_LocalPosition: {x: 0, y: 0, z: 0} 203 + m_LocalScale: {x: 1, y: 1, z: 1} 204 + m_Children: [] 205 + m_Father: {fileID: 0} 206 + m_RootOrder: 4 150 207 --- !u!1 &207080291 151 208 GameObject: 152 209 m_ObjectHideFlags: 0 ··· 384 441 m_PrefabParentObject: {fileID: 0} 385 442 m_PrefabInternal: {fileID: 0} 386 443 m_GameObject: {fileID: 1376768894} 387 - m_Enabled: 1 444 + m_Enabled: 0 388 445 m_EditorHideFlags: 0 389 446 m_Script: {fileID: 11500000, guid: 42f54d3639c02544385383898827713d, type: 3} 390 447 m_Name: ··· 435 492 m_NumColorKeys: 7 436 493 m_NumAlphaKeys: 2 437 494 speed: 5 438 - burstCount: 20 439 - rotation: 5 495 + burstCount: 10 496 + rotation: 0 440 497 --- !u!4 &1376768896 441 498 Transform: 442 499 m_ObjectHideFlags: 0 ··· 459 516 serializedVersion: 4 460 517 m_Component: 461 518 - 4: {fileID: 1552973384} 519 + - 114: {fileID: 1552973385} 462 520 m_Layer: 0 463 521 m_Name: Test 464 522 m_TagString: Untagged ··· 473 531 m_PrefabInternal: {fileID: 0} 474 532 m_GameObject: {fileID: 1552973383} 475 533 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 476 - m_LocalPosition: {x: -4.31308222, y: -5.84174871, z: 0} 534 + m_LocalPosition: {x: 0, y: 0, z: 0} 477 535 m_LocalScale: {x: 1, y: 1, z: 1} 478 536 m_Children: [] 479 537 m_Father: {fileID: 0} 480 538 m_RootOrder: 2 539 + --- !u!114 &1552973385 540 + MonoBehaviour: 541 + m_ObjectHideFlags: 0 542 + m_PrefabParentObject: {fileID: 0} 543 + m_PrefabInternal: {fileID: 0} 544 + m_GameObject: {fileID: 1552973383} 545 + m_Enabled: 1 546 + m_EditorHideFlags: 0 547 + m_Script: {fileID: 11500000, guid: 2f9d204c2576fb742b935f8154cd6251, type: 3} 548 + m_Name: 549 + m_EditorClassIdentifier: 550 + _id: -554876 551 + dbg: 0 552 + _serializationData: 553 + serializedObjects: [] 554 + serializedStrings: 555 + keys: 556 + - DanmakuPrefab Prefab 557 + - Transform[] sources 558 + - float delay 559 + values: 560 + - null 561 + - '[]' 562 + - 0.0 563 + sources: [] 564 + delay: 0 481 565 --- !u!1 &1715873554 482 566 GameObject: 483 567 m_ObjectHideFlags: 0 ··· 547 631 m_Name: 548 632 m_EditorClassIdentifier: 549 633 camera2D: {fileID: 513550416} 550 - clipBoundary: 0 634 + clipBoundary: 1 551 635 fieldSize: {x: 20, y: 20} 552 636 otherCameras: [] 553 637 useClipBoundary: 1
+1 -1
Assets/Test/bullet petal.prefab
··· 58 58 values: 59 59 - 0 60 60 - '"Circle"' 61 - - '{"x":1.0,"y":1.0}' 61 + - '{"x":0.300000011920929,"y":0.300000011920929}' 62 62 - '{"x":0.0,"y":0.0}' 63 63 - -90.0 64 64 - false
+1 -1
ProjectSettings/ProjectSettings.asset
··· 37 37 disableDepthAndStencilBuffers: 0 38 38 defaultIsFullScreen: 1 39 39 defaultIsNativeResolution: 1 40 - runInBackground: 0 40 + runInBackground: 1 41 41 captureSingleScreen: 0 42 42 Override IPod Music: 0 43 43 Prepare IOS For Recording: 0