Skip to content

Instantly share code, notes, and snippets.

View sabotai's full-sized avatar

Juno AM sabotai

View GitHub Profile
@sabotai
sabotai / gd105_week5_in_class.pde
Created September 22, 2016 20:42
GD105 In Class
//declaring variable to keep track of our rectangle parameters
int rectX, rectY, rectW, rectH;
int lvlNum;
void setup(){
size(1280,720);
rectX = width/2;
rectY = height/3;
rectW = 300;
@sabotai
sabotai / Hangry.cs
Last active September 27, 2016 21:36
GD205 F16 Week 5 In-Class
using UnityEngine;
using System.Collections;
public class Hangry : MonoBehaviour {
public GameObject fishPellet;
Vector3 destination;
public float howHungry;
bool hungry;
@sabotai
sabotai / GD105_Week6_A.pde
Created September 29, 2016 22:19
GD105 Week 6 Basic Loop
int howMany;
void setup(){
size(1280,720);
//use center mode so it doesnt draw the first one off-screen
ellipseMode(CORNER);
howMany = 5;
}
@sabotai
sabotai / GD105_Week6_B.pde
Created September 29, 2016 22:20
GD105 Week 6 Review Bounce
PImage face;
float xPos, yPos;
float imgDia;
float xSpeed, ySpeed;
void setup(){
size(1280, 720);
face = loadImage("face.png");
@sabotai
sabotai / BasicClickGame.pde
Created October 13, 2016 21:09
GD105_Week7_Basic_Array_Click_Game
int howMany = 10;
//set up new arrays(lists) of on/off state, x and y positions. use howMany to set up the right number of positions
Boolean[] onOff = new Boolean[howMany];
int[] xPos = new int[howMany];
int[] yPos = new int[howMany];
//keep track of the diameter
int dia = 50;
@sabotai
sabotai / Hangry.cs
Created October 14, 2016 21:09
GD205 Week 6 F16
using UnityEngine;
using System.Collections;
public class Hangry : MonoBehaviour {
public GameObject fishPellet;
public float howHangry;
bool hungry;
public float sphereSize = 10f;
@sabotai
sabotai / Scott.cs
Created October 18, 2016 19:37
GD205 Fall16 Raycast Intro
using UnityEngine;
using System.Collections;
public class Scott : MonoBehaviour {
public float scottStrength = 1000f;
public AudioClip explosionSound;
public GameObject blueprint; //which prefab/gameobject would we like to create?
// Update is called once per frame
@sabotai
sabotai / GD105_Week8_Bounce.pde
Created October 20, 2016 21:00
GD105 F16 Physics Example
float posX, posY;
float speedX, speedY;
float size;
float gravity = 0.4;
boolean isMoving;
PImage cat = new PImage();
void setup(){
size(1280,720);
@sabotai
sabotai / PongPong.pde
Last active October 21, 2016 05:57
A Bounce Game
PVector ball, ballSpeed, ballSize;
PVector gravity;
PVector[] points = new PVector[2];
boolean above;
int score = 0;
boolean angleUp;
float value = 0;
void setup() {
float posX, posY;
float speedX, speedY;
float size;
float gravity = 0.4;
boolean isMoving;
PImage cat = new PImage();
void setup(){
size(1280,720);