Android Open Source - Castle-Invaders Store Object






From Project

Back to project page Castle-Invaders.

License

The source code is released under:

GNU General Public License

If you think the Android project Castle-Invaders listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.noobygames.castleinvaders.store;
/*from  ww w  .  j ava 2 s  .  com*/
public class StoreObject {
  private int price;
  private int objectLevel;
  private int objectMaxLevel;
  private boolean isAvailable;
  private boolean owned;
  private boolean costCoins;
  private String name;
  private String description;
  
  
  /**standard constructor
   *@param price Array holding the price for each level
   *@param level the level the object shall get
   *@param maxLevel the max skill level
   *@param available is it buyable right now?
   *@param owned already bought?
   *@param description A briefly description of the object
   *@param name Name of the object **/
  public StoreObject(int price, int level, int maxLevel, boolean available, boolean owned, boolean costCoins , String description, String name){
    this.price = price;
    this.objectLevel = level;
    this.objectMaxLevel = maxLevel;
    this.isAvailable = available;
    this.owned = owned;
    this.setDescription(description);
    this.setName(name);
    this.setCostCoins(costCoins);
    
  }
  
  /**
   * @return the price
   */
  public int getPrice() {
    return price;
  }
  /**
   * @param price the price to set
   */
  public void setPrice(int price) {
    this.price = price;
  }
  
  /** Sets price for a specific ObjectLevel
   * @param price the price to set
   * @param level The index/objectlevel**/
  public void setSpecificPrice(int price, int level){
    this.price = price;
  }
  /**
   * @return the objectLevel
   */
  public int getObjectLevel() {
    return objectLevel;
  }
  /**
   * @param objectLevel the objectLevel to set
   */
  public void setObjectLevel(int objectLevel) {
    this.objectLevel = objectLevel;
  }
  /**
   * @return the objectMaxLevel
   */
  public int getObjectMaxLevel() {
    return objectMaxLevel;
  }
  /**
   * @param objectMaxLevel the objectMaxLevel to set
   */
  public void setObjectMaxLevel(int objectMaxLevel) {
    this.objectMaxLevel = objectMaxLevel;
  }
  /**
   * @return the isAvailable
   */
  public boolean isAvailable() {
    return isAvailable;
  }
  /**
   * @param isAvailable the isAvailable to set
   */
  public void setAvailable(boolean isAvailable) {
    this.isAvailable = isAvailable;
  }
  /**
   * @return the owned
   */
  public boolean isOwned() {
    return owned;
  }
  /**
   * @param owned the owned to set
   */
  public void setOwned(boolean owned) {
    this.owned = owned;
  }
  /**
   * @return the description
   */
  public String getDescription() {
    return description;
  }
  /**
   * @param description the description to set
   */
  public void setDescription(String description) {
    this.description = description;
  }

  /**
   * @return the name
   */
  public String getName() {
    return name;
  }

  /**
   * @param name the name to set
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * @return the costCoins
   */
  public boolean isCostCoins() {
    return costCoins;
  }

  /**
   * @param costCoins the costCoins to set
   */
  public void setCostCoins(boolean costCoins) {
    this.costCoins = costCoins;
  }
}




Java Source Code List

com.noobgygames.castleinvaders.ui.DragonUltiButton.java
com.noobgygames.castleinvaders.ui.ElementSwitcherButton.java
com.noobgygames.castleinvaders.ui.StoreElement.java
com.noobgygames.castleinvaders.ui.TextureElement.java
com.noobygames.castleinvaders.Assets.java
com.noobygames.castleinvaders.CastleInvaders.java
com.noobygames.castleinvaders.DynamicGameObject.java
com.noobygames.castleinvaders.GameLiving.java
com.noobygames.castleinvaders.GameObject.java
com.noobygames.castleinvaders.MainActivity.java
com.noobygames.castleinvaders.Main.java
com.noobygames.castleinvaders.Player.java
com.noobygames.castleinvaders.Projectile.java
com.noobygames.castleinvaders.Settings.java
com.noobygames.castleinvaders.WorldRenderer.java
com.noobygames.castleinvaders.World.java
com.noobygames.castleinvaders.mobs.Croco.java
com.noobygames.castleinvaders.mobs.EarthDragon.java
com.noobygames.castleinvaders.mobs.FireDragon.java
com.noobygames.castleinvaders.mobs.FireTroll.java
com.noobygames.castleinvaders.mobs.GameScreen.java
com.noobygames.castleinvaders.mobs.GreyTroll.java
com.noobygames.castleinvaders.mobs.IceDragon.java
com.noobygames.castleinvaders.mobs.IceTroll.java
com.noobygames.castleinvaders.mobs.Murloc.java
com.noobygames.castleinvaders.mobs.Orc.java
com.noobygames.castleinvaders.mobs.Skeleton.java
com.noobygames.castleinvaders.screens.GameScreen.java
com.noobygames.castleinvaders.screens.MainMenuScreen.java
com.noobygames.castleinvaders.screens.ScoreScreen.java
com.noobygames.castleinvaders.screens.SplashScreen.java
com.noobygames.castleinvaders.screens.StoreScreen.java
com.noobygames.castleinvaders.store.StoreObject.java
com.noobygames.castleinvaders.store.Store.java
com.noobygames.nerzal.castleinvaders.spells.Burning.java
com.noobygames.nerzal.castleinvaders.spells.Freeze.java
com.noobygames.nerzal.castleinvaders.spells.SpellEffect.java
com.noobygames.nerzal.castleinvaders.spells.Spells.java
com.noobygames.utils.ArrayListUtils.java
com.noobygames.utils.ObjectSelectionContainer.java
com.noobygames.utils.OverlapTester.java
com.noobygames.utils.exceptions.OutOfBoundingException.java
com.noobygames.utils.exceptions.SliderOutOfBoundingsException.java
com.noobygames.utils.ui.Button.java
com.noobygames.utils.ui.ClickableElement.java
com.noobygames.utils.ui.DropDownMenu.java
com.noobygames.utils.ui.Element.java
com.noobygames.utils.ui.RadioButton.java
com.noobygames.utils.ui.RadioGroupButton.java
com.noobygames.utils.ui.ScrollableElement.java
com.noobygames.utils.ui.SimpleElement.java
com.noobygames.utils.ui.Slider.java
com.noobygames.utils.ui.Table.java
com.noobygames.utils.ui.TextBox.java
com.noobygames.utils.ui.Text.java
com.noobygames.utils.ui.Window.java