Android Open Source - Apocalypse-Defense Weapon






From Project

Back to project page Apocalypse-Defense.

License

The source code is released under:

MIT License

If you think the Android project Apocalypse-Defense 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.apocalypsedefense.core;
// w  ww.  j  av a 2s.  c o  m
import java.io.Serializable;

/**
 */
public class Weapon implements Serializable {
    /**
     */
    public String name;

    /**
     */
    public String wType;

    /**
     */
    public int damage;

    /**
     */
    public int rate;

    /**
     */
    public int range;

    /**
     * @param rate 
     * @param wType 
     * @param attackRange 
     * @param name 
     * @param damage 
     */
    public Weapon(String wType, String name, int damage, int rate, int attackRange) {
      this.name = name;
      this.wType = wType;
      this.damage = damage;
      this.rate = rate;
      this.range = attackRange;
    }

    /**
     * @return 
     */
    public int attack() {
        return this.damage;
    }
}


/*
 
Python code:

class Weapon():
    def __init__(self, wType='Default Weapon Type', name='Default Weapon', 
                 damage=10, rate=1, attackRange=10):
        self.name = name
        self.wType = wType
        self.damage = damage
        self.rate = rate
        self.range = attackRange

    def attack(self):
        return self.damage
*/




Java Source Code List

com.apocalypsedefense.app.AchievementsActivity.java
com.apocalypsedefense.app.ApocalypseDefenseActivity.java
com.apocalypsedefense.app.EndOfGameDialog.java
com.apocalypsedefense.app.ExitConfirmationDialog.java
com.apocalypsedefense.app.InGameActivity.java
com.apocalypsedefense.app.InstructionsDialog.java
com.apocalypsedefense.app.NewGameSettingsActivity.java
com.apocalypsedefense.app.OverwriteExistingGameDialog.java
com.apocalypsedefense.app.gameplay_visuals.AndroidLogAdapter.java
com.apocalypsedefense.app.gameplay_visuals.GameFacade.java
com.apocalypsedefense.app.gameplay_visuals.GameObject.java
com.apocalypsedefense.app.gameplay_visuals.GameSurfaceView.java
com.apocalypsedefense.app.gameplay_visuals.GameThread.java
com.apocalypsedefense.app.gameplay_visuals.OnGameEndListener.java
com.apocalypsedefense.app.gameplay_visuals.OnStatsChangedListener.java
com.apocalypsedefense.app.gameplay_visuals.Sprite.java
com.apocalypsedefense.core.ActorType.java
com.apocalypsedefense.core.Armor.java
com.apocalypsedefense.core.GameData.java
com.apocalypsedefense.core.GameState.java
com.apocalypsedefense.core.Game.java
com.apocalypsedefense.core.Gun.java
com.apocalypsedefense.core.LogAdapter.java
com.apocalypsedefense.core.MapElement.java
com.apocalypsedefense.core.Map.java
com.apocalypsedefense.core.Movement.java
com.apocalypsedefense.core.Person.java
com.apocalypsedefense.core.Point.java
com.apocalypsedefense.core.PrintLogAdapter.java
com.apocalypsedefense.core.Shared.java
com.apocalypsedefense.core.SurvivorManager.java
com.apocalypsedefense.core.Survivor.java
com.apocalypsedefense.core.Weapon.java
com.apocalypsedefense.core.ZombieManager.java
com.apocalypsedefense.core.Zombie.java
com.apocalypsedefense.core.testDriver.java