Package com.palepail.TestGame.Model.Items

Examples of com.palepail.TestGame.Model.Items.Item


  protected void die(World world) {
    this.setActive(false);
    if (timesToSplit < 1) {
      int dropNum = this.getNumberOfDrops();
      for (int x = 0; x < dropNum; x++) {
        Item item = this.getDrop();
        if (item != null) {
          world.putItem(item);
        }
      }
    } else {
View Full Code Here


  }

  protected void die(World world) {
    int dropNum = this.getNumberOfDrops();
    for (int x = 0; x < dropNum; x++) {
      Item item = this.getDrop();

      if (item != null) {
        if (dropCount > 1) {
          Random random = new Random();
          float angle = 20 - random.nextInt(40);

          item.setVelocity(new Vector2(new Vector2(angle * Configuration.gameScale,
              50 * Configuration.gameScale).sub(getPosition()).nor()));
        }
        world.putItem(item);
      }
    }
 
View Full Code Here

TOP

Related Classes of com.palepail.TestGame.Model.Items.Item

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.