Ejemplo n.º 1
0
def sendBulletToOtherPlayers(bullet):
    bullet_data = bullet.getObjectFromSelf()
    bullet_data['action'] = NetworkActions.TANK_FIRE

    if Global.IsGeneralServer:
        Global.addToQueue(bullet_data)
    else:
        Global.TankNetworkListenerConnection.Send(bullet_data)
Ejemplo n.º 2
0
def SendDestroyBulletEvent(bullet):
    bullet_data = bullet.getObjectFromSelf()
    bullet_data['action'] = NetworkActions.DESTROY
    Global.addToQueue(bullet_data)
    # removeBullet({
    #     "action": Global.NetworkActions.DESTROY,
    #     NetworkDataCodes.TYPE: self.type,
    #     NetworkDataCodes.POSITION: self.position,
    #     NetworkDataCodes.ID: self.id
    # })