Exemplo n.º 1
0
 def __init__(self, ip, port, name):
     self.socket=None
     self.ip=ip
     self.port=port
     self.running = False
     
     self.buffer = Network.Buff()
     self.pid=-1
     
     self.name=name
    def __init__(self, connection, address, server, pid):
        threading.Thread.__init__(self)

        self.connection = connection
        self.address = address
        self.server = server
        self.connected = True

        self.pid = pid
        self.id = -1

        self.buffer = Network.Buff()
Exemplo n.º 3
0
    def __init__(self, connection, address, server, pid, ip):
        threading.Thread.__init__(self)
        self.connection = connection  # Connection Information
        self.address = address  # Client Address Properties
        self.server = server  # Reference to main server
        self.connected = True  # Connection status
        self.ip = ip
        self.pid = pid
        self.robotIP = "127.0.0.1"  #"192.168.43.214"
        self.robotPort = 60856
        self.buffer = Network.Buff(self)

        self.msg_id = -1
Exemplo n.º 4
0
	def __init__(self, connection, address, server, pid):
		threading.Thread.__init__(self)

		self.connection = connection  # Connection Information
		self.address = address  # Client Address Properties
		self.server = server  # Reference to main server
		self.connected = True  # Connection status
		self.handshake = handshake_codes['UNKNOWN']  # Handshake status defaulted to unknown
		self.user = None  # Clients each have a user for the game
		self.pid = pid
		self.id = -1
		self.username = ""
		self.buffer = Network.Buff()
Exemplo n.º 5
0
    def __init__(self, connection, address, server, pid):
        threading.Thread.__init__(self)

        self.connection = connection
        self.address = address
        self.server = server
        self.connected = True

        self.pid = pid
        self.id = -1  #used for database

        self.buffer = Network.Buff()
        self.player = None
        self.name = None

        self.ping = 0
        self.pingtime = time.time()
Exemplo n.º 6
0
    def __init__(self, server):
        threading.Thread.__init__(self)

        self.buffer = Network.Buff()
        self.entities = []
        self.running = True
        self.server = server

        self.eCurId = 1

        self.wep_doSpawn = 1
        self.wep_timer = 0
        self.wep_timeToRespawn = 5
        self.wep_spawnLocations = []
        self.wep_spawnLocations.append((3000, 950))

        self.hp_doSpawn = 1
        self.hp_timer = 0
        self.hp_timeToRespawn = 5
        self.hp_spawnLocations = []
        self.hp_spawnLocations.append((2200, 900))
        self.hp_spawnLocations.append((1300, 2200))
        self.hp_spawnLocations.append((2900, 3300))
Exemplo n.º 7
0
    def __init__(self, ip, port, world):
        self.socket = None
        self.ip = ip
        self.port = port
        self.running = False

        self.buffer = Network.Buff()
        self.pid = -1
        self.username = None

        self.world = world

        self.loginStatus = login_status["wait"]
        self.loginmessage = ""

        #starting variables
        self.startx = 0
        self.starty = 0
        self.starthpmax = 0
        self.starthp = 0
        self.startmanamax = 0
        self.startmana = 0
        self.startstaminamax = 0
        self.startstamina = 0