actionscript for multiplayer Games and virtual worlds_源码(下半部)
actionscript for multiplayer Games and virtual worlds_源码(下半部)
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 141774 2009-06-25 08:58 chapter11lob_bros_gameclientinCoopGame.swf
....... 1033 2009-06-25 08:58 chapter11lob_bros_gameclientinlevelslevel0.xml
....... 2299 2009-06-25 08:58 chapter11lob_bros_gameclientinlevelslevel1.xml
....... 2829 2009-06-25 08:58 chapter11lob_bros_gameclientinlevelslevel2.xml
....... 66 2009-06-25 08:59 chapter11lob_bros_gameclientinserver.xml
....... 41307 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsareYouReady.mp3
....... 526729 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsackGroundMusic.mp3
....... 11143 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsdeath.mp3
....... 9665 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundselectricGate.mp3
....... 48610 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsgameOver.mp3
....... 17681 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundslaserBeam.mp3
....... 29384 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundslever.mp3
....... 14910 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsmoan.mp3
....... 22696 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsmoveRock.mp3
....... 21249 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundssavePoint.mp3
....... 38161 2009-06-25 08:58 chapter11lob_bros_gameclientinsounds owerDestroy.mp3
....... 59850 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsvictory.mp3
....... 18015 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsyo.mp3
....... 2615 2009-06-25 08:58 chapter11lob_bros_gameclientCoopGame.as3proj
....... 152946 2009-06-25 08:58 chapter11lob_bros_gameclientlibas3-client-4.0.6a.swc
....... 1097 2009-06-25 08:58 chapter11lob_bros_gameclientobjCoopGameConfig.old
....... 1097 2009-06-25 08:58 chapter11lob_bros_gameclientobjCoopGameConfig.xml
....... 2148864 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetsassets.fla
....... 19059 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetsassets.swf
....... 37211 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetssoundsareYouReady.mp3
....... 17681 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetssoundslaserBeam.mp3
....... 19025 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopCoopGame.as
....... 981 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopelementsGate.as
....... 431 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopelementsGoalPad.as
....... 1846 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopelementsLaserBeam.as
............此处省略820个文件信息
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 chapter11lob_bros_gameclientinCoopGame.swf
....... 1033 2009-06-25 08:58 chapter11lob_bros_gameclientinlevelslevel0.xm
....... 2299 2009-06-25 08:58 chapter11lob_bros_gameclientinlevelslevel1.xm
....... 2829 2009-06-25 08:58 chapter11lob_bros_gameclientinlevelslevel2.xm
....... 66 2009-06-25 08:59 chapter11lob_bros_gameclientinserver.xm
....... 41307 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsareYouReady.mp3
....... 526729 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsackGroundMusic.mp3
....... 11143 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsdeath.mp3
....... 9665 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundselectricGate.mp3
....... 48610 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsgameOver.mp3
....... 17681 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundslaserBeam.mp3
....... 29384 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundslever.mp3
....... 14910 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsmoan.mp3
....... 22696 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsmoveRock.mp3
....... 21249 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundssavePoint.mp3
....... 38161 2009-06-25 08:58 chapter11lob_bros_gameclientinsounds owerDestroy.mp3
....... 59850 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsvictory.mp3
....... 18015 2009-06-25 08:58 chapter11lob_bros_gameclientinsoundsyo.mp3
....... 2615 2009-06-25 08:58 chapter11lob_bros_gameclientCoopGame.as3proj
....... 152946 2009-06-25 08:58 chapter11lob_bros_gameclientlibas3-client-4.0.6a.swc
....... 1097 2009-06-25 08:58 chapter11lob_bros_gameclientobjCoopGameConfig.old
....... 1097 2009-06-25 08:58 chapter11lob_bros_gameclientobjCoopGameConfig.xm
....... 2148864 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetsassets.fla
....... 19059 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetsassets.swf
....... 37211 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetssoundsareYouReady.mp3
....... 17681 2009-06-25 08:58 chapter11lob_bros_gameclientsrcassetssoundslaserBeam.mp3
....... 19025 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopCoopGame.as
....... 981 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopelementsGate.as
....... 431 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopelementsGoalPad.as
....... 1846 2009-06-25 08:58 chapter11lob_bros_gameclientsrccomgamebookcoopelementsLaserBeam.as
............此处省略820个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)