Skip to content

Commit

Permalink
Dump from Dogfight
Browse files Browse the repository at this point in the history
* DynamicFloats and DynamicInts
* Restructured so that it wasn't in Plugins anymore (for some reason, Unity doesn't compile source code inside Plugins)
  • Loading branch information
james7132 committed Mar 30, 2015
1 parent 651a594 commit 2c90144
Show file tree
Hide file tree
Showing 185 changed files with 3,754 additions and 3,339 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "Assets/Plugins/UnityUtilLib"]
path = Assets/Plugins/UnityUtilLib
path = Assets/External/UnityUtilLib
url = https://github.com/james7132/UnityUtilLib.git
4 changes: 2 additions & 2 deletions Assets/Plugins.meta → Assets/External.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ public class Burst : AttackPattern {
private FrameCounter burstDelay;

[SerializeField]
[Range(-180f, 180f)]
private float burstInitialRotation;
private DynamicFloat burstInitialRotation;

[SerializeField]
[Range(-360f, 360f)]
private float burstRotationDelta;
private DynamicFloat burstRotationDelta;

[SerializeField]
private ProjectileControlBehavior[] controllers;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public class EnemyBasicAttack : AttackPattern {
private FrameCounter fireDelay;

[SerializeField]
private float velocity;
private DynamicFloat velocity;

[SerializeField]
public float angV;
public DynamicFloat angV;

[SerializeField]
private float currentDelay;
private DynamicFloat currentDelay;

[SerializeField]
private float generalRange;
private DynamicFloat generalRange;

[SerializeField]
private ProjectilePrefab basicPrefab;
private DanmakuPrefab basicPrefab;

protected override bool IsFinished {
get {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
using UnityEngine;
using System.Collections;

namespace Danmaku2D.AttackPatterns {


public class ObjectAttackPattern : TimedAttackPattern {

public GameObject prefab;
public Vector2 position;
private GameObject Runtime;

protected override void OnInitialize () {
base.OnInitialize ();
if(prefab == null)
throw new MissingReferenceException(GetType().ToString() + " needs a prefab to function.");
Runtime = TargetField.SpawnGameObject(prefab, position);
}

protected override void OnFinalize () {
base.OnFinalize ();
if (Runtime != null)
Destroy (Runtime);
}
}

using UnityEngine;
using System.Collections;

namespace Danmaku2D.AttackPatterns {


public class ObjectAttackPattern : TimedAttackPattern {

public GameObject prefab;
public Vector2 position;
private GameObject Runtime;

protected override void OnInitialize () {
base.OnInitialize ();
if(prefab == null)
throw new MissingReferenceException(GetType().ToString() + " needs a prefab to function.");
Runtime = TargetField.SpawnGameObject(prefab, position);
}

protected override void OnFinalize () {
base.OnFinalize ();
if (Runtime != null)
Destroy (Runtime);
}
}

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
using UnityEngine;
using System.Collections;
using UnityUtilLib;

/// <summary>
/// A development kit for quick development of 2D Danmaku games
/// </summary>
namespace Danmaku2D {
/// <summary>
/// A abstract class meant for time-limited AttackPatterns
/// </summary>
public abstract class TimedAttackPattern : AttackPattern {

/// <summary>
/// Defines how long the AttackPattern will last before automatically terminating
/// </summary>
[SerializeField]
private FrameCounter timeout;

protected override void MainLoop () {
if(timeout.Tick (false)) {
return;
}
}

protected override void OnInitialize () {
timeout.Reset ();
}

protected sealed override bool IsFinished {
get {
return timeout.Ready();
}
}
}
using UnityEngine;
using System.Collections;
using UnityUtilLib;

/// <summary>
/// A development kit for quick development of 2D Danmaku games
/// </summary>
namespace Danmaku2D {
/// <summary>
/// A abstract class meant for time-limited AttackPatterns
/// </summary>
public abstract class TimedAttackPattern : AttackPattern {

/// <summary>
/// Defines how long the AttackPattern will last before automatically terminating
/// </summary>
[SerializeField]
private FrameCounter timeout;

protected override void MainLoop () {
if(timeout.Tick (false)) {
return;
}
}

protected override void OnInitialize () {
timeout.Reset ();
}

protected sealed override bool IsFinished {
get {
return timeout.Ready();
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2c90144

Please sign in to comment.