예제 #1
0
        public Prota(Model text,Model[] disp)
        {
            g_nave = new modelo(text);
            t_disp=disp;

            box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, 10f));
        }
예제 #2
0
 public item(int tip)
 {
     g_nave = new modelo(Game1.gema[tip]);
     tipo = tip;
     pos.X = 550;
     box = new caja(new Vector3(pos.X - 15f, pos.Y - 16f, -15f), new Vector3(pos.X + 15f, pos.Y + 4f, 15f));
 }
예제 #3
0
 public NaveBsl(Model text, Model[] t_disp2)
 {
     av = 440f;
     box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, +10f));
     g_nave = new modelo(text);
     t_disp = t_disp2;
     d_act = 1;
 }
예제 #4
0
 public misil(Model text, Model[] t_disp2)
 {
     g_nave = new modelo(text);
     pos.X = 240;
     pos.Y = 0;
     box = new caja(new Vector3(pos.X - 16f, pos.Y - 8f, -7f), new Vector3(pos.X + 92f, pos.Y + 5f, 6f));
     t_disp = t_disp2;
     angle = getf_angle(Game1.naveP);
     g_nave.rotar(0, 0, angle);
     vel = 9+Game1.nivel;
 }
예제 #5
0
 public NaveSC(Model text, Model[] t_disp2)
 {
     g_nave = new modelo(text);
     av = 440;
     box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, +10f));
     t_disp = t_disp2;
     d_act = 2;
        /* for (int z = 0; z < nave.cant; z++)
     {
         anm[z] = new anim(Game1.estr, -1, pos);
         vc[z] = new Vector2(-100);
     }*/
 }
예제 #6
0
 public bool intersect(caja otra)
 {
     return (Rect().Intersects(otra.Rect()));
 }
예제 #7
0
        private void init(int direccion, bool tipo, Model graphA, disps str, float veloc, Vector2 posicion)
        {
            disps aux = str;
            dir = direccion;
            tip = tipo;
            graph = new modelo(graphA);
            Mstruct = new disps();
            Mstruct.elem = this;
            while (aux.sig != null)
                aux = aux.sig;
            aux.sig = Mstruct;
            Mstruct.ant = aux;

            vel = veloc;
            pos = posicion;
            box = new caja(new Vector3(pos.X - 10f, pos.Y - 10f, -10f), new Vector3(pos.X + 10f, pos.Y + 10f, +10f));
        }