Skip to content

Instantly share code, notes, and snippets.

@dinarname
dinarname / spc_inv.pde
Created November 18, 2018 11:00
without arrays
MySpaceship S1;
AllienSpaceship A1, A2, A3;
float x = 30;
int counter;
void setup() {
size(400, 400);
counter = 0;
S1 = new MySpaceship();
@dinarname
dinarname / sq_pckmn.pde
Created November 15, 2018 12:06
Using object's variables
Packman p1;
Meal m1;
float distance;
void setup() {
size(400, 400);
p1 = new Packman();
m1 = new Meal();
}
@dinarname
dinarname / class_example
Created November 8, 2018 11:52
example of using classes
Ball b1, b2, b3, b4;
void setup() {
size(400, 400);
b1 = new Ball();
b2 = new Ball();
b3 = new Ball();
b4 = new Ball();
}
@dinarname
dinarname / im_in_house.pde
Created October 25, 2018 07:29
Assignment to consolidate the previous lesson
void setup() {
size(800, 800);
}
//Данные для рисования дома
// >>> Вводим переменные: ширина и высота дома
// .. Высота дома высчитывается от ширины в «золотой пропорции»
float houseWidth = 150;
float houseHeight = houseWidth / 1.618033981;
@dinarname
dinarname / duel.pde
Created October 20, 2018 12:04
duel on the keyboard
int count = 3;
void setup (){
size(800, 800);
frameRate(60);
}
void draw(){
if (count >= 1){
background(0);
@dinarname
dinarname / carMotion.pde
Last active October 17, 2018 12:41
processing. car in motion
void setup(){
size(600, 400);
}
int x = 20, y = 250;
PImage explosion;
void draw() {