-
大小: 36.08MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-06-30
- 语言: 其他
- 标签: actionscript multiplayer virtual worlds源码
资源简介
actionscript for multiplayer Games and virtual worlds_源码(下半部)
代码片段和文件信息
package com.gamebook.collision;
import com.gamebook.tank.*;
import com.electrotank.electroserver4.extensions.api.value.Esobject;
import com.electrotank.electroserver4.extensions.api.value.Number;
import java.awt.Point;
import org.slf4j.Logger;
public class Collision {
private boolean collide;
private Point collisionPoint;
private long timeOfCollision;
private PlayerInfo tank = null;
private Projectile bullet;
private boolean tankKilled = false;
private String collisionType;
public Esobject toEsobject() {
Esobject message = new Esobject();
message.setString(PluginConstants.ACTION PluginConstants.SHOT_HIT);
message.setNumber(PluginConstants.TIME_STAMP new Number( timeOfCollision ));
message.setInteger(PluginConstants.ITEM_ID bullet.getId());
message.setString(PluginConstants.SHOT_HIT collisionType);
if (tank != null) {
message.setString(PluginConstants.NAME tank.getPlayerName());
message.setInteger(PluginConstants.HEALTH tank.getHealth());
}
return message;
}
public static Esobject getMissMessage(Projectile bullet) {
Esobject message = new Esobject();
message.setString(PluginConstants.ACTION PluginConstants.SHOT_HIT);
message.setNumber(PluginConstants.TIME_STAMP new Number( bullet.getTargetTime() ));
message.setInteger(PluginConstants.ITEM_ID bullet.getId());
message.setString(PluginConstants.SHOT_HIT PluginConstants.COLLISION_OUT_OF_BOUNDS);
return message;
}
public void executeHit(Logger logger) {
if (tank != null) {
int health = tank.decrementHealth();
if (health <= 0) {
setTankKilled(true);
logger.debug(“tank killed!“);
}
}
}
public boolean canCollide() {
return collide;
}
public void setCollide(boolean collide) {
this.collide = collide;
}
public Point getCollisionPoint() {
return collisionPoint;
}
public void setCollisionPoint(Point collisionPoint) {
this.collisionPoint = collisionPoint;
}
public long getTimeOfCollision() {
return timeOfCollision;
}
public void setTimeOfCollision(long timeOfCollision) {
this.timeOfCollision = timeOfCollision;
}
public PlayerInfo getTank() {
return tank;
}
public void setTank(PlayerInfo tank) {
this.tank = tank;
}
public Projectile getBullet() {
return bullet;
}
public void setBullet(Projectile bullet) {
this.bullet = bullet;
}
public boolean isTankKilled() {
return tankKilled;
}
public void setTankKilled(boolean tankKilled) {
this.tankKilled = tankKilled;
}
public String getCollisionType() {
return collisionType;
}
public void setCollisionType(String collisionType) {
this.collisionType
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 141774 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\CoopGame.swf
....... 1033 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\levels\level0.xm
....... 2299 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\levels\level1.xm
....... 2829 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\levels\level2.xm
....... 66 2009-06-25 08:59 chapter11\blob_bros_game\client\bin\server.xm
....... 41307 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\areYouReady.mp3
....... 526729 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\backGroundMusic.mp3
....... 11143 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\death.mp3
....... 9665 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\electricGate.mp3
....... 48610 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\gameOver.mp3
....... 17681 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\laserBeam.mp3
....... 29384 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\lever.mp3
....... 14910 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\moan.mp3
....... 22696 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\moveRock.mp3
....... 21249 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\savePoint.mp3
....... 38161 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\towerDestroy.mp3
....... 59850 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\victory.mp3
....... 18015 2009-06-25 08:58 chapter11\blob_bros_game\client\bin\sounds\yo.mp3
....... 2615 2009-06-25 08:58 chapter11\blob_bros_game\client\CoopGame.as3proj
....... 152946 2009-06-25 08:58 chapter11\blob_bros_game\client\lib\as3-client-4.0.6a.swc
....... 1097 2009-06-25 08:58 chapter11\blob_bros_game\client\obj\CoopGameConfig.old
....... 1097 2009-06-25 08:58 chapter11\blob_bros_game\client\obj\CoopGameConfig.xm
....... 2148864 2009-06-25 08:58 chapter11\blob_bros_game\client\src\assets\assets.fla
....... 19059 2009-06-25 08:58 chapter11\blob_bros_game\client\src\assets\assets.swf
....... 37211 2009-06-25 08:58 chapter11\blob_bros_game\client\src\assets\sounds\areYouReady.mp3
....... 17681 2009-06-25 08:58 chapter11\blob_bros_game\client\src\assets\sounds\laserBeam.mp3
....... 19025 2009-06-25 08:58 chapter11\blob_bros_game\client\src\com\gamebook\coop\CoopGame.as
....... 981 2009-06-25 08:58 chapter11\blob_bros_game\client\src\com\gamebook\coop\elements\Gate.as
....... 431 2009-06-25 08:58 chapter11\blob_bros_game\client\src\com\gamebook\coop\elements\GoalPad.as
....... 1846 2009-06-25 08:58 chapter11\blob_bros_game\client\src\com\gamebook\coop\elements\LaserBeam.as
............此处省略820个文件信息
相关资源
- 虚拟串口 Virtual Com.rar
- STM32 USB转串口驱动 Virtual COM Port Driv
- Easy Touch 3.1 - Touchscreen & Virtual Joystic
- STM32 USB转串口驱动 Virtual COM Port Driv
- STMicroelectronics Virtual COM Port驱动及gh
- VirtualBreadboard/vjredist
- 3D Engine Design for Virtual Globes
- 249_黑群晖ForVirtualBox.zip
- 六祎-在virtualbox中安装CentOS-7.zip
- VirtualBox-5.2.16-123759-Win
- virtualBox 5.2 mac
-
Actionsc
ript3.0做的Flash小游戏 俄罗斯 - 虚拟声卡virtualaudiocable-v4.09破解版
- flash小游戏源代码
- virtualdrivemaster.exe
- 单片机模拟器Virtual51
- VirtualBox实现文件夹共享
- DirectShow虚拟摄像头工程
- 国外经典的31个flash as特效as3.0
- virtual listctrl
-
Actionsc
ript3.0开发的射击小游戏 - VirtualList.7z
- 资源树Virtualizing 使用模板.unitypackag
- 本地安装CentOS-7-x86_64-Vagrant-2004_01.Vi
- Virtual Audio Cable 4.10 Win10版
- flash avm2 虚拟机说明
- VirtualBox
- 虚拟声卡Virtual Audio
- GPS导航系统仿真源代码+仿真文件+虚拟
- 带数字签名Virtual USB Multikey64bit drive
评论
共有 条评论