This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class ClampedCurveAttribute : PropertyAttribute | |
{ | |
public readonly float MinX; | |
public readonly float MaxX; | |
public readonly float MinY; | |
public readonly float MaxY; | |
public ClampedCurveAttribute( float minX, float maxX, float minY, float maxY ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class PeriodicTrigger | |
{ | |
public event Action TriggerEvent; | |
private float _period; | |
private float _remaining; | |
public PeriodicTrigger( float period ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
using UnityEngine; | |
public class JsonSerialisableScriptableObject<T> : ScriptableObject where T : JsonSerialisableScriptableObject<T> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
#if USE_GAMELOGIC_EXTENSIONS | |
using Gamelogic.Extensions; | |
#endif | |
using UnityEngine; | |
/// <summary> | |
/// A lightweight state machine that support either update or coroutine pattern for states update. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CoroutineEvent<T1, T2> | |
{ | |
public delegate IEnumerator CoroutineDelegate( T1 parameter1, T2 parameter2 ); | |
private readonly List<CoroutineDelegate> _eventHandlers = new List<CoroutineDelegate>(); | |
private int _runningCoroutinesCount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using UnityEngine; | |
public static class CoroutineExtensions | |
{ | |
public static Coroutine Then( this Coroutine self, Action action ) | |
{ | |
return DefaultCoroutineHost.Instance.StartCoroutine( ChainWithAction( self, action ) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
//Original version of the ConditionalHideAttribute created by Brecht Lecluyse (www.brechtos.com) | |
//Modified by: - | |
[ AttributeUsage( AttributeTargets.Field ) ] | |
public class ConditionalHideAttribute : PropertyAttribute | |
{ | |
public readonly string ConditionalSourceField; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class StretchWithVelocity : MonoBehaviour | |
{ | |
public float MaxVelocity = 10; | |
public float MaxSpeedStretch = 0.5f; | |
public bool CompensatePosition = true; | |
public float MinVelocity = 0.1f; | |
public float Smoothing = 0.1f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define USE_GAMELOGIC_EXTENSION | |
#if USE_GAMELOGIC_EXTENSION | |
using Gamelogic.Extensions; | |
#endif | |
using UnityEngine; | |
#if USE_GAMELOGIC_EXTENSION | |
public class ShakeBehaviour : GLMonoBehaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Gamelogic.Extensions; | |
using UnityEngine; | |
public class CameraFade : Singleton<CameraFade> | |
{ | |
private void Awake() | |
{ | |
if ( Instance.FadeTexture != null ) return; | |
Instance.FadeTexture = new Texture2D( 1, 1 ); |
NewerOlder