moagg.game
Class MultiPlayerServerGameObject
java.lang.Object
com.golden.gamedev.GameObject
moagg.game.MultiPlayerServerGameObject
public class MultiPlayerServerGameObject
- extends com.golden.gamedev.GameObject
Fields inherited from class com.golden.gamedev.GameObject |
bsGraphics, bsInput, bsIO, bsLoader, bsMusic, bsSound, bsTimer, fontManager, parent |
Constructor Summary |
MultiPlayerServerGameObject(com.golden.gamedev.GameEngine parent,
java.lang.String mission,
java.lang.String missionLevel)
|
Methods inherited from class com.golden.gamedev.GameObject |
checkPosMouse, checkPosMouse, click, drawFPS, getCurrentFPS, getFPS, getHeight, getImage, getImage, getImages, getImages, getImages, getImages, getImages, getImages, getMouseX, getMouseY, getRandom, getWidth, hideCursor, keyDown, keyPressed, playMusic, playSound, rightClick, setFPS, setMaskColor, showCursor, start, takeScreenShot, takeScreenShot |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiPlayerServerGameObject
public MultiPlayerServerGameObject(com.golden.gamedev.GameEngine parent,
java.lang.String mission,
java.lang.String missionLevel)
getLevel
public Level getLevel()
getClientData
public MultiPlayerClientData getClientData(int id)
initPlayer
protected Ship initPlayer(int shipType)
resetPlayer
protected void resetPlayer(Ship player)
- This method resets any upgrades the player's ship might have.
initPlayer2
protected void initPlayer2(Ship player)
- This method initializes the player's ship
for the initial (or a further) life.
getGameControl
public GameControl getGameControl()
getProjectilesSpriteGroup
public com.golden.gamedev.object.SpriteGroup getProjectilesSpriteGroup()
getObjectsSpriteGroup
public com.golden.gamedev.object.SpriteGroup getObjectsSpriteGroup()
getPlayersSpriteGroup
public com.golden.gamedev.object.SpriteGroup getPlayersSpriteGroup()
addProjectile
public void addProjectile(ShootableObject shootable)
initResources
public void initResources()
- Specified by:
initResources
in class com.golden.gamedev.GameObject
initResources2
public void initResources2()
initBackground
protected void initBackground()
initCollisionGroups
protected void initCollisionGroups()
render
public void render(java.awt.Graphics2D g)
- Specified by:
render
in class com.golden.gamedev.GameObject
renderPreview
public void renderPreview(java.awt.Graphics2D g)
update
public void update(long elapsedTime)
- Specified by:
update
in class com.golden.gamedev.GameObject
checkFrags
protected void checkFrags()
checkDestroyedObjects
protected void checkDestroyedObjects()
findShipByNetworkId
protected Ship findShipByNetworkId(short networkId)
processPacket
protected void processPacket(com.golden.gamedev.engine.network.NetworkPacket packet,
MultiPlayerClientData data)
throws java.io.IOException
- Throws:
java.io.IOException
broadcastCreateShipPacket
protected void broadcastCreateShipPacket(MultiPlayerClientData data)
sendCreateShipPacket
protected void sendCreateShipPacket(MultiPlayerClientData data,
com.golden.gamedev.engine.BaseClient client)
throws java.io.IOException
- Throws:
java.io.IOException
broadcastUpdateShipPacket
protected void broadcastUpdateShipPacket(MultiPlayerClientData data)
broadcastDestroyProjectilePacket
protected void broadcastDestroyProjectilePacket(DestroyableObject destroyable)
broadcastUpdateFragsPacket
protected void broadcastUpdateFragsPacket()
broadcastDisconnect
protected void broadcastDisconnect(MultiPlayerClientData data)
throws java.io.IOException
- Throws:
java.io.IOException
finish
public void finish()
- Overrides:
finish
in class com.golden.gamedev.GameObject
Copyright © 2008. All Rights Reserved.