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 { /Verse.org/Simulation } | |
using { /Verse.org/Verse } | |
using { /Verse.org/Colors } | |
using { /Verse.org/Random } | |
using { /UnrealEngine.com/Temporary/UI } | |
using { /Fortnite.com/Devices } | |
using { /Fortnite.com/UI } |
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 { /Verse.org/Simulation } | |
using { /UnrealEngine.com/Temporary/SpatialMath } | |
using { /Fortnite.com/Devices } | |
using { /Fortnite.com/Characters } | |
movechecker_device := class(creative_device): |
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
FormatRoundedFloatAsString(Input : float, NumDigitsAfterDecimal : int) : string = | |
if: | |
Multiplier := Pow(10.0, NumDigitsAfterDecimal * 1.0) | |
RoundedValue := float[Round[Input * Multiplier] * 1.0] / Multiplier | |
BeforeDecimal := Floor[RoundedValue] | |
AfterDecimal := Abs(Round[(RoundedValue - BeforeDecimal * 1.0)*Multiplier]) | |
var AfterDecimalString : string = ToString(AfterDecimal) | |
#pad the number after the decimal with leading zeroes | |
for (It := 0..(NumDigitsAfterDecimal - AfterDecimalString.Length - 1)): |
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 { /Verse.org/Simulation } | |
using { /UnrealEngine.com/Temporary/SpatialMath } | |
using { /Fortnite.com/Devices } | |
using { /Fortnite.com/Characters } | |
movement_detector_device := class(creative_device): | |
@editable | |
MinimumMovementDistance : float = 100.0 |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
public class SpriteShapeUtils | |
{ |
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
var input = File.ReadAllText(Path.GetDirectoryName(Util.CurrentQueryPath) + @"\..\Inputs\aoc_day12.txt"); | |
var lines = input.Split('\n').Select(line=>line.Trim()).ToArray(); | |
var connections = new Dictionary<int,List<int>>(); | |
var nodes = new List<string>(); | |
foreach(var line in lines) | |
{ | |
var nodeA = line.Split('-')[0]; | |
var nodeB = line.Split('-')[1]; | |
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
var input = File.ReadAllText(Path.GetDirectoryName(Util.CurrentQueryPath) + @"\..\Inputs\aoc_day12.txt"); | |
var lines = input.Split('\n').Select(line=>line.Trim()).ToArray(); | |
var connections = new Dictionary<string,List<string>>(); | |
foreach(var line in lines) | |
{ | |
var nodeA = line.Split('-')[0]; | |
var nodeB = line.Split('-')[1]; | |
if(!connections.TryGetValue(nodeA, out var listA)) connections[nodeA] = listA = new List<string>(); | |
if(!connections.TryGetValue(nodeB, out var listB)) connections[nodeB] = listB = new List<string>(); |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
#if UNITY_EDITOR //this allows the user to put it in a non-editor folder if they want, since it's not accessing anything else | |
using UnityEditor; | |
using UnityEngine; | |
[CustomEditor(typeof(DefaultAsset))] | |
public class FolderNoteEditor : Editor | |
{ | |
bool isFolder; | |
string path; | |
AssetImporter importer; |
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 "Futile/FancyColorSwap" | |
{ | |
Properties | |
{ | |
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
_ColorR ("Red Replacement Color", Color) = (1,0,0,1) | |
_ColorG ("Green Replacement Color", Color) = (0,1,0,1) | |
_ColorB ("Blue Replacement Color", Color) = (0,0,1,1) | |
} | |