Skip to content

Instantly share code, notes, and snippets.

View ChrisGermano's full-sized avatar
🤡
Clownin' around

Chris Germano ChrisGermano

🤡
Clownin' around
View GitHub Profile
@ChrisGermano
ChrisGermano / animate.cs
Last active August 31, 2017 13:25
Simple Data-Driven Weapon Animation in Unity 3D
//This is to be used within an existing C# file
//Either assign these in the GUI inspector or elsewhere in your code
public GameObject weapon; //The object to be animated
public Vector3[] positions; //The positions the object will animate through (local position)
public Vector3[] rotations; //The Euler angles of the object to be animated (local Euler angles)
public float[] durations; //The number of seconds the object takes to reach each position
public float variance; //The amount of variety in positions between attacks (0f for identical animations every time)
//To animate, call StartCoroutine(Attack())
@ChrisGermano
ChrisGermano / dankness.java
Last active February 11, 2016 15:27
Determines the dankness of your .meme
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class dankness {
public static void main(String[] args) throws IOException {
if (!args[0].substring(args[0].lastIndexOf('.')).equals(".meme")) {
System.out.println("ERROR - File is not a .meme, aborting.");
System.exit(1);