diff options
Diffstat (limited to 'release/scripts/templates/gamelogic_module.py')
-rw-r--r-- | release/scripts/templates/gamelogic_module.py | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/release/scripts/templates/gamelogic_module.py b/release/scripts/templates/gamelogic_module.py index 1bc221e727d..c19ec7d9116 100644 --- a/release/scripts/templates/gamelogic_module.py +++ b/release/scripts/templates/gamelogic_module.py @@ -1,3 +1,21 @@ +# ##### BEGIN GPL LICENSE BLOCK ##### +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ##### END GPL LICENSE BLOCK ##### + # This module can be accessed by a python controller with # its execution method set to 'Module' # * Set the module string to "gamelogic_module.main" (without quotes) @@ -13,14 +31,14 @@ import GameLogic # with multiple objects. def main(cont): - own = cont.owner - - sens = cont.sensors['mySensor'] - actu = cont.actuators['myActuator'] - - if sens.positive: - cont.activate(actu) - else: - cont.deactivate(actu) + own = cont.owner + + sens = cont.sensors['mySensor'] + actu = cont.actuators['myActuator'] + + if sens.positive: + cont.activate(actu) + else: + cont.deactivate(actu) # dont call main(GameLogic.getCurrentController()), the py controller will |