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
// Script for base test character! | |
// =============================== | |
// List of all dungeons to complete once | |
// This is for progression unlocks like the passive slot. | |
const dungeonsToComplete = [ | |
'melvorF:Into_the_Mist', | |
'melvorF:Impending_Darkness', | |
'melvorD:Volcanic_Cave', | |
'melvorF:Air_God_Dungeon', |
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; | |
public class Program | |
{ | |
private static Random r = new Random(); | |
public static void Main() | |
{ | |
long rolls = 0; | |
long total = 0; |
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 Logger | |
{ | |
private readonly object m_syncRoot; | |
private readonly string m_logFileName; | |
private const string timeFormat = "yyyy-MM-dd HH:mm:ss"; | |
/// <summary> | |
/// The minimum <see cref="LogLevel"/> required for log messages to be logged. | |
/// </summary> | |
public LogLevel MinimumLevel |
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
// Loads all .dll files embedded as resources from the folder Root/Libs | |
// This allows for single file, portable executables | |
static App() | |
{ | |
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; | |
} | |
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) | |
{ |
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.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using UnityEngine; | |
/// <summary> | |
/// A collection of common math functions. | |
/// </summary> | |
[StructLayout(LayoutKind.Sequential, Size = 1)] | |
public struct MathFast |
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
.NET variant. Does NOT work in .Net Core environments. | |
public unsafe class UnsafeSocket : Socket | |
{ | |
#region Unsafe Setup | |
private delegate int UnsafeSocketHandle(IntPtr socketHandle, byte* buffer, int length, SocketFlags socketFlags); | |
private static UnsafeSocketHandle UnsafeSend; | |
private static UnsafeSocketHandle UnsafeReceive; | |
private static MethodInfo GetHandleInfo; |
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; | |
namespace GitGists | |
{ | |
[Serializable] | |
public struct BlittableBool : IComparable, IConvertible, IComparable<BlittableBool>, IEquatable<BlittableBool> | |
{ | |
private const int True = 1; | |
private const int False = 0; |