Package battleTank

Examples of battleTank.PlayerProjectile.addObserver()


    if (o instanceof PlayerProjectile) {
      PlayerProjectile p = (PlayerProjectile) o;

      if (!projectileList.contains(p)) {
        projectileList.add(p);
        p.addObserver(this);
       
      } else {
       
        // The xCoord will be set to -1 when the Projectile goes off the screen. This will make sure it is properly removed from the map.
       
View Full Code Here


    if (o instanceof EnemyProjectile) {
      EnemyProjectile p = (EnemyProjectile) o;

      if (!projectileList.contains(p)) {
        projectileList.add(p);
        p.addObserver(this);
        notifyObservers();
        setChanged();
      } else {
       
        // The xCoord will be set to -1 when the Projectile goes off the screen. This will make sure it is properly removed from the map.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.