def initFun(): print "initFun" glEnable(GL_AUTO_NORMAL) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable(GL_BLEND) glClearColor(0.0, 0.0, 0.0, 0.0) # reshapeFun(resolution[0],resolution[1]) ### load textures and initial chunk global textures global Lchunk global player global world global global_DL global vida_DL global energy_DL global trenecito global naves global current_fps current_fps = 0 naves = dict() global_DL = glGenLists(256) vida_DL = glGenLists(1) energy_DL = glGenLists(1) print "aqui", global_DL tmp2 = 0 for taa in range(global_DL, 256 + global_DL): glNewList(global_DL + tmp2, GL_COMPILE) basicas.draw_cube(0.16, tmp2) glEndList() tmp2 += 1 textures.append(loadImage("assets/stGrid1.png")) textures.append(loadImage("assets/player.png")) textures.append(loadImage("assets/bullet.png")) textures.append(loadImage("assets/stGriddeco.png")) textures.append(loadImage("assets/icons.png")) textures.append(loadImage("assets/tren_1.png")) textures.append(loadImage("assets/inicio.png")) textures.append(loadImage("assets/gameover.png")) textures.append(loadImage("assets/frases1.png")) textures.append(loadImage("assets/stGrid2.png")) player = player(global_DL) load_map() # thread sockets online = update_dates(player) online.start() enable_vsync() getDelta()
def initFun(): print "initFun" glEnable(GL_AUTO_NORMAL) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable(GL_BLEND) glClearColor(0.0,0.0,0.0,0.0) #reshapeFun(resolution[0],resolution[1]) ### load textures and initial chunk global textures global Lchunk global player global world global global_DL global vida_DL global energy_DL global trenecito global naves global current_fps current_fps = 0 naves = dict() global_DL = glGenLists(256) vida_DL = glGenLists(1) energy_DL = glGenLists(1) print "aqui", global_DL tmp2 = 0 for taa in range(global_DL,256 + global_DL): glNewList(global_DL+tmp2, GL_COMPILE) basicas.draw_cube(0.16, tmp2) glEndList() tmp2 += 1 textures.append(loadImage('assets/stGrid1.png')) textures.append(loadImage('assets/player.png')) textures.append(loadImage('assets/bullet.png')) textures.append(loadImage('assets/stGriddeco.png')) textures.append(loadImage('assets/icons.png')) textures.append(loadImage('assets/tren_1.png')) textures.append(loadImage('assets/inicio.png')) textures.append(loadImage('assets/gameover.png')) textures.append(loadImage('assets/frases1.png')) textures.append(loadImage('assets/stGrid2.png')) player = player(global_DL) load_map() #thread sockets online = update_dates(player) online.start() enable_vsync() getDelta()
def initFun(): print "initFun" glEnable(GL_AUTO_NORMAL) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable(GL_BLEND) glClearColor(0.0, 0.0, 0.0, 0.0) #reshapeFun(resolution[0],resolution[1]) ### load textures and initial chunk global textures global Lchunk global player global world global civiles global civiles_muertos global global_DL global civiles_muertos_DL global vida_DL global last_total_kills global total_kills_DL global total_kills global last_kill global trenecito global last_damage last_total_kills = -1 last_kill = [-1, -1] last_damage = 0.0 total_kills = 0 civiles_muertos_DL = glGenLists(1) vida_DL = glGenLists(1) total_kills_DL = glGenLists(1) global_DL = glGenLists(256) tmp2 = 0 for taa in range(12, 256 + 12): glNewList(global_DL + tmp2, GL_COMPILE) basicas.draw_cube(0.16, tmp2) glEndList() tmp2 += 1 civiles = [] civiles_muertos = [] clases.audio.stationMusic(0) textures.append(loadImage('assets/stGrid1.png')) textures.append(loadImage('assets/player.png')) textures.append(loadImage('assets/bullet.png')) textures.append(loadImage('assets/stGriddeco.png')) textures.append(loadImage('assets/icons.png')) textures.append(loadImage('assets/tren_1.png')) textures.append(loadImage('assets/inicio.png')) textures.append(loadImage('assets/gameover.png')) textures.append(loadImage('assets/frases1.png')) player = player(bullet, joints, borrar, global_DL) myListener = myContactListener(borrar, player) myDestructor = myDestructionListener() world = b2World(contactListener=myListener, destructorListener=myDestructor ) # default gravity is (0,-10) and doSleep is True world.gravity = (0, 0) player.set_world(world) trenecito = tren([115, 29], world, bullet) Lchunk.append(chunk(0, 0, world, global_DL)) enable_vsync() getDelta()
def initFun(): print "initFun" glEnable(GL_AUTO_NORMAL) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable(GL_BLEND) glClearColor(0.0,0.0,0.0,0.0) #reshapeFun(resolution[0],resolution[1]) ### load textures and initial chunk global textures global Lchunk global player global world global civiles global civiles_muertos global global_DL global civiles_muertos_DL global vida_DL global last_total_kills global total_kills_DL global total_kills global last_kill global trenecito global last_damage last_total_kills = -1 last_kill = [-1,-1] last_damage = 0.0 total_kills = 0 civiles_muertos_DL = glGenLists(1) vida_DL = glGenLists(1) total_kills_DL = glGenLists(1) global_DL = glGenLists(256) tmp2 = 0 for taa in range(12,256 + 12): glNewList(global_DL+tmp2, GL_COMPILE) basicas.draw_cube(0.16, tmp2) glEndList() tmp2 += 1 civiles = [] civiles_muertos = [] clases.audio.stationMusic(0) textures.append(loadImage('assets/stGrid1.png')) textures.append(loadImage('assets/player.png')) textures.append(loadImage('assets/bullet.png')) textures.append(loadImage('assets/stGriddeco.png')) textures.append(loadImage('assets/icons.png')) textures.append(loadImage('assets/tren_1.png')) textures.append(loadImage('assets/inicio.png')) textures.append(loadImage('assets/gameover.png')) textures.append(loadImage('assets/frases1.png')) player = player(bullet, joints, borrar, global_DL) myListener = myContactListener(borrar, player) myDestructor = myDestructionListener() world=b2World(contactListener=myListener, destructorListener=myDestructor) # default gravity is (0,-10) and doSleep is True world.gravity = (0, 0) player.set_world(world) trenecito = tren([115,29], world, bullet) Lchunk.append(chunk(0,0, world, global_DL)) enable_vsync() getDelta()