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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? flamebeetle.java

?? 用java開發(fā)的一個(gè)實(shí)施策略游戲源碼 值得學(xué)習(xí)一下
?? JAVA
字號(hào):
/*
	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.unit;
import netwar.utils.*;
import netwar.utils.vectorgraphics.*;
import netwar.game.*;
import netwar.game.projectile.FlameWeapon;
import java.awt.*;

/** Temporary Unit class. This will be removed in Iteration 2, when the real Units are created.
 * This is a fast, durable, short range combatant.
 * It has good armor, and uses a rapid fire weapon (which is good against low armor targets).
 * Because of its long range, it has an extended scan range so that it can automatically approach enemies.
 * @author Group N2 - Project Netwar
 * @author Daniel Grund
 */
public class FlameBeetle extends Unit{
	ZOrderedList zol;
	CoherentPointSet cps;
	/** Constructor. This Unit has no special parameters. */
	public FlameBeetle(){
             netwar.utils.vectorgraphics.Transform t;
             if(netwar.Mapper.theApp == null) t = netwar.gui.HexViewer.getHexViewer().getTransform();
             else t = netwar.mapper.HexViewerM.getHexViewer().getTransform();
             zol = new ZOrderedList(t);
	     cps = new CoherentPointSet(34);
//		The following line is slowing the game down a lot		
//		netwar.Netwar.netwar.soundPlayer.play("sound/UnitBuy1.wav");
	}
	/** Flame Beetle requires 5 frames to move forward one hex.
	 * @return 5
	 */
	protected int framesToMove(){
		return 5; //return the number of frames needed to move one hex.
	}
	/** Flame Beetle requires 5 frames to rotate one hex-side.
	 * @return 5
	 */
	protected int framesToRotate(){
		return 5; //return the number of frames needed to rotate one hex-side.
	}
	/** Flame Beetle requires 10 frames to be created.
	 * @return 10
	 */
	protected int framesToMake(){
		return 20;
	}
	/** Flame Beetle spends 10 frames doing a death scene.
	 * @return 10
	 */
	protected int framesToDie(){
		return 10;
	}
	protected void createVectors()
	{
		int i = f * 60 + 30;
		vr = new Point3D[1];

		vr[0] = Hex.getMapPoint(x,y);
		
		//Pilot Lite
		cps.add(new SelfConvertingPoint(9,0,0)); //0
		cps.add(new SelfConvertingPoint(9.2f,0.2f,0)); //1
		cps.add(new SelfConvertingPoint(9.4f,0,0)); //2
		cps.add(new SelfConvertingPoint(9.2f,-0.2f,0)); //3
		cps.add(new SelfConvertingPoint(9.2f,0,0.4f)); //4
		zol.add(new GraphicTriangle(cps.getPoint(0), cps.getPoint(2), cps.getPoint(4), Color.red));
		zol.add(new GraphicTriangle(cps.getPoint(1), cps.getPoint(3), cps.getPoint(4), Color.red));
		zol.add(new GraphicParallelogram(cps.getPoint(0), cps.getPoint(1), cps.getPoint(2), cps.getPoint(3), Color.red));
		
		//Front panel with SIGMA
		cps.add(new SelfConvertingPoint(9,-4,0)); //5
		cps.add(new SelfConvertingPoint(9,4,0)); //6
		cps.add(new SelfConvertingPoint(7,-4,2)); //7
		cps.add(new SelfConvertingPoint(7,4,2)); //8
		cps.add(new SelfConvertingPoint(7.5f,2,1.5f)); //9
		cps.add(new SelfConvertingPoint(7.5f,-2,1.5f)); //10
		cps.add(new SelfConvertingPoint(8,0,1)); //11
		cps.add(new SelfConvertingPoint(8.5f,-2,0.5f)); //12
		cps.add(new SelfConvertingPoint(8.5f,2,0.5f)); //13
		OrderedGraphicSet ogs = new OrderedGraphicSet(
			new GraphicParallelogram(cps.getPoint(5), cps.getPoint(6), cps.getPoint(8), cps.getPoint(7), myPlayer.getColor()), 5);
		ogs.add(new GraphicLine(cps.getPoint(9), cps.getPoint(10), myPlayer.getColor().darker()), false);
		ogs.add(new GraphicLine(cps.getPoint(10), cps.getPoint(11), myPlayer.getColor().darker()), false);
		ogs.add(new GraphicLine(cps.getPoint(11), cps.getPoint(12), myPlayer.getColor().darker()), false);
		ogs.add(new GraphicLine(cps.getPoint(12), cps.getPoint(13), myPlayer.getColor().darker()), false);
		zol.add(ogs);
		
		//Side and rear panels.
		cps.add(new SelfConvertingPoint(7,-4,0)); //14
		cps.add(new SelfConvertingPoint(-7,-4,0)); //15
		cps.add(new SelfConvertingPoint(-7,-4,2)); //16
		cps.add(new SelfConvertingPoint(-9,-2,0)); //17
		cps.add(new SelfConvertingPoint(-9,-2,2)); //18
		cps.add(new SelfConvertingPoint(-9,2,0)); //19
		cps.add(new SelfConvertingPoint(-9,2,2)); //20
		cps.add(new SelfConvertingPoint(-7,4,0)); //21
		cps.add(new SelfConvertingPoint(-7,4,2)); //22
		cps.add(new SelfConvertingPoint(7,4,0)); //23
		zol.add(new GraphicTriangle(cps.getPoint(14), cps.getPoint(5), cps.getPoint(7), myPlayer.getColor()));
		zol.add(new GraphicParallelogram(cps.getPoint(14), cps.getPoint(7), cps.getPoint(16), cps.getPoint(15), myPlayer.getColor()));
		zol.add(new GraphicParallelogram(cps.getPoint(15), cps.getPoint(16), cps.getPoint(18), cps.getPoint(17), myPlayer.getColor()));
		zol.add(new GraphicParallelogram(cps.getPoint(17), cps.getPoint(18), cps.getPoint(20), cps.getPoint(19), myPlayer.getColor()));
		zol.add(new GraphicParallelogram(cps.getPoint(19), cps.getPoint(20), cps.getPoint(22), cps.getPoint(21), myPlayer.getColor()));
		zol.add(new GraphicParallelogram(cps.getPoint(21), cps.getPoint(22), cps.getPoint(8), cps.getPoint(23), myPlayer.getColor()));
		zol.add(new GraphicTriangle(cps.getPoint(23), cps.getPoint(6), cps.getPoint(8), myPlayer.getColor()));
		
		//Top of base of unit.
		cps.add(new SelfConvertingPoint(-7,0,2)); //24
		cps.add(new SelfConvertingPoint(5,-4,2)); //25
		cps.add(new SelfConvertingPoint(5,4,2)); //26
		cps.add(new SelfConvertingPoint(7,-2,2)); //27
		cps.add(new SelfConvertingPoint(7,2,2)); //28
		cps.add(new SelfConvertingPoint(5,0,2)); //29
		zol.add(new GraphicTriangle(cps.getPoint(24), cps.getPoint(20), cps.getPoint(18), myPlayer.getColor().darker()));
		zol.add(new GraphicTriangle(cps.getPoint(27), cps.getPoint(28), cps.getPoint(29), myPlayer.getColor().darker()));
		zol.add(new GraphicTriangle(cps.getPoint(27), cps.getPoint(25), cps.getPoint(7), myPlayer.getColor().darker()));
		zol.add(new GraphicTriangle(cps.getPoint(28), cps.getPoint(26), cps.getPoint(8), myPlayer.getColor().darker()));
		
		//Fuel tanks.
		cps.add(new SelfConvertingPoint(5,-2,4)); //30
		cps.add(new SelfConvertingPoint(5,2,4)); //31
		cps.add(new SelfConvertingPoint(-7,-2,4)); //32
		cps.add(new SelfConvertingPoint(-7,2,4)); //33
		zol.add(new GraphicTriangle(cps.getPoint(27), cps.getPoint(30), cps.getPoint(25), Color.lightGray.brighter()));
		zol.add(new GraphicTriangle(cps.getPoint(28), cps.getPoint(31), cps.getPoint(26), Color.darkGray.brighter()));
		zol.add(new GraphicTriangle(cps.getPoint(27), cps.getPoint(30), cps.getPoint(29), Color.darkGray.brighter()));
		zol.add(new GraphicTriangle(cps.getPoint(28), cps.getPoint(31), cps.getPoint(29), Color.lightGray.brighter()));
		zol.add(new GraphicParallelogram(cps.getPoint(30), cps.getPoint(25), cps.getPoint(16), cps.getPoint(32), Color.lightGray));
		zol.add(new GraphicParallelogram(cps.getPoint(31), cps.getPoint(26), cps.getPoint(22), cps.getPoint(33), Color.darkGray));
		zol.add(new GraphicParallelogram(cps.getPoint(30), cps.getPoint(29), cps.getPoint(24), cps.getPoint(32), Color.darkGray));
		zol.add(new GraphicParallelogram(cps.getPoint(31), cps.getPoint(29), cps.getPoint(24), cps.getPoint(33), Color.lightGray));
		zol.add(new GraphicTriangle(cps.getPoint(18), cps.getPoint(32), cps.getPoint(16), Color.lightGray.darker()));
		zol.add(new GraphicTriangle(cps.getPoint(20), cps.getPoint(33), cps.getPoint(22), Color.darkGray.darker()));
		zol.add(new GraphicTriangle(cps.getPoint(18), cps.getPoint(32), cps.getPoint(24), Color.darkGray.darker()));
		zol.add(new GraphicTriangle(cps.getPoint(20), cps.getPoint(33), cps.getPoint(24), Color.lightGray.darker()));
		
		cps.translate(vr[0]);
		cps.rotate(vr[0], Point3D.unitUp, i);
//		netwar.gui.HexViewer.getHexViewer().add(zol);
	}
	/** Flame Beetle is drawn as two triangles.
	 * The triangles form together to form a triangle with a slight fold.
	 * One triangle is the slightly brighter than the team color,
	 * the other is slightly darker.
	 */
	public void draw(GameViewer v) {
		if(health > 0)
			zol.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) {
		if(health > 0)
			v.add(zol);
	}
	public void killGraphics() {
		zol.kill();
	}
	
