亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? palm.java

?? 用java開發的一個實施策略游戲源碼 值得學習一下
?? JAVA
字號:
/*
	Netwar
	Copyright (C) 2002  Daniel Grund, Kyle Kakligian, Jason Komutrattananon, & Brian Hibler.
 
	This file is part of Netwar.
 
	Netwar is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
 
	Netwar is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
 
	You should have received a copy of the GNU General Public License
	along with Netwar; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package netwar.game.object;
import netwar.game.*;
import netwar.utils.*;
import netwar.utils.vectorgraphics.*;

/** Palm tree object. Destroyable obstacle.
 * @author Group N2 - Project Netwar
 * @author Kyle Kakligian
 */
public class Palm extends netwar.game.GameObject {
    // colors
    private static java.awt.Color brown = new java.awt.Color(128,64,0);
    private static java.awt.Color green = new java.awt.Color(64, 160, 0);
    private static java.awt.Color drgreen = new java.awt.Color(64, 128, 0);
    // point list
    private static SelfConvertingPoint _pts[] = {
        new SelfConvertingPoint(0,         0,        0),
        new SelfConvertingPoint(-0.00000,-0.91000, 0.00000),
        new SelfConvertingPoint( 1.02412, 1.45172, 0.00000),
        new SelfConvertingPoint(-0.76412, 1.45172, -0.00000),
        new SelfConvertingPoint(-0.00000,-0.68375, 4.75243),
        new SelfConvertingPoint( 0.82412, 0.66268, 4.74470),
        new SelfConvertingPoint(-0.69412, 0.66268, 4.74470),
        new SelfConvertingPoint(-0.00000, 0.12585, 9.68890),
        new SelfConvertingPoint( 0.56545, 1.82279, 9.30297),
        new SelfConvertingPoint(-0.56545, 1.82279, 9.30297),
        new SelfConvertingPoint( 0.01141, 1.49262, 11.30000),
        new SelfConvertingPoint(-2.60630, 4.48881, 9.67522),
        new SelfConvertingPoint(-7.08400, 4.13934, 7.36984),
        new SelfConvertingPoint(-4.16649, 1.87175, 10.34874),
        new SelfConvertingPoint( 0.01141, 1.49262, 11.30000),
        new SelfConvertingPoint(-4.16649, 0.48728, 9.84309),
        new SelfConvertingPoint(-6.56393,-3.58629, 8.98570),
        new SelfConvertingPoint(-2.60630,-2.13973, 10.47672),
        new SelfConvertingPoint( 0.01141, 1.49262, 11.30000),
        new SelfConvertingPoint(-1.54879,-2.51917, 11.47878),
        new SelfConvertingPoint( 0.53147,-6.06527, 8.08414),
        new SelfConvertingPoint( 1.57160,-2.51917, 11.47878),
        new SelfConvertingPoint( 0.01141, 1.49262, 11.30000),
        new SelfConvertingPoint( 3.45461,-2.72733, 11.53235),
        new SelfConvertingPoint( 6.28131,-3.91661, 9.05479),
        new SelfConvertingPoint( 4.18931, 0.48728, 9.84309),
        new SelfConvertingPoint( 0.01141, 1.49262, 11.30000),
        new SelfConvertingPoint( 4.18931, 1.77154, 9.95313),
        new SelfConvertingPoint( 6.99950, 5.04401, 9.13377),
        new SelfConvertingPoint( 2.62911, 4.48881, 9.67522),
        new SelfConvertingPoint( 0.01141, 1.49262, 11.30000),
        new SelfConvertingPoint( 1.57160, 5.08010, 9.52305),
        new SelfConvertingPoint(-0.50866, 8.44301, 6.46970),
        new SelfConvertingPoint(-2.37429, 6.67900, 9.11156)};

    private static CoherentPointSet points = new CoherentPointSet(_pts.length);
    private static GraphicThing appearance= null;
    private VirtualCoherentGraphicThing myAppearance;;

    /** Creates a new instance of PineTree */
    public Palm() {
    }
	
