giantsd/giants/player.py

23 lines
503 B
Python
Raw Permalink Normal View History

2019-01-22 01:30:42 +01:00
from .entity import Entity
2019-02-05 01:35:22 +01:00
import random
class PlayerPhases:
NONE = 0
CFRAME_CONNECT = 1
CFRAME_CONNECTED = 2
DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO_EX = 3
DN_SEND_CONNECT_INFO = 4
DN_ACK_CONNECT_INFO = 5
2019-01-22 01:30:42 +01:00
class Player(Entity):
def __init__(self, name, session):
super().__init__()
self.name = name
self.session = session
2019-02-05 01:35:22 +01:00
self.team = 1
2019-01-22 01:30:42 +01:00
self.score = 0
2019-02-05 01:35:22 +01:00
self.id = random.getrandbits(32)
self.phase = PlayerPhases.NONE