Skip to content

Commit

Permalink
convert script to module
Browse files Browse the repository at this point in the history
  • Loading branch information
gandalf3 committed Dec 25, 2015
1 parent f0b2780 commit 2916bfd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
Binary file modified lonely_photon.blend
Binary file not shown.
12 changes: 0 additions & 12 deletions reset_player

This file was deleted.

14 changes: 14 additions & 0 deletions reset_player.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from bge import logic

#cont = logic.getCurrentController()
#message = cont.sensors["Message"]


def main(cont):
own = cont.owner
logic.getCurrentScene().objects["player"].worldPosition = own.worldPosition

if 'init' not in own:
logic.getCurrentScene().objects["camera"].worldPosition.x = own.worldPosition.x
logic.getCurrentScene().objects["camera"].worldPosition.y = own.worldPosition.y
own['init'] = True

0 comments on commit 2916bfd

Please sign in to comment.