Skip to content

Instantly share code, notes, and snippets.

View gjroelofs's full-sized avatar

Gijs-Jan Roelofs gjroelofs

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using UnityEngine;
using TypeCache = UnityEditor.TypeCache;
@gjroelofs
gjroelofs / Grid
Last active February 27, 2020 17:08
Burst & Grid
Problem:
Concept of entities with volume that define different characteristics which need
to be volume tested against for various gamelogic purposes. Previous iteration
was a grid implementation where these characteristics were represented as
bitflags, each `int` a gamelogic concept to be tested against. E.g. Pathing:
[None, Impassable, Occupied, Walkable, Flyable, Vaultable, Climbable,
Interactable, Teleporter, Staircase]
Any volume placed on the grid would OR added to the grid's characteristics
bitmasks of the cells it occupied.
/* Move help button to the top */
.help_button--button--4Ly1iuWp {
top: 22px;
}
@gjroelofs
gjroelofs / JS Move Menu Coda Bottom
Last active October 31, 2019 12:58
Coda move header menu to the bottom
/*************** Move header to the bottom **************/
$(document).arrive(".title_bar--root--KjDBqrRl", function() {
$(this).appendTo($(this).parent());
});
/* Ensure that cards without images don't reserve space for them. */
.card_view--root--1ItV2NTu .card_view--mediaTop--3m6a0XK2 {
box-sizing: border-box;
height: 100%;
margin-left: auto;
margin-right: auto;
padding: 0px;
}
@gjroelofs
gjroelofs / CSS TOC - Coda
Created October 12, 2019 14:07
CSS for automatic TOC creation for Coda
/** Table of Contents. **/
#toc {
position: fixed;
display: table;
padding: 10px;
border: 1px solid #a2a9b1;
background-color: white;
padding: 5px;
font-size: 95%;
@gjroelofs
gjroelofs / JS TOC - Coda
Last active October 14, 2019 10:49
Javascript injection hack to create a TOC for Coda, also see: https://gist.github.com/gjroelofs/8cd6d0908ac72783ec97bbf7e0c91ef0 for CSS
/** Table of Contents **/
var AUTOGENERATED_TABLE_OF_CONTENTS = true;
var TOC_ID_PREFIX = "auto_toc_";
var canvasSection = ".document--root--MUOgORi0";
var codeH1 = ".kr-h1";
var codeH2 = ".kr-h2";
var codeH3 = ".kr-h3";
.card_view--root--1ItV2NTu {
transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
position: relative;
box-sizing: border-box;
width: 100%;
background: white;
cursor: default;
padding: 5px;
}
/*************** Hierarchical Sections *******************/
var folders = {
// "<name>" : JQueryObject (section)
};
var childMapping = {
// "PX-2": [
// "Sprint Planning"
// ],
"Its not the bananas. I'm a bad conductor."