This file contains hidden or 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
// D* Lite is an incremental heuristic search algorithm that finds the shortest path in a graph | |
// from a goal node to a start node. It is designed to be efficient in terms of memory and computation | |
// while updating the graph in real-time. | |
// Koenig and Likhachev - http://idm-lab.org/bib/abstracts/papers/aaai02b.pdf | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; |
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.LowLevel; | |
using UnityEngine.PlayerLoop; | |
namespace ImprovedTimers { | |
public static class TimerManager { | |
static readonly List<Timer> timers = new(); |
This file contains hidden or 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.Linq; | |
using UnityEngine; | |
public abstract class Mediator<T> : MonoBehaviour where T : Component, IVisitable { | |
readonly List<T> entities = new List<T>(); | |
public void Register(T entity) { | |
if (!entities.Contains(entity)) { |
This file contains hidden or 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
[user] | |
email = [email protected] | |
name = Your Name | |
[alias] | |
co = checkout | |
ct = commit | |
ci = commit | |
st = status -sb | |
br = branch |
This file contains hidden or 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.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
[Serializable] | |
public class SerializableType : ISerializationCallbackReceiver { | |
[SerializeField] string assemblyQualifiedName = string.Empty; | |
public Type Type { get; private set; } |
This file contains hidden or 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
[CreateAssetMenu(fileName = "AbilityData", menuName = "ScriptableObjects/AbilityData", order = 1)] | |
public class AbilityData : ScriptableObject { | |
public AnimationClip animationClip; | |
public int animationHash; | |
public float duration; | |
public Sprite icon; | |
public string fullName; | |
void OnValidate() { |
This file contains hidden or 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.Collections; | |
/// <summary> | |
/// Initializes a new instance of the ObservableList class that is empty | |
/// or contains elements copied from the specified list. | |
/// </summary> | |
/// <param name="initialList"> The list to copy elements from. </param> | |
public interface IObservableList<T> { |
This file contains hidden or 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; | |
[Serializable] | |
public class Observable<T> { | |
private T value; | |
public event Action<T> ValueChanged; | |
public T Value { | |
get => value; |
This file contains hidden or 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 Preconditions { | |
Preconditions() { } | |
public static T CheckNotNull<T>(T reference) { | |
return CheckNotNull(reference, null); | |
} | |
public static T CheckNotNull<T>(T reference, string message) { |
This file contains hidden or 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
public class LoadSceneAttribute : NUnitAttribute, IOuterUnityTestAction { | |
readonly string scene; | |
public LoadSceneAttribute(string scene) => this.scene = scene; | |
public IEnumerator BeforeTest(ITest test) { | |
Debug.Assert(scene.EndsWith(".unity"), "Scene must end with .unity"); | |
yield return EditorSceneManager.LoadSceneInPlayMode(scene, new LoadSceneParameters(LoadSceneMode.Single)); | |
} |