    /** Initialize the Point3Ds used for this Base.
     * These are the location of the ground-center of the Base in game-space, and
     * the relative locations of the triangle/line vertices relative to that point.
     */
    protected void createVectors() {
        vr = new Point3D[1];
        vr[0] = Hex.getMapPoint(x,y);
        
        if(appearance == null) {
            appearance = new OrderedGraphicSet( new GraphicTriangle( _pts[8], _pts[9], _pts[7], drgreen), _pts.length);
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[2], _pts[4], _pts[1], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[5], _pts[4], _pts[2], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[5], _pts[2], _pts[3], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[6], _pts[5], _pts[3], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[4], _pts[6], _pts[3], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[1], _pts[4], _pts[3], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[7], _pts[4], _pts[5], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[8], _pts[7], _pts[5], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[8], _pts[5], _pts[6], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[9], _pts[8], _pts[6], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[7], _pts[9], _pts[6], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[4], _pts[7], _pts[6], brown), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[12], _pts[13], _pts[11], green), false);
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[13], _pts[10], _pts[11], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[16], _pts[17], _pts[15], green), false);
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[17], _pts[14], _pts[15], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[20], _pts[21], _pts[19], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[21], _pts[18], _pts[19], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[24], _pts[25], _pts[23], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[25], _pts[22], _pts[23], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[28], _pts[29], _pts[27], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[29], _pts[26], _pts[27], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[32], _pts[33], _pts[31], green), false); 
            ((OrderedGraphicSet)appearance).add(new GraphicTriangle( _pts[33], _pts[30], _pts[31], green), false); 

            for(int t = 0; t < _pts.length; t++)
                points.add(_pts[t]);
        }
        if(netwar.Mapper.theApp != null) myAppearance = new VirtualCoherentGraphicThing(appearance, points, vr[0], (new java.util.Random()).nextInt(360));
        else myAppearance = new VirtualCoherentGraphicThing(appearance, points, vr[0], netwar.Netwar.netwar.random.nextInt(360));
    }
    
    /** Returns false, because the tree has no weapon.
     * @return false
     */
    protected boolean aim() {
        return false;
    }
    
    /** Perform the data changes for one frame of animation while dying. */
    protected void animateDie() {
        if(frame == framesToDie()) {
            Hex.getHex(x,y).unreserve();
            Hex.getHex(x,y).leave(this);
            myAppearance.explode(vr[0]);
        }
        frame--;
        if(frame == 0)
            remove();
    }
    
    /** Perform the data changes for one frame of animation while being made.
     * Pine trees pre-exist: there is no formation animation.
     */
    protected void animateMake() {
    }
    
    /** Draw this GameObject onto GameViewer v, by using v's drawing methods.
     * @param v The GameViewer which will display this GameObject.
     * @see netwar.gui.HexViewer
     */
    public void draw(GameViewer v) {
        myAppearance.draw(v);
    }
    /** Requests that the GraphicThing(s) used by this object be added to GameViewer v.
     * @param v The GameViewer which will be displaying the object.
     */
    public void addTo(GameViewer v) {
        v.add(myAppearance);
    }
    public void killGraphics() {
        myAppearance.kill();
    }
    /** Returns the number of frames of animation for the death sequence.
     * @return 5
     */
    protected int framesToDie() {
        return 10;
    }
    
    /** Returns the number of frames of animation for the creation sequence.
     * @return 0
     */
    protected int framesToMake() {
        return 0;
    }
    
    /** Return the height of this GameObject for selection box and explosion hit calculations.
     * @return 20
     */
    public float getHeight() {
        return 20f;
    }
    
    /** Return the width of this GameObject for selection box and explosion hit calculations.
     * @return 5
     */
    public float getWidth() {
        return 6.2f;
    }
    
    /** Clear the current long-term goal. */
    public void setGoal() {
    }
    
    /** Set the current long-term goal to a GameObject.
     * This is a tree. It does not use the goal system.
     * @param u The GameObject which is the goal.
     */
    public void setGoal(GameObject u) {
    }
    
    /** Set the current long-term goal to a location, at hex coordinate (gx, gy).
     * This is a tree. It does not use the goal system.
     * @param gx The x coordinate of the goal, in hex coords.
     * @param gy The y coordinate of the goal, in hex coords.
     */
    public void setGoal(int gx, int gy) {
    }
    
    /** Perform operations for this time step.
     * Specifically, perform the Point3D transforms for any/all animations,
     * fire at an enemy if possible, and do any required decision making.
     * This is a tree. It is only animated if it is dying.
     */
    protected void update() {
        if(action == 5)
            animateDie();
    }
    
    /** Return the number of frames to wait between firing shots.
     * @return 0
     */
    public int weaponDelay() {
        return 0;
    }
    
    /** Return the square of the maximum weapon range of this GameObject.
     * @return 0
     */
    public float weaponRangeSquared() {
        return 0f;
    }
    
    public boolean isDead() {
        return (action == 5);
    }
    public boolean damageable() {
        return (action != 5);
    }
    /** The tree uses the 'threshold damage system'.
     * If sufficient damage (15 or more) is dealt in one blow,
     * the tree is destroyed.
     */
    public void recieveDamage(int dam) {
        if(dam >= 15) {
            action = 5;
            frame = framesToDie();
        }
    }
    
    static final String[] PROPERTIES = {};
    protected String[] PROPERTIES() {
        return PROPERTIES;
    }
    protected String getProperty(int p) {
        switch(p) {
            default:
                Assert.notFalse(false, "getProperty(int) error.");
        }
        return null;
    }
    
    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区三区免费乱视频| 亚洲人成在线播放网站岛国| 中文幕一区二区三区久久蜜桃| 亚洲一区二区三区视频在线| 国产乱人伦精品一区二区在线观看| 99精品国产91久久久久久| 欧美一区二区三区四区五区| 亚洲欧洲性图库| 九九精品一区二区| 欧美日韩国产综合一区二区| 中文字幕免费不卡| 欧美aaa在线| 欧美三级电影一区| 国产精品视频九色porn| 久久电影网站中文字幕| 欧美日韩成人在线一区| 亚洲视频一区在线| 成人av综合在线| 久久久久久久综合狠狠综合| 日本伊人色综合网| 欧美日韩久久久| 亚洲五码中文字幕| 在线观看成人免费视频| 亚洲日本电影在线| 99精品视频在线免费观看| 国产色产综合产在线视频 | 日韩一区二区三区四区五区六区| 亚洲欧美激情小说另类| eeuss国产一区二区三区| 日韩成人一级大片| 欧美日韩在线观看一区二区 | 成人免费一区二区三区在线观看| 国内精品久久久久影院薰衣草| 3atv一区二区三区| 五月天网站亚洲| 91精品视频网| 免费观看在线综合| 精品少妇一区二区三区在线播放| 免费av成人在线| 精品国产乱码久久久久久蜜臀| 久久成人18免费观看| 日韩欧美亚洲国产另类| 狠狠久久亚洲欧美| 欧美国产视频在线| 97久久超碰精品国产| 一区二区三区在线免费观看| 欧美中文字幕一区二区三区| 亚洲图片一区二区| 色播五月激情综合网| 国产精品伦一区| 91啪亚洲精品| 亚洲一区二区三区视频在线播放 | 亚洲v日本v欧美v久久精品| 欧美日韩中字一区| 久久精品国产久精国产爱| 欧美精品一区视频| 成人黄色综合网站| 亚洲国产日日夜夜| 精品奇米国产一区二区三区| 国产乱人伦偷精品视频不卡| 亚洲欧美一区二区在线观看| 欧美日韩一区三区| 国产又黄又大久久| 亚洲免费观看高清完整版在线| 欧美精品久久99久久在免费线 | 精品嫩草影院久久| 视频一区二区三区在线| 欧美一级片在线| 国产成人夜色高潮福利影视| 亚洲四区在线观看| 欧美一区欧美二区| 成人午夜在线视频| 日本成人中文字幕在线视频| 久久久精品免费免费| 91激情在线视频| 久热成人在线视频| 一区二区三区美女| 久久久久九九视频| 欧美丰满少妇xxxbbb| 东方aⅴ免费观看久久av| 午夜精品一区二区三区免费视频| 国产午夜亚洲精品理论片色戒 | 欧美亚洲动漫制服丝袜| 国产美女在线观看一区| 亚洲成人tv网| 中文字幕亚洲视频| 精品国产一区二区三区四区四 | 激情久久久久久久久久久久久久久久| 国产精品天干天干在线综合| 日韩免费视频一区二区| 欧美午夜精品电影| 成人av电影在线| 激情综合五月婷婷| 青青草原综合久久大伊人精品优势 | 日韩欧美在线不卡| 欧美日韩黄色一区二区| 91麻豆精品秘密| 成人激情小说网站| 激情综合网av| 麻豆国产精品官网| 亚洲午夜激情av| 一区二区三区在线观看网站| 欧美图区在线视频| av电影天堂一区二区在线| 国产乱码精品一区二区三区av | 99精品欧美一区| 国产精品一区二区久久精品爱涩| 日韩高清在线电影| 日韩中文字幕亚洲一区二区va在线| 极品美女销魂一区二区三区| 天天色综合天天| 亚洲丰满少妇videoshd| 亚洲高清不卡在线| 亚洲aⅴ怡春院| 午夜精品一区二区三区电影天堂 | 高清成人免费视频| 国产盗摄精品一区二区三区在线 | 久久先锋影音av鲁色资源| 日韩欧美二区三区| 日韩限制级电影在线观看| 欧美剧情片在线观看| 在线精品视频小说1| 91精品国产色综合久久ai换脸| 亚洲国产精华液网站w| 久久婷婷综合激情| 久久久久久亚洲综合影院红桃 | 成人av免费在线观看| 东方aⅴ免费观看久久av| 国产精品一区二区x88av| 国产高清在线精品| 成人免费毛片嘿嘿连载视频| 国产精品影视天天线| 懂色av噜噜一区二区三区av | 亚洲va韩国va欧美va精品 | 亚洲精选免费视频| 亚洲综合一区二区| 视频一区在线视频| 国内精品久久久久影院一蜜桃| 国产乱码一区二区三区| 91最新地址在线播放| 欧美日韩五月天| 精品日韩99亚洲| 亚洲国产精品久久艾草纯爱| 国产精品污污网站在线观看 | 99这里都是精品| 欧美日韩一区二区在线视频| 日韩欧美国产wwwww| 国产欧美精品国产国产专区| 亚洲精品日韩综合观看成人91| 三级久久三级久久久| 国产精品888| 色av一区二区| 亚洲精品在线观看网站| 亚洲免费观看高清完整版在线| 日本系列欧美系列| bt7086福利一区国产| 在线播放欧美女士性生活| 欧美韩国一区二区| 性欧美大战久久久久久久久| 国产精品正在播放| 欧美日韩国产精选| 中文字幕精品在线不卡| 人妖欧美一区二区| 99re热视频精品| 精品日韩一区二区三区| 一区二区三区在线观看欧美 | 亚洲国产精品久久艾草纯爱| 国产91精品一区二区麻豆亚洲| 亚洲欧美国产毛片在线| 亚洲成av人片在线观看无码| 国产成人午夜精品5599| 中文字幕av免费专区久久| 午夜精品一区在线观看| av色综合久久天堂av综合| 精品国产污污免费网站入口| 亚洲激情自拍视频| 成人激情免费网站| 精品伦理精品一区| 日韩福利电影在线| 色美美综合视频| 亚洲国产精品v| 国产乱人伦偷精品视频不卡| 欧美另类久久久品| 亚洲另类在线一区| 99久久99久久精品免费观看| 久久先锋资源网| 久久99久久久久| 欧美一区二区精品| 午夜伦理一区二区| 欧美日韩一区在线观看| 亚洲一区中文日韩| 色综合色狠狠综合色| 中文字幕一区二区三区在线观看 | 国产 欧美在线| 色狠狠色噜噜噜综合网| 中文字幕中文字幕在线一区| 国产精品一区久久久久| 精品三级在线观看| 国内成人免费视频| 亚洲精品在线电影|