Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PImage img;
- Spaceship Spx;
- Asteroid Asx;
- Asteroid2 Asy;
- Asteroid3 Asz;
- Munition Mnx;
- //Munition ammo;
- Munition2 Mny;
- //Munition[] ammo = new Munition[4];
- void settings() {
- size(1300, 900, P3D);
- }
- void setup() {
- img=loadImage("dreamstime_xxl_123015144.jpg");
- textSize(25);
- Spx = new Spaceship();
- Spx.erstellen();
- Asx = new Asteroid(50,50);
- Asy = new Asteroid2(50, 50);
- Asz = new Asteroid3(50, 50);
- Munition[] ammo = new Munition[4];
- for (int i = 0; i<4; i++) {
- ammo[i] = new Munition();
- Mnx = new Munition();
- }
- }
- void draw() {
- image(img, 650, 450);
- //image(Sp1, 50, mouseY, 50, 80);
- Spx.erstellenX();
- //Asx.as_spawn();
- Asx.erstellen2();
- Asy.erstellen2();
- Asz.erstellen2();
- Mnx.show();
- Mnx.move();
- for (int i = 0; i<4; i++) {
- ammo[i].show();
- ammo[i].move();
- }
- //if(dist (xPos1+8,yPos2,xPos,yPos)<=5){
- // noLoop();
- //}
- }
- void keyPressed() {
- Spx.keyPressed();
- // Mnx.keyPressed();
- if(key == 'X'||key == 'x') {
- Mnx = new Munition();
- }
- if(key == 'y'||key == 'Y') {
- Mny = new Munition2();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement