Skip to content

Instantly share code, notes, and snippets.

View sabotai's full-sized avatar

Juno AM sabotai

View GitHub Profile
int howMany = 5;
void setup() {
size(1280, 720);
}
void draw() {
//we use 'i' to iterate through our loop
@sabotai
sabotai / Laser.cs
Created March 29, 2017 21:12
GD205_W7_Raycasting
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Laser : MonoBehaviour {
public GameObject prefab;
public float laserPower;
// Use this for initialization
void Start () {
//using variables to keep track of x and y positions of both ellipses
int eX, eY;
int eX2, eY2;
int dia;
void setup(){
size(1280, 720);
eX = width/4;
eY = height/2;
eX2 = int(width * 0.75);
@sabotai
sabotai / CollisionBoom.cs
Created March 22, 2017 21:19
GD205_Week6_OnCollisionEnter()
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CollisionBoom : MonoBehaviour {
public Renderer rend;
// Use this for initialization
void Start () {
rend = GetComponent<Renderer>();
boolean wearShades;
boolean wearBandana;
boolean eatenShades;
PImage doge;
PImage shades;
PImage bandana;
int bandanaX, bandanaY;
@sabotai
sabotai / BasicConditionals.cs
Last active March 15, 2017 22:18
GD205 Spring 2017 Week 4
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 GameObject mover;
public GameObject finishPos;
@sabotai
sabotai / PhysicsMove.cs
Last active March 15, 2017 22:30
GD205 Spring 2017 Week 5
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PhysicsMove : MonoBehaviour {
public Rigidbody myRb;
public GameObject target;
Vector3 targetPos;
public float thrust;
int ballX, ballY;
int ballSize;
float xSpeed, ySpeed;
int rectX, rectY, rectW, rectH;
void setup() {
size(1280, 720);
ballX = 100;
@sabotai
sabotai / GD105_Week4_InClass.pde
Created March 6, 2017 17:53
Basic Conditionals and Collisions
int cirX, cirY;
//storing variables for each of the 4 rects
int rectXa, rectYa, rectW, rectH;
int rectXb, rectYb;
int rectXc, rectYc;
int rectXd, rectYd;
void setup(){
size(1280,720);
@sabotai
sabotai / BasicConditionals.cs
Created February 22, 2017 22:36
GD205 - Week 3
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;
Vector3 moverOrigin; // we will use this to store the original position of mover