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
| Fish harry; | |
| void setup() { | |
| size(800, 800); | |
| PImage fishImage = loadImage("fish.png"); // this file should be in the data directory | |
| harry = new Fish(50.0f, 50.0f, fishImage); | |
| } | |
| void draw() { |
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
| import processing.net.*; | |
| Client c; | |
| String input; | |
| int data[]; | |
| void setup() { | |
| size(800, 600); | |
| background(0); | |
| surface.setTitle("Client"); |
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
| import processing.net.*; | |
| Server s; | |
| Client c; | |
| String input; | |
| int data[]; | |
| void setup() { | |
| size(800, 600); | |
| background(0); |
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
| /**************************************************************************** | |
| * | |
| * TEST: Key input for 1-2 players on same keyboard. | |
| * | |
| * DETAILS: Uses an array to store boolean values whether a | |
| * key is pressed (true) or released (false), using the | |
| * keycode as the index in the array to set to true/false. | |
| * | |
| * All values in the array are set to false in the setup and | |
| * when a key is pressed, the keyPressed() methods sets |
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
| PrintWriter output; | |
| ArrayList<Float> x, y; | |
| int i = 0; | |
| void setup() { | |
| size(300, 300); | |
| x = new ArrayList<Float>(); | |
| y = new ArrayList<Float>(); | |
| output = createWriter("asteroid.txt"); |
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
| ArrayList<Explosion> explosions; | |
| int currentExplosion; | |
| int FLIGHTTIME = 1000; | |
| void setup() { | |
| size(1000, 800); | |
| explosions = new ArrayList<Explosion>(); | |
| } |
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
| void setup() { | |
| size(800, 800); | |
| } | |
| void draw() { | |
| background(0); | |
| //drawUFO(); | |
| pushMatrix(); | |
| scale(0.2); |