Skip to content

Instantly share code, notes, and snippets.

prog.sublime-project
prog.sublime-workspace
@Azzizi
Azzizi / options.json
Created October 2, 2015 23:21 — forked from anonymous/options.json
Octo Chip8 Program
{"tickrate":"100","fillColor":"#306230","fillColor2":"#8BAC0F","blendColor":"#9BBC0F","backgroundColor":"#0F380F","buzzColor":"#333333","quietColor":"#000000","shiftQuirks":false,"loadStoreQuirks":false,"vfOrderQuirks":false,"enableXO":true}
@Azzizi
Azzizi / Extensions.cs
Last active August 29, 2015 14:00
Scripts for snapping to virtual pixel boundaries in low-rez Unity games. made for use with 2D Toolkit-- for Unity 2D, change the metersPerPixel calculation.
using UnityEngine;
namespace FBD
{
public static class Extensions
{
public static Transform FindInHierarchy(this Transform t, string name)
{
for (int c = 0; c < t.childCount; c++)
{
@Azzizi
Azzizi / lerpexample.cs
Created February 17, 2014 08:42
Using Mathf.lerp()
class whatever : Monobehaviour
{
float lerpTimer = 0f;
void Update()
{
if ( /* The lerp is happening */)
{
lerpTimer += Time.deltatime;
alpha = Mathf.lerp(start, end, lerpTimer/duration);
@Azzizi
Azzizi / EngineFlareShader
Created January 11, 2014 00:44
Low-effort shader for Unity that tints each color channel of a texture with a set color. I used this for tintable, multi-color engine flares on starships and similar effects.
Shader "Custom/EngineFlare"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_Color1 ("Color 1", Color) = (1,1,1,1)
_Color2 ("Color 2", Color) = (1,1,1,1)
_Color3 ("Color 3", Color) = (1,1,1,1)
_Intensity ("Intensity", Range(0.0, 2.0)) = 1.0