	/** Flame Beetle moves by sliding. There is no articulate animation. */
	protected void animateMove(){
		//Update the necessary vectors to move forward during one frame.
		int i = Trig.normalize(f * 60 + 30);
		Point3D pt = new Point3D(Trig.cos(i) * 4, Trig.sin(i) * 4,0);
		vr[0].doSum(pt);
		cps.translate(pt);
	}			
	/** Flame Beetle rotates left by sliding. There is no articulate animation */
	protected void animateRotateLeft(){
		cps.rotate(vr[0], Point3D.unitUp, 12);
	}
	/** Flame Beetle rotates right by sliding. There is no articulate animation */
	protected void animateRotateRight(){
		cps.rotate(vr[0], Point3D.unitUp, 348);
	}
	/** Flame Beetle forms by shifting the triangles from a nearly verticle form to the standard shape. */
	protected void animateMake() {
	}
	/** Flame Beetle explodes. */
	protected void animateDie() {
		if(frame == framesToDie())
			zol.explode((new Point3D(0,0,-5)).doSum(vr[0]));
		frame--;
		if(frame == 0)
		{
			remove();
			Hex.getHex(resX,resY).unreserve();
			Hex.getHex(x,y).leave(this);
		}
	}

//	protected void think() { //Default is ok for this one.

