A 2D Versus Shmup made in Unity
0
fork

Configure Feed

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

More Documentation

james7132 90965208 c4b1c142

+86 -182
+2 -2
Assets/Characters/US/USA.prefab
··· 225 225 spawnLocation: {x: .5, y: .5} 226 226 spawnArea: {x: .5, y: .5} 227 227 bulletCount: 15 228 - velocity: 20 229 - angV: 0 230 228 burstCount: 231 229 maxCount: 10 232 230 count: 10 ··· 234 232 delay: .100000001 235 233 burstInitialRotation: 0 236 234 burstRotationDelta: 5 235 + LinearController: 236 + velocity: 15 237 237 --- !u!114 &11462248 238 238 MonoBehaviour: 239 239 m_ObjectHideFlags: 1
+9 -1
Assets/External Libraries/DanmakuUnity2D/Attack Patterns/Burst.cs
··· 1 - using UnityEngine; 1 + using UnityEngine; 2 2 using System.Collections; 3 3 using UnityUtilLib; 4 4 using Danmaku2D; 5 5 6 6 namespace Danmaku2D.AttackPatterns { 7 7 8 + /// <summary> 9 + /// A abstract class for consecutive basic bursts of bullets 10 + /// </summary> 8 11 public abstract class Burst : AttackPattern { 12 + 9 13 [SerializeField] 10 14 private ProjectilePrefab prefab; 11 15 ··· 18 22 [SerializeField] 19 23 private int bulletCount; 20 24 25 + /// <summary> 26 + /// An overridable factory method for subclasses to control the various 27 + /// </summary> 28 + /// <value>The controller to be used with the bullets fired with this attack pattern</value> 21 29 protected abstract IProjectileGroupController BurstController { 22 30 get; 23 31 }
+10
Assets/External Libraries/DanmakuUnity2D/BasicEnemy.cs
··· 2 2 using System.Collections; 3 3 4 4 namespace Danmaku2D { 5 + 6 + /// <summary> 7 + /// A basic enemy. <br> 8 + /// Usually used as cannon fodder in Danmaku games. 9 + /// </summary> 5 10 [RequireComponent(typeof(MovementPattern))] 6 11 public class BasicEnemy : Enemy { 7 12 8 13 [SerializeField] 9 14 private float maxHealth; 10 15 private float currentHealth; 16 + 17 + /// <summary> 18 + /// Gets the current health. 19 + /// </summary> 20 + /// <value>The current health.</value> 11 21 public float CurrentHealth { 12 22 get { 13 23 return currentHealth;
-42
Assets/External Libraries/UnityUtilLib/DynamicValueType.cs
··· 1 - using System; 2 - using UnityEngine; 3 - 4 - namespace UnityUtilLib { 5 - 6 - public abstract class DynamicValue<T> { 7 - public abstract T Value { get; } 8 - 9 - public static implicit operator T(DynamicValue<T> adv) { 10 - if(adv == null) { 11 - return default(T); 12 - } 13 - return adv.Value; 14 - } 15 - } 16 - 17 - public class FixedFloat : DynamicValue<float> { 18 - private float value; 19 - 20 - public override float Value { 21 - get { return value; } 22 - } 23 - 24 - public FixedFloat (float value) { 25 - this.value = value; 26 - } 27 - } 28 - 29 - public class RandomRangeFloat : DynamicValue<float> { 30 - private float min; 31 - private float max; 32 - 33 - public override float Value { 34 - get { return UnityEngine.Random.Range (min, max); } 35 - } 36 - 37 - public RandomRangeFloat(float rangeMin, float rangeMax) { 38 - min = rangeMin; 39 - max = rangeMax; 40 - } 41 - } 42 - }
-8
Assets/External Libraries/UnityUtilLib/DynamicValueType.cs.meta
··· 1 - fileFormatVersion: 2 2 - guid: 2eca1b24e4b5f9844a6ca4d978be644f 3 - MonoImporter: 4 - serializedVersion: 2 5 - defaultReferences: [] 6 - executionOrder: 0 7 - icon: {instanceID: 0} 8 - userData:
+2 -2
Assets/External Libraries/UnityUtilLib/General/CachedObject.cs
··· 34 34 } 35 35 36 36 /// <summary> 37 - /// Called upon Component instantiation 38 - /// <see href="http://docs.unity3d.com/ScriptReference/MonoBehaviour.Awake.html">Unity Script Reference: MonoBehavior.Awake()</see> 37 + /// Called upon Component instantiation <br> 38 + /// See <a href="http://docs.unity3d.com/ScriptReference/MonoBehaviour.Awake.html">Unity Script Reference: MonoBehavior.Awake()</see> 39 39 /// </summary> 40 40 public virtual void Awake() { 41 41 trans = transform;
+12
Assets/External Libraries/UnityUtilLib/General/Counter.cs.meta
··· 1 + fileFormatVersion: 2 2 + guid: ff82b61ed03d2c940bf41195167759e3 3 + timeCreated: 1426112110 4 + licenseType: Free 5 + MonoImporter: 6 + serializedVersion: 2 7 + defaultReferences: [] 8 + executionOrder: 0 9 + icon: {instanceID: 0} 10 + userData: 11 + assetBundleName: 12 + assetBundleVariant:
Assets/External Libraries/UnityUtilLib/General/Counters.cs Assets/External Libraries/UnityUtilLib/General/Counter.cs
-8
Assets/External Libraries/UnityUtilLib/General/Counters.cs.meta
··· 1 - fileFormatVersion: 2 2 - guid: 0f3ed74b79e6fc54f8864dec596558d5 3 - MonoImporter: 4 - serializedVersion: 2 5 - defaultReferences: [] 6 - executionOrder: 0 7 - icon: {instanceID: 0} 8 - userData:
+25 -16
Assets/External Libraries/UnityUtilLib/General/StaticGameObject.cs
··· 1 - using UnityEngine; 2 - using System.Collections; 3 - 4 - namespace UnityUtilLib { 5 - public class StaticGameObject : MonoBehaviour { 6 - 7 - [SerializeField] 8 - private bool keepBetweenScenes = true; 9 - 10 - void Awake() { 11 - if(keepBetweenScenes) { 12 - DontDestroyOnLoad (this); 13 - } 14 - } 15 - } 16 - } 1 + using UnityEngine; 2 + using System.Collections; 3 + 4 + namespace UnityUtilLib { 5 + 6 + /// <summary> 7 + /// A static game object, one that can stay between scenes. 8 + /// </summary> 9 + [DisallowMultipleComponent] 10 + public class StaticGameObject : MonoBehaviour { 11 + 12 + [SerializeField] 13 + private bool keepBetweenScenes = true; 14 + 15 + /// <summary> 16 + /// Called upon Component instantiation <br> 17 + /// See <a href="http://docs.unity3d.com/ScriptReference/MonoBehaviour.Awake.html">Unity Script Reference: MonoBehavior.Awake()</see> 18 + /// </summary> 19 + void Awake() { 20 + if(keepBetweenScenes) { 21 + DontDestroyOnLoad (this); 22 + } 23 + } 24 + } 25 + }
+23 -100
Assets/External Libraries/UnityUtilLib/Util.cs
··· 2 2 using System.Collections; 3 3 4 4 namespace UnityUtilLib { 5 + 6 + /// <summary> 7 + /// A static utility class of random functions and constants that are useful in various Unity projects 8 + /// </summary> 5 9 public static class Util { 6 10 7 11 /// <summary> ··· 100 104 } 101 105 return collisionMask; 102 106 } 103 - 104 - private static Mesh quadMesh; 105 - private static Material standardSpriteMat; 106 - 107 - public static Vector2 SpriteScale(Sprite sprite, Vector2 scale) { 108 - float width = sprite.textureRect.width; 109 - float height = sprite.textureRect.height; 110 - Vector2 scaled = Util.HadamardProduct2(scale, new Vector2(width, height) / sprite.pixelsPerUnit); 111 - return scaled; 112 - } 113 - 114 - public static MaterialPropertyBlock SpriteToMPB(Sprite sprite, Color color, MaterialPropertyBlock mpb = null) { 115 - Debug.Log (mpb); 116 - if(mpb == null) { 117 - Debug.Log("Hi!"); 118 - mpb = new MaterialPropertyBlock(); 119 - } 120 - mpb.AddTexture("_MainTex", sprite.texture); 121 - mpb.AddColor("_Color", color); 122 - return mpb; 123 - } 124 - 125 - public static void DrawSprite(Sprite sprite, 126 - Vector3 position, 127 - Quaternion rotation, 128 - Vector3 scale, 129 - Color color = default(Color), 130 - Material material = null, 131 - MaterialPropertyBlock materialProperties = null, 132 - Camera camera = null, 133 - int layer = 0) { 134 - Matrix4x4 transform = Matrix4x4.TRS(position, rotation, Util.SpriteScale(sprite, scale)); 135 - DrawSpriteUnscaled(sprite, transform, color, material, materialProperties, camera, layer); 136 - } 137 - 138 - public static void DrawSpriteUnscaled(Sprite sprite, 139 - Matrix4x4 transform, 140 - Color color = default(Color), 141 - Material material = null, 142 - MaterialPropertyBlock materialProperties = null, 143 - Camera camera = null, 144 - int layer = 0) { 145 - Debug.Log (color); 146 - if(material == null) { 147 - if(standardSpriteMat == null) { 148 - standardSpriteMat = new Material(Shader.Find("Sprites/Default")); 149 - } 150 - material = standardSpriteMat; 151 - } 152 - materialProperties = SpriteToMPB (sprite, color, materialProperties); 153 - DrawSpriteUnscaled (transform, material, materialProperties, camera, layer); 154 - } 155 - 156 - public static void DrawSpriteUnscaled(Matrix4x4 transform, 157 - Material material, 158 - MaterialPropertyBlock materialProperties, 159 - Camera camera = null, 160 - int layer = 0) { 161 - if (quadMesh == null) { 162 - quadMesh = CreateQuad(); 163 - } 164 - Debug.Log (quadMesh.vertexCount); 165 - Graphics.DrawMesh(quadMesh, transform, material, layer, camera, 0, materialProperties, false, false); 166 - } 167 - 168 - private static Mesh CreateQuad() { 169 - Mesh mesh = new Mesh 170 - { 171 - vertices = new[] 172 - { 173 - new Vector3(-.5f, -.5f, 0), 174 - new Vector3(-.5f, +.5f, 0), 175 - new Vector3(+.5f, +.5f, 0), 176 - new Vector3(+.5f, -.5f, 0), 177 - }, 178 - 179 - normals = new[] 180 - { 181 - Vector3.forward, 182 - Vector3.forward, 183 - Vector3.forward, 184 - Vector3.forward, 185 - }, 186 - 187 - triangles = new[] { 0, 1, 2, 2, 3, 0 }, 188 - 189 - uv = new[] 190 - { 191 - new Vector2(0, 0), 192 - new Vector2(0, 1), 193 - new Vector2(1, 1), 194 - new Vector2(1, 0), 195 - } 196 - }; 197 - return mesh; 198 - } 199 - 107 + 200 108 /// <summary> 201 109 /// Actually computes the sign of a floating point number 202 - /// If it is less than 0: returns -1 203 - /// If it is equal to 0: returns 0 204 - /// If it is more than 0: returns 1 110 + /// * If it is less than 0: returns -1 111 + /// * If it is equal to 0: returns 0 112 + /// * If it is more than 0: returns 1 205 113 /// </summary> 206 114 /// <param name="e">the sign of the given floating point value</param> 207 115 public static float Sign(float e) { 208 116 return (e == 0f) ? 0f : Mathf.Sign (e); 209 117 } 210 118 119 + /// <summary> 120 + /// Creates a random Vector2 between (0,0) and the given vector's components. 121 + /// </summary> 122 + /// <returns>the random vector</returns> 123 + /// <param name="v">the maximum component values</param> 211 124 public static Vector2 RandomVect2(Vector2 v) { 212 125 return new Vector2 (Random.value * v.x, Random.value * v.y); 213 126 } 214 127 128 + /// <summary> 129 + /// Creates a random Vector3 between (0,0) and the given vector's components. 130 + /// </summary> 131 + /// <returns>the random vector</returns> 132 + /// <param name="v">the maximum component values</param> 215 133 public static Vector3 RandomVect3(Vector3 v) { 216 134 return new Vector3 (Random.value * v.x, Random.value * v.y, Random.value * v.z); 217 135 } 218 136 137 + /// <summary> 138 + /// Creates a random Vector4 between (0,0) and the given vector's components. 139 + /// </summary> 140 + /// <returns>the random vector</returns> 141 + /// <param name="v">the maximum component values</param> 219 142 public static Vector4 RandomVect4(Vector4 v) { 220 143 return new Vector4 (Random.value * v.x, Random.value * v.y, Random.value * v.z, Random.value * v.y); 221 144 }
+2 -2
Assets/Scenes/Main Gameplay - Sea.unity
··· 755 755 m_PrefabInternal: {fileID: 0} 756 756 m_GameObject: {fileID: 146169037} 757 757 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 758 - m_LocalPosition: {x: 0, y: 0, z: 0} 758 + m_LocalPosition: {x: 0, y: 0, z: 10} 759 759 m_LocalScale: {x: 48.125, y: 48.125, z: 1} 760 760 m_Children: [] 761 761 m_Father: {fileID: 2023493315} ··· 1366 1366 m_PrefabInternal: {fileID: 0} 1367 1367 m_GameObject: {fileID: 618669566} 1368 1368 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1369 - m_LocalPosition: {x: 0, y: 0, z: 0} 1369 + m_LocalPosition: {x: 0, y: 0, z: 10} 1370 1370 m_LocalScale: {x: 48.125, y: 48.125, z: 1} 1371 1371 m_Children: [] 1372 1372 m_Father: {fileID: 827357117}
+1 -1
Assets/TestProjectileControlBehavior.cs Assets/External Libraries/DanmakuUnity2D/Controllers/Projectile Cotnrollers/ColorFadeProjectile.cs
··· 2 2 using System.Collections; 3 3 using Danmaku2D; 4 4 5 - public class TestProjectileControlBehavior : ProjectileControlBehavior { 5 + public class ColorFadeProjectile : ProjectileControlBehavior { 6 6 7 7 [SerializeField] 8 8 private Color endColor;
Assets/TestProjectileControlBehavior.cs.meta Assets/External Libraries/DanmakuUnity2D/Controllers/Projectile Cotnrollers/ColorFadeProjectile.cs.meta