public void createBomb(PlayerID _id) { Player player = PlayerManager.Instance().getPlayer(_id); player.removeBombSprite(); Ship pShip = player.playerShip; Body pShipBody = pShip.physicsObj.body; Bomb bomb; if (_id == PlayerID.one) { bomb = new Bomb(GameObjType.p1Bomb, _id, pShip); } else { bomb = new Bomb(GameObjType.p2Bomb, _id, pShip); } }
public void createBomb(PlayerID _id) { Player player = PlayerManager.getPlayer(_id); OutputQueue outqueue = new OutputQueue(); player.removeBombSprite(); Ship pShip = player.playerShip; Body pShipBody = pShip.physicsObj.body; Bomb bomb; if (_id == PlayerID.one) { bomb = new Bomb(GameObjType.p1Bomb, _id, pShip); } else { bomb = new Bomb(GameObjType.p2Bomb, _id, pShip); } OutQueue.add(QueueType.bomb, bomb, _id); }