	/** Flame Beetle is 1.0 units tall. 
	 * @return 1
	 */
	public float getHeight() {
		return 4.0f;
	}
	/** Flame Beetle is 7.0 units wide. 
	 * @return 7
	 */
	public float getWidth() {
		return 9.0f;
	}
	/** Flame Beetle has a weapon range of 40.0 units, or 2 hexes. 
	 * @return 1600
	 */
	public float weaponRangeSquared(){
		return 1600.0f;
	}
	/** Flame Beetle uses a scan range of 160.0 units, or 8 hexes. 
	 * @return 25600
	 */
	public float scanRangeSquared(){
		return 25600.0f;
	}
	/** Flame Beetle pursues to a range of 1 hexes. 
	 * unless it is attacking a base. Then it has a range of two.
	 * @return 1 or 2
	 */
	public int followRange(){
		if(target != null && target.getPlayer() != null && target == target.getPlayer().getBase())
			return 2;
		else
			return 1;
	}
	/** Flame Beetle can fire every frame. 
	 * @return 0
	 */
	public int weaponDelay(){
		return 0;
	}
	/** Flame Beetle fires a FlameWeapon.
	 */
	protected boolean fire() {
		Point3D pt = new Point3D(targetSSMDS.getVector(this));
		pt.doSum(vr[0]).doDifference(cps.getPoint(0)).doProduct(1/6f);
		Projectile.newProjectile(new FlameWeapon(), cps.getPoint(0), pt, 7, 41, 6, this, target);
		return true;
	}
	/** Flame Beetle has a maximum of 100 health.
	 * @return 100
	 */
	protected int maxHealth() {
		return 100;
	}
	/** Flame Beetle has an armor rating of 7
	 * @return 7
	 */
	protected int armor() {
		return 7;
	}
	/** Returns the cost to build this object.
	 * Non-buildable objects have a cost of zero.
	 * @return The cost of the object.
	 */
	public int cost() {
		return 100;
	}

}


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久中文综合久久97| 欧美高清dvd| 亚洲国产精品精华液网站| 日韩欧美久久一区| 91免费看视频| 国产在线视视频有精品| 亚洲一区日韩精品中文字幕| 久久综合精品国产一区二区三区| 在线观看亚洲精品视频| 国产盗摄一区二区| 免费不卡在线视频| 亚洲第一福利一区| 国产欧美精品一区| 日韩午夜电影av| 欧美午夜精品一区二区蜜桃| 高清av一区二区| 精品中文av资源站在线观看| 亚洲一二三四在线观看| 国产精品国产三级国产aⅴ入口| 精品久久久久久久久久久久久久久久久| 一区二区三区中文在线观看| 亚洲国产精华液网站w | 不卡一区二区三区四区| 久久不见久久见免费视频1| 亚洲国产综合91精品麻豆 | 毛片av一区二区| 亚洲午夜在线观看视频在线| 亚洲色图另类专区| 中文字幕的久久| 国产视频911| 久久久久久**毛片大全| 精品少妇一区二区三区在线视频| 在线不卡一区二区| 欧美剧在线免费观看网站| 在线观看一区不卡| 欧美色爱综合网| 色哟哟一区二区| 91啪亚洲精品| 欧美性淫爽ww久久久久无| 91捆绑美女网站| 91丨九色丨尤物| 色悠久久久久综合欧美99| 91麻豆国产在线观看| 色综合久久88色综合天天6| 成人app网站| 972aa.com艺术欧美| 91在线观看视频| 日本乱码高清不卡字幕| 在线国产亚洲欧美| 在线不卡免费欧美| 欧美一区二区三区免费视频| 欧美一级在线视频| 精品电影一区二区三区| 久久精品视频网| 国产精品高潮呻吟| 亚洲免费电影在线| 亚洲r级在线视频| 蜜臀av一区二区在线观看 | av激情综合网| 色视频一区二区| 欧美乱妇15p| 欧美电视剧免费观看| 久久亚洲欧美国产精品乐播| 中文字幕欧美日韩一区| 尤物在线观看一区| 美美哒免费高清在线观看视频一区二区 | 欧美视频一区二区| 日韩午夜三级在线| 国产三级精品三级| 亚洲精品国产精华液| 日韩一区精品字幕| 国产成人一区在线| 欧美在线视频全部完| 日韩一级二级三级| 国产精品初高中害羞小美女文| 一区二区三区久久| 精品一区二区三区免费播放| 国产91露脸合集magnet| 欧美唯美清纯偷拍| 精品久久久久久久人人人人传媒 | 国产在线精品一区二区三区不卡| youjizz久久| 欧美一二三区精品| 国产精品久久网站| 午夜精品久久久久久久蜜桃app| 精品综合久久久久久8888| 色综合欧美在线视频区| 91精品啪在线观看国产60岁| 国产欧美一区二区三区网站| 成人综合婷婷国产精品久久蜜臀| 激情六月婷婷久久| 国产成人在线视频网站| 欧美最猛性xxxxx直播| 精品国产乱码久久久久久浪潮| 亚洲欧洲美洲综合色网| 免费欧美日韩国产三级电影| 成人h版在线观看| 欧美一级二级在线观看| 一区二区三区av电影| 国产伦精品一区二区三区免费迷| 91成人国产精品| 国产欧美精品在线观看| 婷婷六月综合亚洲| 色94色欧美sute亚洲13| 久久日一线二线三线suv| 午夜精品福利视频网站| 91亚洲精品一区二区乱码| 精品毛片乱码1区2区3区| 亚洲1区2区3区4区| 91麻豆免费观看| 欧美国产精品一区二区| 久久精品久久99精品久久| 色婷婷av一区二区三区gif | av电影在线观看一区| 久久精品一二三| 蜜桃精品视频在线| 欧美日韩国产美女| 亚洲激情校园春色| 95精品视频在线| 国产精品妹子av| 国产成人综合亚洲网站| 日韩女优制服丝袜电影| 天天色综合天天| 欧美日韩一二三区| 亚洲一区二区三区视频在线 | 青青草97国产精品免费观看无弹窗版 | 亚洲成人久久影院| 色偷偷久久一区二区三区| 国产精品久久久久久久裸模| 国产精品538一区二区在线| 精品国产一区a| 韩国v欧美v亚洲v日本v| 日韩欧美激情四射| 免费成人av在线| 欧美电视剧在线看免费| 麻豆精品久久久| 欧美大尺度电影在线| 久久国产综合精品| 日韩一区二区高清| 免费精品视频在线| 日韩美女一区二区三区四区| 日本不卡的三区四区五区| 欧美高清一级片在线| 日本不卡一区二区| 欧美不卡视频一区| 国产精品99久久久久久似苏梦涵 | 久久综合久久鬼色中文字| 国产一区二区剧情av在线| 精品sm捆绑视频| 国产一区二区三区四区在线观看| 欧美精品一区二区三区在线播放| 国产美女精品人人做人人爽| 国产欧美日韩精品在线| av资源站一区| 亚洲超丰满肉感bbw| 日韩三级伦理片妻子的秘密按摩| 狠狠色丁香久久婷婷综合丁香| 国产亚洲欧美日韩日本| 91在线免费看| 亚洲国产日产av| 欧美成人一区二区三区| 国产成人精品免费看| 国产精品久久久久天堂| 在线区一区二视频| 日本欧美肥老太交大片| 久久九九99视频| 91国产丝袜在线播放| 麻豆精品在线看| 国产精品视频一区二区三区不卡| 91香蕉视频mp4| 蜜臀久久99精品久久久久久9| 国产清纯在线一区二区www| 一本色道综合亚洲| 美女视频黄频大全不卡视频在线播放| 久久九九99视频| 欧洲国内综合视频| 久久99精品久久久久婷婷| 亚洲视频香蕉人妖| 欧美一区二区精品| 99视频超级精品| 青青草成人在线观看| 亚洲欧洲在线观看av| 欧美一区二区三区系列电影| 国产美女av一区二区三区| 亚洲美女一区二区三区| 精品少妇一区二区三区免费观看 | 国产精品黄色在线观看| 欧美亚洲国产一卡| 国产一区二区美女| 亚洲国产日韩在线一区模特| 国产亚洲成aⅴ人片在线观看| 欧美午夜一区二区三区| 风间由美一区二区av101| 亚洲v中文字幕| 中文字幕一区二区三区视频| 制服丝袜亚洲色图| 91丝袜美女网| 国产成人免费视频网站 | 久久精品噜噜噜成人av农村| 国产裸体歌舞团一区二区|