Пример #1
0
  /**
   * Used for loading.
   *
   * @param x
   * @param y
   * @param Lives
   * @param Hp
   * @param maxHP
   * @param weapon
   * @param timeTilFire
   * @param iTimeLeft
   * @param weaponFiring
   * @param Invincible
   * @param Active
   */
  public Player(
      float x,
      float y,
      int Lives,
      int Hp,
      int maxHP,
      int weapon,
      float timeTilFire,
      float iTimeLeft,
      boolean weaponFiring,
      boolean Invincible,
      boolean Active) {
    super(TextureManager.getInstance().getResourceTextureID(R.drawable.tilesheet1));
    // for(String Anim: animationManager.getAnimationSet(PlayerAnim).keySet()){
    //    addAnimation(Anim,animationManager.getAnimationSet(PlayerAnim).get(Anim));
    // }
    this.setScale(Resolution.getInstance().getScale());
    // setAnimation(SpriteAnimation.DefaultAnim);
    Weapons.add(com.weight.craig.catshanks.Weapon.HairBall);
    Weapons.add(com.weight.craig.catshanks.Weapon.ClawLeft);
    Weapons.add(com.weight.craig.catshanks.Weapon.Rainbow);

    this.Lives = Lives;
    this.MaxHP = maxHP;
    this.Hp = Hp;
    this.Weapon = weapon;
    this.WeaponFiring = weaponFiring;
    this.Invincible = Invincible;
    this.iTimeLeft = iTimeLeft;

    this.setPos(x, y);
    this.Active = Active;
  }
Пример #2
0
  public Player(int Hp) {
    super(TextureManager.getInstance().getResourceTextureID(R.drawable.tilesheet1));

    // for(String Anim: animationManager.getAnimationSet(PlayerAnim).keySet()){
    //    addAnimation(Anim,animationManager.getAnimationSet(PlayerAnim).get(Anim));
    // }
    this.setScale(Resolution.getInstance().getScale());
    // setAnimation(SpriteAnimation.DefaultAnim);
    Weapons.add(com.weight.craig.catshanks.Weapon.HairBall);
    Weapons.add(com.weight.craig.catshanks.Weapon.ClawLeft);
    Weapons.add(com.weight.craig.catshanks.Weapon.Rainbow);

    Weapon = 0;
    this.MaxHP = Hp;
    this.Hp = Hp;
  }