-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
* 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
There are no files selected for viewing
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 |
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.
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 |
---|---|---|
@@ -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.