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
float posX, posY; | |
float speedX, speedY; | |
float size; | |
float gravity = 0.4; | |
boolean isMoving; | |
PImage cat = new PImage(); | |
void setup(){ |
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
//Enemy someEnemy; //declare a new object of the class "Enemy" | |
Enemy[] manyEnemies; | |
void setup(){ | |
size(1280,600); | |
// someEnemy = new Enemy(); //initialize our new enemy object | |
manyEnemies = new Enemy[20]; | |
for (int i = 0; i < manyEnemies.length; i++){ |
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; | |
using UnityEngine.SceneManagement; | |
//HOW TO USE:: | |
//make a new "C# Script" in the project tab and give it the name "SceneLoad" | |
//open up the new script and paste the entire contents | |
//attach the new script to your player object | |
//Create a new GameObject, adding one of the Collider2D components | |
//check the "is trigger" box for the collider settings |
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 DestroyCollision : MonoBehaviour { //in the project tab of Unity, make a new "C# Script" called "DestroyCollision" | |
public string tagName; //this will show up as an input box for the component, which can be given a tag of your choice. assign the | |
void OnCollisionEnter2D(Collision2D myCol) { //run the following whenever a collision happens to the object attached with this script | |
Debug.Log("Collision with " + myCol.gameObject); |
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
//declare a new int called howManyHoursOfSleep and assign it a value of 6 | |
int howManyHoursOfSleep = 6; | |
void setup(){ //this runs once | |
size(1920,1080); //make the windows this size | |
//i could also assign a value in here | |
//howManyHoursOfSleep = 6; | |
} |
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 Move : MonoBehaviour { | |
public int playerX, playerZ; | |
public GameObject textObject; | |
// 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
PImage beyonce; | |
PImage bg; | |
int bW, bH; | |
int bX, bY; | |
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 Move : MonoBehaviour { | |
public GameObject textThing; | |
bool hasKey; | |
public Vector3[] verboten; |
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 x; | |
int y; | |
int w; | |
int h; | |
int bg; | |
Boolean toTheLeft; | |
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 MoveWKey : MonoBehaviour { | |
public GameObject textThing; | |
bool hasKey; | |
public GameObject key; |