Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

checking for local player

  • Loading branch information...
commit be6277de867e5f4934a47926593a6acfc9678187 1 parent 7d74ba5
Alec Goebel alecgoebel authored
1  samplecode/networking_example/coinget/client/game.py
View
@@ -44,6 +44,7 @@ def __init__(self, app, player, world, network):
self.world = world
self.network = network
self.player = player
+ self.player.local = True
self.controller = PlayerController(player)
1  samplecode/networking_example/coinget/client/sprites/player.py
View
@@ -20,6 +20,7 @@ def __init__(self, player):
self.rect.center = player.rect.center
self.player = player
+ print "local", self.player.local
dispatcher.connect(self.kill, signal=signals.DEL_OBJECT, sender=player)
def update(self):
1  samplecode/networking_example/coinget/world/player.py
View
@@ -19,6 +19,7 @@ def __init__(self, identifier, nick, color, pos, vel=(0,0)):
self.vx, self.vy = vel
self.x, self.y = pos
self.rect.center = pos
+ self.local = False
dispatcher.connect(self.move, signal=signals.MOVE_PLAYER, sender=self)
Please sign in to comment.
Something went wrong with that request. Please try again.