Verfolgungsprojektil
This commit is contained in:
Binary file not shown.
@@ -9,9 +9,9 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
public class MyWorld extends World
|
||||
{
|
||||
int PlattformCountdown;
|
||||
int timer = 200; //Zeit, bevor das erste Projektil auftaucht
|
||||
int timer = 300; //Zeit, bevor das erste Projektil auftaucht
|
||||
//kann später noch beliebig angepasst werden
|
||||
int targetTimer = 100;
|
||||
int targetTimer = 1000;
|
||||
/**
|
||||
* Constructor for objects of class MyWorld.
|
||||
*
|
||||
@@ -93,7 +93,7 @@ public class MyWorld extends World
|
||||
if(timer == 0){
|
||||
Projectile projectile = new Projectile();
|
||||
addObject(projectile,Greenfoot.getRandomNumber(300)+50,0);
|
||||
timer = 200; //zeitlicher Abstand
|
||||
timer = 300; //zeitlicher Abstand
|
||||
}
|
||||
else{
|
||||
timer = timer - 1;
|
||||
@@ -104,7 +104,7 @@ public class MyWorld extends World
|
||||
if(targetTimer == 0){
|
||||
TargetingProjectile targetingProjectile = new TargetingProjectile();
|
||||
addObject(targetingProjectile, Greenfoot.getRandomNumber(300)+50,0);
|
||||
targetTimer = 100;
|
||||
targetTimer = 1000;
|
||||
}
|
||||
else{
|
||||
targetTimer = targetTimer - 1;
|
||||
|
||||
Binary file not shown.
@@ -82,8 +82,10 @@ public class Player extends Actor
|
||||
setLocation( getX(), groundTop - getImage().getHeight() / 2 );
|
||||
verticalSpeed = 0;
|
||||
landed = true;
|
||||
break; }
|
||||
} onGround = landed;
|
||||
break;
|
||||
}
|
||||
}
|
||||
onGround = landed;
|
||||
}
|
||||
|
||||
public boolean collision(){
|
||||
|
||||
Reference in New Issue
Block a user