py api: sphinx doc corrections, pep8 cleanup and style edits, also added __all__ to some modules which were missing it.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
Physics Constraints (bge.constraints)
|
||||
==================================
|
||||
=====================================
|
||||
|
||||
.. function:: createConstraint(physicsid, physicsid2, constrainttype, [pivotX, pivotY, pivotZ, [axisX, axisY, axisZ, [flag]]]])
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Game Keys (bge.events)
|
||||
=============================
|
||||
======================
|
||||
|
||||
*****
|
||||
Intro
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
Game Logic (bge.logic)
|
||||
============================
|
||||
======================
|
||||
|
||||
*****
|
||||
Intro
|
||||
*****
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Rasterizer (bge.render)
|
||||
=============================
|
||||
=======================
|
||||
|
||||
*****
|
||||
Intro
|
||||
@@ -16,8 +16,8 @@ Intro
|
||||
import bge.render
|
||||
import bge.logic
|
||||
|
||||
# SCALE sets the speed of motion
|
||||
SCALE=[1, 0.5]
|
||||
# scale sets the speed of motion
|
||||
scale = 1.0, 0.5
|
||||
|
||||
co = bge.logic.getCurrentController()
|
||||
obj = co.getOwner()
|
||||
@@ -27,8 +27,8 @@ Intro
|
||||
|
||||
# Transform the mouse coordinates to see how far the mouse has moved.
|
||||
def mousePos():
|
||||
x = (bge.render.getWindowWidth()/2 - mouse.getXPosition())*SCALE[0]
|
||||
y = (bge.render.getWindowHeight()/2 - mouse.getYPosition())*SCALE[1]
|
||||
x = (bge.render.getWindowWidth() / 2 - mouse.getXPosition()) * scale[0]
|
||||
y = (bge.render.getWindowHeight() / 2 - mouse.getYPosition()) * scale[1]
|
||||
return (x, y)
|
||||
|
||||
pos = mousePos()
|
||||
@@ -43,7 +43,7 @@ Intro
|
||||
bge.logic.addActiveActuator(wmotion, True)
|
||||
|
||||
# Centre the mouse
|
||||
bge.render.setMousePosition(bge.render.getWindowWidth()/2, bge.render.getWindowHeight()/2)
|
||||
bge.render.setMousePosition(bge.render.getWindowWidth() / 2, bge.render.getWindowHeight() / 2)
|
||||
|
||||
*********
|
||||
Constants
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Video Texture (bge.texture)
|
||||
==============================
|
||||
===========================
|
||||
|
||||
*****
|
||||
Intro
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Game Types (bge.types)
|
||||
=============================
|
||||
======================
|
||||
|
||||
.. module:: bge.types
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
OpenGL Wrapper (bgl)
|
||||
===========================
|
||||
====================
|
||||
|
||||
.. module:: bgl
|
||||
|
||||
@@ -71,8 +71,8 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
|
||||
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html>`_
|
||||
|
||||
:type mode: Enumerated constant
|
||||
:arg mode: Specifies the primitive that will be create from vertices between glBegin and
|
||||
glEnd.
|
||||
:arg mode: Specifies the primitive that will be create from vertices between
|
||||
glBegin and glEnd.
|
||||
|
||||
|
||||
.. function:: glBindTexture(target, texture):
|
||||
@@ -1886,4 +1886,3 @@ class Buffer:
|
||||
the Buffer. If a template is not passed in all fields will be initialized to 0.
|
||||
:rtype: Buffer object
|
||||
:return: The newly created buffer as a PyObject.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user