Changeset View
Changeset View
Standalone View
Standalone View
doc/python_api/examples/bge.texture.1.py
| """ | """ | ||||
| Texture Replacement | Texture Replacement | ||||
| +++++++++++++++++++ | +++++++++++++++++++ | ||||
| Example of how to replace a texture in game with an external image. | Example of how to replace a texture in game with an external image. | ||||
| createTexture() and removeTexture() are to be called from a module Python | ``createTexture()`` and ``removeTexture()`` are to be called from a | ||||
| Controller. | module Python Controller. | ||||
| """ | """ | ||||
| from bge import logic | from bge import logic | ||||
| from bge import texture | from bge import texture | ||||
| def createTexture(cont): | def createTexture(cont): | ||||
| """Create a new Dynamic Texture""" | """Create a new Dynamic Texture""" | ||||
| obj = cont.owner | obj = cont.owner | ||||
| Show All 25 Lines | |||||