Пример #1
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()

    # changing background color
    pbge.background(0, 0, 0)

    # storing the reference of the created objects
    # into 'pbge' to animate them later
    pbge.myplane = pbge.createPlane(0, 0, -3)
    pbge.mycube = pbge.createCube(0, 2, 0)
    pbge.mysphere = pbge.createSphere(0, -2, 0)
    pbge.mycylinder = pbge.createCylinder(2, 0, 0)
    pbge.myspot = pbge.createSpot(0, 0, 7)

    pbge.scale(pbge.myplane, 10)
    pbge.scale(pbge.mycylinder, 0.3, 0.3, 4)
    pbge.scaleZ(pbge.mycube, 2)

    # changing objects color
    pbge.changeColor(pbge.myplane, 255, 0, 0)
    pbge.changeColor(pbge.mycube, 0, 255, 255)
    pbge.changeColor(pbge.mysphere, 255, 0, 255)
    pbge.changeColor(pbge.mycylinder, 255, 255, 255)
Пример #2
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()
    
    # changing background color
    pbge.background( 0,0,0 )
    
    # storing the reference of the created objects
    # into 'pbge' to animate them later
    pbge.myplane = pbge.createPlane( 0,0,-3 )
    pbge.mycube = pbge.createCube( 0,2,0 )
    pbge.mysphere = pbge.createSphere( 0,-2,0 )
    pbge.mycylinder = pbge.createCylinder( 2,0,0 )
    pbge.myspot = pbge.createSpot( 0,0,7 )
    
    pbge.scale( pbge.myplane, 10 )
    pbge.scale( pbge.mycylinder, 0.3, 0.3, 4 )
    pbge.scaleZ( pbge.mycube, 2 )
    
    # changing objects color
    pbge.changeColor( pbge.myplane, 255,0,0 )
    pbge.changeColor( pbge.mycube, 0,255,255 )
    pbge.changeColor( pbge.mysphere, 255,0,255 )
    pbge.changeColor( pbge.mycylinder, 255,255,255 )
Пример #3
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()
    
    p = pbge.createPlane( 0,0,-2 )
    pbge.scale( p, 10,10,1 )
    
    pbge.createOscReceiver( 23000 )
Пример #4
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()

    p = pbge.createPlane(0, 0, -2)
    pbge.scale(p, 10, 10, 1)

    pbge.createOscReceiver(23000)
Пример #5
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()

    pbge.myplane = pbge.createPlane(0, 0, -3)
    pbge.mycube = pbge.createCube(0, 2, 0)
    pbge.myspot = pbge.createSpot(0, 0, 7)
    pbge.scale(pbge.myplane, 10)
Пример #6
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()
    
    pbge.myplane = pbge.createPlane( 0,0,-3 )
    pbge.mycube = pbge.createCube( 0,0,0 )
    pbge.myspot = pbge.createSpot( 0,0,7 )
    pbge.scale( pbge.myplane, 10 )
    
    pbge.speed = 0.07
Пример #7
0
def init():
    scene = bge.logic.getCurrentScene()
    scene.post_draw = [animate]
    pbge.configure()
    
    # getting the reference of the created objects
    # for further modifications
    myplane = pbge.createPlane( -2,0,0 )
    mycube = pbge.createCube( 0,2,0 )
    mysphere = pbge.createSphere( 0,-2,0 )
    mycylinder = pbge.createCylinder( 2,0,0 )
    
    #let's place a spot
    myspot = pbge.createSpot( 0,0,7 )
    
    # all objects are created, 
    # let's change the position:
    pbge.moveTo( myplane, 0,0,-3 )
    # let's change the size:
    pbge.scale( myplane, 10 )
    pbge.scaleZ( mycube, 3 )
    # let's change the orientation:
    pbge.rotateX( mycylinder, 15 )