This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int howMany = 5; | |
void setup() { | |
size(1280, 720); | |
} | |
void draw() { | |
//we use 'i' to iterate through our loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean wearShades; | |
boolean wearBandana; | |
boolean eatenShades; | |
PImage doge; | |
PImage shades; | |
PImage bandana; | |
int bandanaX, bandanaY; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PhysicsMove : MonoBehaviour { | |
public Rigidbody myRb; | |
public GameObject target; | |
Vector3 targetPos; | |
public float thrust; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ballX, ballY; | |
int ballSize; | |
float xSpeed, ySpeed; | |
int rectX, rectY, rectW, rectH; | |
void setup() { | |
size(1280, 720); | |
ballX = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |