Exemple #1
0
        public override void OnCollision(UTGameObject other)
        {
            Coleccionable col  = other as Coleccionable;
            Agujero       obs  = other as Agujero;
            Pelota        ball = other as Pelota;

            if (col != null)
            {
                col.Destroy();
                powerUpTotales++;
                Game1.INSTANCE.ventanaJuego.score += 1000;

                if (buffLevel < 5)
                {
                    buffLevel++;
                }
                //Console.WriteLine(powerUpTotales);
            }
            if (obs != null)
            {
                if (!invulnerable)
                {
                    invulnerable     = true;
                    objetoFisico.pos = Respawn();
                }
            }
            if (ball != null)
            {
                if (!invulnerable)
                {
                    vidas--;
                    ball.hp--;
                }
            }
        }
Exemple #2
0
        public override void OnCollision(UTGameObject other)
        {
            Coleccionable col  = other as Coleccionable;
            Agujero       obs  = other as Agujero;
            Pelota        ball = other as Pelota;

            if (col != null)
            {
                col.Destroy();
                puntaje++;

                //Console.WriteLine(puntaje);
            }
            if (obs != null)
            {
                if (!invulnerable)
                {
                    invulnerable     = true;
                    objetoFisico.pos = Respawn();
                }
            }
            if (ball != null)
            {
                ball.hitByCar = true;
            }
        }
Exemple #3
0
        public override void OnCollision(UTGameObject other)
        {
            Coleccionable col  = other as Coleccionable;
            Agujero       obs  = other as Agujero;
            Pelota        ball = other as Pelota;

            if (ball != null)
            {
                if (ball.hitByCar == true)
                {
                    hitByCar = true;
                }
            }
        }
Exemple #4
0
        public override void OnCollision(UTGameObject other)
        {
            Coleccionable col  = other as Coleccionable;
            Pelota        ball = other as Pelota;

            if (col != null)
            {
                col.Destroy();
            }
            if (ball != null)
            {
                ball.Destroy();

                if (ball.hitByCar)
                {
                    Game1.INSTANCE.ventanaJuego.auto.puntaje += 10;
                    Game1.INSTANCE.ventanaJuego.pelotasEncestadas++;
                    ball.hitByCar = false;
                }
            }
        }