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.Collections.Generic; | |
using System.Linq; | |
using Sirenix.OdinInspector; | |
using Sirenix.OdinInspector.Editor; | |
using UnityEditor; | |
using UnityEngine; | |
public class StateMachineDebugWindow : OdinEditorWindow | |
{ | |
[MenuItem("Tools/State Machine Debug Window")] |
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.Collections.Generic; | |
using System; | |
using UnityEngine; | |
public class SubscriptionTracker | |
{ | |
public string Name => _owner.name; | |
private readonly MonoBehaviour _owner; | |
private readonly Dictionary<(object source, Delegate handler), Action> _subscriptions = 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 Assets.Scripts.AI; | |
using MoreLinq; | |
using UnityEngine; | |
namespace Assets.AI | |
{ | |
public class ContextMap | |
{ | |
public Vector2 Position; |
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 Assets; | |
using Assets.Scripts; | |
using System.Collections; | |
using UnityEngine; | |
using Random = UnityEngine.Random; | |
public class PlayerController : EntController | |
{ | |
public static PlayerController Instance { get; private set; } | |
[SerializeField] |
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 UnityEngine; | |
namespace Assets.Resources | |
{ | |
[CreateAssetMenu(fileName = "Card", menuName = "ScriptableObjects/New Card", order = 1)] | |
public class Card : ScriptableObject | |
{ | |
public GameObject AttackPrefab; |
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 Assets; | |
using Assets.Scripts; | |
using System.Collections; | |
using UnityEngine; | |
using Random = UnityEngine.Random; | |
public class PlayerController : EntController | |
{ | |
public static PlayerController Instance { get; private set; } | |
[SerializeField] |
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 Animancer; | |
using Assets; | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public struct InputState | |
{ | |
public Vector2 MovementDirection; |
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 Animancer; | |
using Assets; | |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public struct InputState | |
{ | |
public Vector2 MovementDirection; |
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 UnityEngine; | |
using UnityEngine.InputSystem; | |
public enum ControlMode { MOUSEANDKEYBOARD, CONTROLLER } | |
public class ControlFreak : MonoBehaviour | |
{ | |
public static ControlFreak Instance { get; private set; } | |
public static DefaultControls Controls { 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
/* | |
Results on a Ryzen 3800X, ymmv on mobile, but for desktop, | |
please just write legible code that conveys your intention. | |
Modern CPUs are fast. | |
All results are in milliseconds for 10,000,000 iterations. | |
In Editor: | |
Vector3.Distance: 437 | |
(v1-v2).Magnitude: 567 |
NewerOlder