Examples of MyPoint2D


Examples of com.randarlabs.java.MarioAsteroids.object.MyPoint2D

   
   
    for(int n = 0; n < FIREBALLS; n++) {
      fireball[n] = new Sprite(w, g);
      fireball[n].setImage(fireballIcon);
      fireballPoint[n] = new MyPoint2D(0, 0);
      fireballVel[n] = new MyPoint2D(0.3, 0.3);
      fireball[n].setPosition(fireballPoint[n]);
      fireball[n].setAlive(false);
    }
   
    for(int n = 0; n < ENEMIES; n++) {
      hammer[n] = new Sprite(w, g);
      hammer[n].setImage(hammerIcon);
      hammer[n].setRotationRate(rand.nextInt(5) + 1);
      hammerPoint[n] = new MyPoint2D((double)rand.nextInt(w.getSize().width) - 20, (double)rand.nextInt(w.getSize().height) - 20);
      hammer[n].setPosition(hammerPoint[n]);
      hammer[n].setMoveAngle(rand.nextInt(360));
      hammer[n].setFaceAngle(rand.nextInt(360));
      double ang = hammer[n].moveAngle();
      hammerVel[n] = new MyPoint2D(calcAngleMoveX(ang), calcAngleMoveY(ang));
      hammer[n].setVelocity(hammerVel[n]);
      hammer[n].setAlive(true);
     
      setEnemiesLeft(ENEMIES);
     
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.