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
private static async Task<IEnumerable<ReferencedSymbol>> FindReferencesAsync(UnityEngine.Object asset) | |
{ | |
var _ = typeof(Microsoft.CodeAnalysis.CSharp.Formatting.CSharpFormattingOptions); | |
string scriptPath = Path.GetFullPath(UnityEditor.AssetDatabase.GetAssetPath(asset)); | |
//Prepare paths | |
string folder = Application.dataPath + "/../"; | |
string projectPath = Directory.EnumerateFiles(folder, "*.csproj", SearchOption.TopDirectoryOnly).First(); | |
projectPath = @"D:\Users\Lachee\Documents\Unity Projects\DistanceJam\Assembly-CSharp.csproj"; |
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
https://i.lu.je/2020/J3Up2se5qE.mp4 Here is a mp4 of my current issue. The blue is 0,0,1 (left), and the red is 1,0,0 (right). It is spinning clockwise. Here is a topdown representation: https://i.lu.je/2020/mspaint_60BodePItv.png | |
Why is the right actually on the left? I can fix this by flipping the perspective, but then everything else is flipped and it rotates counter clockwise? | |
```golang | |
var rotCubeVerts = []Vector3{ | |
//Vector3{-1, -1, -1}, Vector3{1, -1, -1}, Vector3{1, 1, -1}, Vector3{-1, 1, -1}, // Back Face | |
Vector3{-1, -1, 1}, Vector3{1, -1, 1}, Vector3{1, 1, 1}, Vector3{-1, 1, 1}, // Front Face | |
//Vector3{-1, -1, -1}, Vector3{-1, 1, -1}, Vector3{-1, 1, 1}, Vector3{-1, -1, 1}, // Left Face | |
Vector3{1, -1, -1}, Vector3{1, 1, -1}, Vector3{1, 1, 1}, Vector3{1, -1, 1}, // Right Face | |
//Vector3{-1, -1, -1}, Vector3{-1, -1, 1}, Vector3{1, -1, 1}, Vector3{1, -1, -1}, // Bottom Face | |
Vector3{-1, 1, -1}, Vector3{-1, 1, 1}, Vector3{1, 1, 1}, Vector3{1, 1, -1}, //Top Face |
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
/// <summary> | |
/// Cyclic List will never end and cycle back on itself. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
class CyclicList<T> : IEnumerable<T> | |
{ | |
private T[] _list; | |
private int _index; | |
/// <summary> |
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
require('dotenv').config(); | |
const Discord = require('discord.js'); | |
const discord = new Discord.Client(); | |
const ContextConverter = { | |
convert: async function(prt, type) { | |
switch (type) { | |
default: return false; | |
case 'boolean': | |
if (prt != "true" && prt != "false" && prt != "yes" && prt != "no") return false; |
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
class Config | |
{ | |
public string Project { get; set; } = "AProject"; | |
public string Repository { get; set; } = "ARepo"; | |
public string Organization { get; set; } = "https://dev.azure.com/org"; | |
public LazyKey Credentials { get; set; } = "devops.key"; | |
} |
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
--- | |
--- | |
@import "{{ site.theme }}"; | |
/** | |
Custom dark theme for Github Pages, by Lachee. | |
Put this exactly /assets/css/style.scss in your GitHub Pages root. | |
*/ |
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
/** | |
Generate a grid of all permutations of a binary (black and white) NxN pixel image (where n is between 2 and 5). | |
Then filter it so it removes: | |
all rotationally symmetric patterns ( rotating it 90 is considered the same patterns ) | |
all non-contiguous patterns ( all the white islands must be connected ) | |
all translationally the same patterns (dont know the term) ( if you move it some distance to the left, its considered the same pattern ) ( i solved this by cropping the image to best fit and then scaling back up ) | |
The result hopefully should be unique tetris pieces | |
*/ | |
const canvas = document.querySelector('canvas#shapes'); |
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
public class Why : Span<U>, IDisposable where U : struct | |
{ | |
const sbyte BECAUSE_YES = 2; | |
public object Contents { get => (string)this; set { _ = value; } }; | |
public void Dispose() { throw new NotImplementedException(); } | |
public static explicit operator string(Why y) { return "cause fuck you"; } | |
} | |
public async IAsyncEnumerable<T> OhGod<T>(T t) where T : Why | |
{ |
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 UnityEngine; | |
public class LevelManager : Singleton<LevelManager> { | |
private void Start() { | |
Debug.Log("This is a singleton!", LeveLManager.instance); | |
} | |
public IEnumerator SoftWaitExample() { | |
yield return LevelManager.wait; |
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; | |
using System.IO; | |
#if UNITY_5_3_OR_NEWER | |
using UnityEngine; | |
#else | |
using System.Numerics; | |
#endif | |
namespace Lachee.Dynamic |