Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace UnityTools.SpawnPoint
{
public class Editor_SpawnPoint : EditorWindow
{
@uhusofree
uhusofree / PlayerComponent
Last active July 8, 2022 23:20
KungFunked sample
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.Design;
using Unity.Profiling;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;
@uhusofree
uhusofree / Hurdle Compnent
Created January 15, 2021 11:46
PoK'our hurdling
#include "HurdleComponent.h"
#include "PlayerCharacter.h"
#include <Components/ActorComponent.h>
#include <Components/SceneComponent.h>
#include <GameFramework/Actor.h>
#include <DrawDebugHelpers.h>
#include <CollisionQueryParams.h>
UHurdleComponent::UHurdleComponent()
@fasiha
fasiha / combinatorics.ts
Created October 30, 2020 04:17
JavaScript/TypeScript basic combinatorics generators/iterators—because I always forget how these work
function* range(start: number, end: number) {
for (; start <= end; ++start) { yield start; }
}
function last<T>(arr: T[]) { return arr[arr.length - 1]; }
export function* numericCombinations(n: number, r: number, loc: number[] = []): IterableIterator<number[]> {
const idx = loc.length;
if (idx === r) {
yield loc;
return;
}
@jdegoes
jdegoes / fpmax.scala
Created July 13, 2018 03:18
FP to the Max — Code Examples
package fpmax
import scala.util.Try
import scala.io.StdIn.readLine
object App0 {
def main: Unit = {
println("What is your name?")
val name = readLine()