enemy.jad

来自「this version is only interesting for peo」· JAD 代码 · 共 109 行

JAD
109
字号
// Decompiled by DJ v3.0.0.63 Copyright 2002 Atanas Neshkov  Date: 05.06.2002 21:29:03
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   Enemy.java

import java.awt.Graphics;

public abstract class Enemy
{

    public Enemy(int i, int j, int k, int l)
    {
        x_pos_left = i;
        x_pos_right = i + k;
        y_pos_up = j - (l - 12);
        y_pos_down = y_pos_up + l;
        game_position = i + k / 2;
        active = true;
    }

    public void scrollEnemy(int i)
    {
        x_pos_left += i;
        x_pos_right += i;
        if(x_pos_left < -50 || x_pos_right > 350)
            active = false;
        else
            active = true;
    }

    public abstract void moveEnemy();

    public boolean getIsActive()
    {
        return active;
    }

    public void addToXPos(int i)
    {
        x_pos_left += i;
        x_pos_right += i;
        game_position += i;
    }

    public void addToYPos(int i)
    {
        y_pos_up += i;
        y_pos_down += i;
    }

    public int getGamePosition()
    {
        return game_position;
    }

    public int getXPosLeft()
    {
        return x_pos_left;
    }

    public int getXPosRight()
    {
        return x_pos_right;
    }

    public int getYPosUp()
    {
        return y_pos_up;
    }

    public int getYPosDown()
    {
        return y_pos_down;
    }

    public boolean getEnemyIsOutDown()
    {
        return y_pos_up > 310;
    }

    public abstract boolean getIsSmall();

    public abstract boolean enemyHasShot();

    public abstract void setAlive(boolean flag);

    public abstract boolean getAlive();

    public abstract void paintEnemy(Graphics g);

    public abstract void setWalkingLeft(boolean flag);

    public abstract void setWalkingRight(boolean flag);

    public abstract void setFalling(boolean flag);

    public abstract void setJumping(boolean flag);

    public abstract int getImageWidth();

    public abstract int getImageHeight();

    private int x_pos_left;
    private int x_pos_right;
    private int y_pos_up;
    private int y_pos_down;
    private int game_position;
    private boolean active;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?