Skip to content

Instantly share code, notes, and snippets.

@wblackall
wblackall / TrapezoidSprite.cs
Last active December 11, 2015 08:38
How to draw a trapezoid from scratch!
using UnityEngine;
using System;
public class TrapezoidSprite : FSprite
{
public float trapezoidWidth;
public float trapezoidHeight;
public float insetFromSide;
public TrapezoidSprite (string imageName, float width, float height, float inset) : base() {
@wblackall
wblackall / CroppedSprite
Last active December 11, 2015 06:48
This is a class I wrote based on the FWipeSprite in Futile's development branch (https://github.com/MattRix/Futile/blob/development/BananaDemoProject/Assets/Plugins/Futile/Extras/FWipeSprite.cs). It's just a proof of concept. I wanted to learn not only how to draw things, but also how to keep a texture still while moving a cropped "window" aroun…
using UnityEngine;
using System;
// this Point class is just so I can use it with GoKit
public class Point {
private float x_;
private float y_;
public Point(float x, float y) {
this.x = x;