Package javaEffect.weapon

Examples of javaEffect.weapon.Weapon


    int number = 0;
    int weaponsMax = (int) (Math.random() * 12);
    do {

      double rand = Math.random();
      Weapon weapon = null;

      if (0.0 <= rand && rand < 0.3)// 30%
      {
        weapon = new Weapon("M1", 60, 2000);
      } else if (0.3 <= rand && rand < 0.6)// 30%
      {
        weapon = new Weapon("M2", 80, 3000);
      } else if (0.6 <= rand && rand < 0.8)// 20%
      {
        weapon = new Weapon("M3", 90, 4000);
      } else if (0.8 <= rand && rand < 0.9)// 10%
      {
        weapon = new Weapon("M4", 110, 5000);
      } else if (0.90 <= rand && rand < 0.95)// 5%
      {
        weapon = new Weapon("M5", 150, 6000);
      } else if (0.95 <= rand && rand < 1.0)// 5%
      {
        weapon = new Weapon("M6", 200, 7000);
      }

      weaponList.add(weapon);
      number++;

View Full Code Here

TOP

Related Classes of javaEffect.weapon.Weapon

Copyright © 2018 www.massapicom. 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.