0.11
                   Mouseevent
                
            
            
        
                             
                             
                             Projekt3D4G.py — text/python-source, 1 KB (1194 bytes)
Dateiinhalt
from visual import *
from random import random
scene.width=600
scene.height=600
scene.title="3D 4 in a row"
#Matrix
#for i in range(4):
 #   for j in range(4):
  #      for k in range(
# 3dmatrix = [[[e1,e2,e3],[e3,e4,
#zellex = 3dmatrix[0][3][1]
# Koordinatenachsen in Form von Pfeilen
xAchse = arrow(axis=(10,0,0), shaftwidth=0.05, color=color.red)
yAchse = arrow(axis=(0,10,0), shaftwidth=0.05, color=(0,0,1))
zAchse = arrow(axis=(0,0,10), shaftwidth=0.05, color=color.green)
# Beschriftungen
xLabel = label(pos=(10,0,0), text="x-Achse")
yLabel = label(pos=(0,10,0), text="y-Achse")
zLabel = label(pos=(0,0,10), text="z-Achse")
matrix = [[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],
          [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],
          [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],
          [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]]
x=matrix[0][0][0]
block = []
for i in range(4):
    for j in range(4):
        for k in range(4):
             block.append (box(pos=(i,j,k),opacity=0.9))
while True:
    rate(50)
    x=0
    if scene.mouse.events:
        sme=scene.mouse.getevent()
        if sme.press==True and sme.pick==block[0:15]:
            print "hurra"
        
            
