Skip to content

Instantly share code, notes, and snippets.

View sabotai's full-sized avatar

Juno AM sabotai

View GitHub Profile
@sabotai
sabotai / ScreenShake.cs
Created November 1, 2016 19:50
ScreenShake for GD205
using UnityEngine;
using UnityEngine;
using System.Collections;
public class ScreenShake : MonoBehaviour {
//generic shake script
// Use this for initialization
void Start () {
}
@sabotai
sabotai / CannonBoom.cs
Created November 1, 2016 20:56
Cannon Action from GD205 Week 9
using UnityEngine;
using System.Collections;
public class CannonBoom : MonoBehaviour {
public GameObject projBlueprint;
public Transform projOrigin;
Quaternion newRotation;
public GameObject cannon;
public float projForce = 300f;
@sabotai
sabotai / infinity2.js
Created November 4, 2016 19:43
an infinite scroll script repaired ... probably broken before because of tumblr change
var tumblrAutoPager={url:"/web/20150212183510/http://proto.jp/",ver:"0.1.7",rF:true,gP:{},pp:null,ppId:"",LN:location.hostname,init:function(){if($("autopagerize_icon")||navigator.userAgent.indexOf('iPhone')!=-1)return;
var tAP=tumblrAutoPager;
var p=1;
var lh=location.href;
var lhp=lh.lastIndexOf("/page/");
var lht=lh.lastIndexOf("/tagged/");
if(lhp!=-1){p=parseInt(lh.slice(lhp+6));
tAP.LN=lh.slice(7,lhp);
}else if(lht!=-1){tAP.LN=lh.slice(7);
if(tAP.LN.slice(tAP.LN.length-1)=="/")tAP.LN=tAP.LN.slice(0,tAP.LN.length-1);
@sabotai
sabotai / GD105_Week10_Classes.pde
Last active November 10, 2016 22:04
Week 10 - custom classes and objects in Processing
Enemy baddie; //declaring a single enemy object called baddie
Enemy[] baddies; //declaring an array of enemy objects called baddies
void setup(){
size(1280,720);
baddies = new Enemy[10]; //how many in the array?
for (int i =0; i < baddies.length; i++){
baddies[i] = new Enemy(); //initialize each one of the baddies in the array
@sabotai
sabotai / grab.cs
Created November 14, 2016 21:40
eg
using UnityEngine;
using System.Collections;
public class grab : MonoBehaviour {
// Use this for initialization
void Start () {
}
@sabotai
sabotai / GD105_HW2.pde
Created February 6, 2017 16:52
Game Programming I Week 2 Homework :)
//introduce setup and draw into your hw from last week
//replace "hard-coded" values with variables that you declare and assign!
float xPos;
void setup(){
size(1280,720);
xPos = 5;
//frameRate(1);
//introduce setup and draw into your hw from last week
//replace "hard-coded" values with variables that you declare and assign!
int xPos;
void setup(){
size(1280,720);
xPos = 5;
//frameRate(1);
}
@sabotai
sabotai / BasicConditionals.cs
Created February 8, 2017 21:40
GD205-S17-W2
using UnityEngine;
using System.Collections;
public class BasicConditionals : MonoBehaviour {
public bool goToWork;
public GameObject mover;
// Use this for initialization
void Start () {
using UnityEngine;
using System.Collections;
public class BasicConditionals : MonoBehaviour {
//make new public bool and GameObjects
//remember that public means they can be edited in the Unity editor and by other scripts
public bool goToWork;
public GameObject mover;
@sabotai
sabotai / Gd105-w3.pde
Created February 15, 2017 14:45
GD105 Homework 3
void setup(){
size(1000,1000);
}
void draw(){
background(200);
}