Logo
Explore Help
Register Sign In
Cr8-xyz/blender
1
0
Fork 0
You've already forked blender
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
7a231938119f97bde0f78bd939a55274806cf1f5
blender/release/scripts/templates/gamelogic_basic.py

17 lines
266 B
Python
Raw Normal View History

update for gamelogic templates
2010-10-11 22:25:28 +00:00
import bge
Script templates, including game logic scripts from 2.4x and new operator template. Files copied into scripts/templates will automatically appear in the menu. the operator template is a bit rough but a start.
2009-10-29 11:26:44 +00:00
def main():
update for gamelogic templates
2010-10-11 22:25:28 +00:00
cont = bge.logic.getCurrentController()
tabs to spaces, remove trailing white space. (apart of pep8) didnt do "release/scripts/io" since some exporters cant be auto converted
2009-10-31 19:31:45 +00:00
own = cont.owner
sens = cont.sensors['mySensor']
actu = cont.actuators['myActuator']
if sens.positive:
cont.activate(actu)
else:
cont.deactivate(actu)
Script templates, including game logic scripts from 2.4x and new operator template. Files copied into scripts/templates will automatically appear in the menu. the operator template is a bit rough but a start.
2009-10-29 11:26:44 +00:00
main()
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 1388ms Template: 100ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API