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
public static class ArhiFastHasher | |
{ | |
private static char[] Buffer = new char[1024]; | |
public static ulong HashStr(string str) | |
{ | |
str.CopyTo(0, Buffer, 0, str.Length); | |
ulong hash = 14695981039346656037UL; //offset | |
for (var i = 0; i < str.Length; i++) |
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
public class AlmostFriendClass | |
{ | |
interface INestedClass | |
{ | |
void CallMethod(AlmostFriendClass afc); | |
} | |
public class NestedClass : INestedClass | |
{ |
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; | |
namespace Game.Shared.Helpers | |
{ | |
public class GamePool<T> where T : class | |
{ | |
private readonly Stack<T> _pool; | |
private readonly Func<T> _creator; |
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; | |
namespace Game.Shared.Helpers | |
{ | |
public class FastList<T> : IList<T> | |
{ | |
private T[] _items; | |
private int _count; |
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.Generic; | |
namespace Game.Shared.Helpers | |
{ | |
public interface IStateMachineOwner | |
{ | |
StateMachine StateMachine { get; } | |
} | |
public interface IState |
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
interface IGameTask | |
{ | |
void Execute(); | |
} | |
class GameTaskManager : IDisposable | |
{ | |
class TaskThread : IDisposable | |
{ | |
private bool _isRunning; |
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; | |
namespace Game.Shared.Helpers | |
{ | |
public class StateMachine<TStateEnum, TCommandEnum, TStateMachine> | |
where TStateEnum : struct, IComparable, IFormattable, IConvertible | |
where TCommandEnum : struct, IComparable, IFormattable, IConvertible | |
where TStateMachine : StateMachine<TStateEnum, TCommandEnum, TStateMachine> | |
{ |
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.Diagnostics; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using System.Threading; | |
using UnityEditor; | |
using UnityEngine; | |
using Debug = UnityEngine.Debug; |
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
#if !UNITY | |
using System; | |
namespace UnityEngine | |
{ | |
public struct Vector3 | |
{ | |
public float x; | |
public float y; | |
public float z; |
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 Game.Shared.MathHelpers; | |
using UnityEngine; | |
#if !UNITY | |
namespace UnityEngine | |
{ | |
public struct Quaternion | |
{ | |
public float x; |
OlderNewer