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 BitSet | |
| { | |
| public ulong[] Bits0 { get; private set; } = Array.Empty<ulong>(); | |
| public ulong[] Bits1 { get; private set; } = Array.Empty<ulong>(); | |
| public void Add(int id) | |
| { | |
| var id0 = id >> 6; | |
| var id1 = id >> 12; |
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.Runtime.InteropServices; | |
| using UnityEngine; | |
| using Object = UnityEngine.Object; | |
| public static class PhysicsUtils | |
| { | |
| private static readonly Collider[] _colliders = new Collider[512]; | |
| private static SphereCollider _probeSphere; |
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 static class ListExtensions | |
| { | |
| public static void RadixSort<T>(this List<T> list, Func<T, uint> orderBy) | |
| { | |
| RadixCountBytesSort(list, orderBy); | |
| } | |
| private static void RadixCountBytesSort<T>(List<T> list, Func<T, uint> orderOf) | |
| { | |
| var count = list.Count; |
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 Tetris | |
| { | |
| public struct Block | |
| { | |
| public Vector2Int Offset; | |
| } | |
| public struct Tetromino |
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.Reflection; | |
| using Plugins.InterfaceObjectField.Runtime; | |
| using UnityEditor; | |
| using UnityEditor.SceneManagement; | |
| using UnityEngine; | |
| using Object = UnityEngine.Object; | |
| [CustomPropertyDrawer(typeof(InterfaceFieldAttribute))] |
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.Runtime.CompilerServices; | |
| using UnityEngine; | |
| public readonly struct Angle : IEquatable<Angle> | |
| { | |
| private const float PIRad = Mathf.PI; | |
| private const float TwoPIRad = PIRad * 2f; | |
| private const float HalfPIRad = PIRad * 0.5f; |
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
| Shader "UI/BlurImage" | |
| { | |
| Properties | |
| { | |
| [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
| _Color ("Tint", Color) = (1,1,1,1) | |
| [Space(50)] | |
| _BlurX ("X Blur", Range(0.0, 0.5)) = 0.001 | |
| _BlurY ("Y Blur", Range(0.0, 0.5)) = 0.001 |
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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using UnityEngine; | |
| public interface IKdTreePosition | |
| { | |
| Vector3 Position { get; } | |
| } |
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 AttackState : IBehaviorState | |
| { | |
| private readonly ICharacter _character; | |
| public AttackState(ICharacter character) | |
| { | |
| _character = character; | |
| } | |
| public IBehaviorState Execute(long time) |
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
| Shader "Custom/Sprite Billboard" | |
| { | |
| Properties | |
| { | |
| [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
| _Color ("Tint", Color) = (1,1,1,1) | |
| [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
| [Header(Aligning)] | |
| _ScaleX ("Scale X", Float) = 1.0 |