Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Jobs;
using System;
using Unity.Collections;
using TrueSync;
using TerriFighter;
//TS and FP values are from the TrueSync library. If anyone wants to test this functions with datatypes available in C# and Unity..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
public static class HashUtility {
private static Dictionary<Type, System.Reflection.FieldInfo[]> typeTovalueFieldInfoLookup;
namespace UnityEngine
{
public static class DebugWrapper
{
public const string conditionalName = "UNITY_EDITOR";
//
// Summary:
// ///
using UnityEngine;
using TrueSync;
using System;
using System.Collections.Generic;
namespace TF2018
{
public class ShockwavePrototype : MonoBehaviour
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Attach the script to a component with a spriterenderer.
/// Set the desired color for the damage state with SetDamageColor(Color color)
/// Call EnableDamageEffect(float duration) to activate the damage effect for a desired duration
/// Call DisableDamageEffect() to disable the effect immediately
/// </summary>
using UnityEngine;
using UnityEditor;
using System.IO;
using System;
namespace TF2018.UI
{
/// <summary>
/// Will copy the import data from a reference model to all animations in a specific folder
///- files have to be of type fbx
@FleshMobProductions
FleshMobProductions / BruhCrypt.cs
Created August 14, 2019 05:21
C# Port of the Bruh Crypt algorithm from the Cherno Discord Server
using System;
using System.Text;
public static class BruhCrypt {
public static string BruhEncrypt(string input) {
StringBuilder sb = new StringBuilder();
char temp;
for (int i = 0; i < input.Length; i++) {
using UnityEngine;
namespace FMPUtils
{
/// <summary>
/// In order to apply the delta movement to an object, just check if the object is grounded on this obstacle,
/// and if it is, store a reference to this behaviour and call one of the following methods in the Update() for
/// applying the delta movement of this object: ApplyDeltaTranslationTo, ApplyDeltaRotationTo or
/// ApplyDeltaTranslationRotationTo. If the object is disabled, delta changes are 0 and positions / rotations
/// won't get updated.
@FleshMobProductions
FleshMobProductions / WeightedRandomPrefabSupply.cs
Last active July 5, 2022 16:05
Weighted Randomness class for Unity
using UnityEngine;
namespace FMPUtils.Randomness
{
public class WeightedRandomPrefabSupply : MonoBehaviour
{
[System.Serializable]
public class WeightedGameObjectElement : WeightedElement<GameObject>
{
}
@FleshMobProductions
FleshMobProductions / PerlinNoiseMap.cs
Last active September 29, 2020 19:58
Example of Weighted Random point distribution within a value range of Perlin Noise Maps in Unity.
using UnityEngine;
namespace FMPUtils.Randomness
{
[System.Serializable]
public class PerlinNoiseMap
{
[SerializeField] private Vector2Int originOffset;
[SerializeField] private Vector2Int mapSize;
[SerializeField] private float cellSampleSizeMultiplier;