bmesh py api: change .from_mesh() / .to_mesh() to be class methods of BMesh rather than functions in the module.
added example script which converts a mesh to a bmesh, edits and converts back again.
This commit is contained in:
17
release/scripts/templates/gamelogic_simple.py
Normal file
17
release/scripts/templates/gamelogic_simple.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import bge
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
cont = bge.logic.getCurrentController()
|
||||
own = cont.owner
|
||||
|
||||
sens = cont.sensors['mySensor']
|
||||
actu = cont.actuators['myActuator']
|
||||
|
||||
if sens.positive:
|
||||
cont.activate(actu)
|
||||
else:
|
||||
cont.deactivate(actu)
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user