Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage // kintamojo tipas - paveiksliukas
- lion,
- car;
- int
- // pozicijos
- lionX, lionY,
- carX, carY,
- // dydžiai
- // plotis auštis
- lionW, lionH,
- carW, carH,
- // greičiai
- carSpeed,
- lionStep = 1,
- maxStep,
- road; // horizontali linija, žyminti kelią
- void setup () {
- size (1280, 740);
- lion = loadImage ("data/lion.png");
- car = loadImage ("data/car.png");
- imageMode (CENTER);
- // (float)2500
- //float size1 = height / float(2500);
- //println (size1);
- //println (size2);
- float size = height / 2500.0; // 0.3
- // 559 * 0.296 = 165.464
- // originalus * koeficientas
- lionW = (int)(lion.width * size);
- lionH = (int)(lion.height * size);
- carW = (int)(car.width * size);
- carH = (int)(car.height * size);
- road = height - height / 4;
- //image (lion, width / 2, height / 2, lion.width * 0.5, lion.height * 0.5);
- //rect (x, y, w, h);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement