00001 #ifndef VENTANA_H
00002 #define VENTANA_H
00003
00004 #include <Gosu/Gosu.hpp>
00005
00006 #include "Aranya.h"
00007 #include "Enemigo.h"
00008 #include "Obstaculo.h"
00009 #include <vector>
00010 #include <iostream>
00011
00012 using namespace std;
00013
00021
00022 class Ventana: public Gosu::Window{
00023 public:
00026 Ventana();
00028 ~Ventana();
00031 void update();
00034 void draw();
00037 void buttonDown(Gosu::Button B);
00040 bool needsCursor()const;
00042 void EleccionMenu(Gosu::Button B);
00045 int width();
00048 int height();
00050 void mover_enemigo();
00053 vector<Obstaculo*>::iterator HayObstaculoDer();
00056 vector<Obstaculo*>::iterator HayObstaculoIzq();
00059 vector<Obstaculo*>::iterator HayObstaculoArriba();
00062 vector<Obstaculo*>::iterator HayObstaculoAbajo();
00063
00066 bool HayEnemigoDer();
00069 bool HayEnemigoIzq();
00072 bool HayEnemigoArriba();
00075 bool HayEnemigoAbajo();
00076
00077 private:
00078 Gosu::Image *fondo_, *aranya_, *nivel_, *bjugar_,*bsalir1_;
00079 vector<Gosu::Image*> movder_,movizq_,mova_,enemy_der_,enemy_izq_;
00080 pair<vector<Gosu::Image*>,int> control_der_,control_izq_;
00081 int modo_;
00082 vector<Enemigo*> Enemigos_;
00083 vector<Obstaculo*> Obstaculos_;
00084 Aranya minyimi;
00086 int width_,height_;
00088 int direccion_;
00089 pair <int,int> md_,mi_,ma_;
00090 bool saltando_;
00091 Gosu::Song *music_;
00092 Gosu::Sample *efecto_;
00093 };
00094
00095 #endif
00096