Skip to content

Instantly share code, notes, and snippets.

View RevenantX's full-sized avatar

Ruslan Pyrch RevenantX

View GitHub Profile
using System;
using System.Net;
using System.Net.Sockets;
using LiteNetLib.Utils;
namespace Code.ExperimentalCode
{
public class UdpNetWrapper
{
class ClientData
namespace Game.Shared.Helpers
{
public class GameTimer
{
private float _time;
private float _maxTime;
public GameTimer(float maxTime)
{
_maxTime = maxTime;
using System;
using System.Diagnostics;
namespace Game.Shared.Helpers
{
public class LogicTimer
{
public const float FixedDelta = 0.015f;
public const long FixedDeltaNano = 15000 * 1000L;
public const float TicksPerSecond = 1.0f / FixedDelta;
using System;
using Game.Shared.MathHelpers;
using UnityEngine;
#if !UNITY
namespace UnityEngine
{
public struct Quaternion
{
public float x;
#if !UNITY
using System;
namespace UnityEngine
{
public struct Vector3
{
public float x;
public float y;
public float z;
@RevenantX
RevenantX / FindUsages.cs
Last active June 5, 2024 08:14
Find asset usages in prefabs and scenes (Unity3d)
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;
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>
{
interface IGameTask
{
void Execute();
}
class GameTaskManager : IDisposable
{
class TaskThread : IDisposable
{
private bool _isRunning;
using System.Collections.Generic;
namespace Game.Shared.Helpers
{
public interface IStateMachineOwner
{
StateMachine StateMachine { get; }
}
public interface IState
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;