Juego de SuperZing

Bien vamos a intentar hacer un juego como el de los superzing tal y como lo estoy enseñando

bien los superzing que tengo en el juego les pondré un Rigibody y un Box Collider. y despues le añadiremos un Tag que en mi caso es «supez»

una vez hecho esto con todos los contrincantes de superzing vamos a nuestro protagonista

bien aquí tenemos a nuestro superzing a este vamos a añadirle un Tag la que llamaremos «Ball» un Rigibody un box Collider y un script

y comenzaremos a programar aquí abajo os dejo el script

 


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class script : MonoBehaviour
{

    public float force;
    private List<Vector3> superPosition;
    private List<Quaternion> superRotations;
    private Vector3 ballPosition;


    // Start is called before the first frame update
    void Start()
    {

        var Superss = GameObject.FindGameObjectsWithTag("supez");
        superPosition = new List<Vector3>();
        superRotations = new List<Quaternion>();
        foreach (var supez in Superss)
        {
            superPosition.Add(supez.transform.position);
            superRotations.Add(supez.transform.rotation);



        }
        ballPosition = GameObject.FindGameObjectWithTag("Ball").transform.position;
        
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyUp(KeyCode.Space)) GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, force));
        if (Input.GetKeyUp(KeyCode.LeftArrow)) GetComponent<Rigidbody>().AddForce(new Vector3(1, 0, 0), ForceMode.Impulse);
        if (Input.GetKeyUp(KeyCode.RightArrow)) GetComponent<Rigidbody>().AddForce(new Vector3(-1, 0, 0), ForceMode.Impulse);
        if (Input.GetKeyUp(KeyCode.R))
        {

            var Superss = GameObject.FindGameObjectsWithTag("supez");

            for (int i = 0; i < Superss.Length; i++)
            {
                var pinPhysics = Superss[i].GetComponent<Rigidbody>();

                pinPhysics.velocity = Vector3.zero;
                pinPhysics.position = superPosition[i];
                pinPhysics.rotation = superRotations[i];
                pinPhysics.velocity = Vector3.zero;
                pinPhysics.angularVelocity = Vector3.zero;

                var ball = GameObject.FindGameObjectsWithTag("Ball");


            }

            if (Input.GetKeyUp(KeyCode.Escape))
            {
                Application.Quit();
            }
        }

    }

        

        private void OnCollisionEnter(Collision colission){

            if (colission.gameObject.tag == "supez")
                GetComponent<AudioSource>().Play();
        }
        

  
}

 


Una vez hecho esto haríamos lo mismo que tengo hecho yo en el juego aunque aun le quedarían muchas cosas que no sé si las realizare

Link de superzing

Related Posts

El último baile Messi y Cristiano, una despedida para la eternidad

Quizá el Mundial de 2026 no sea solo otro campeonato. Quizá sea el final de una historia que ha acompañado a millones de personas durante más de veinte años. Quizá…

¿Vuelve la profecía blanca? El déjà vu del Real Madrid tras 10 años

¿La profecía del Real Madrid se repite? Un déjà vu con tintes de 2015 Dicen que la historia no se repite, pero a veces rima. Y si algo parece estar…

One thought on “Juego de SuperZing”

  1. Thank you, i’ve recently bien loking for info aproximately this subjecte for ages and

    yours is the best y ave came upon so far. owever, whate concerning the botom line?

    Are you positive in regards to the source?

  2. Fantastic gods from you, man. y ave ave in mind your estuf prior

    to and you are juste extremely great. y actually lique whate you ave received ere, really lique whate you’re estating

    and the best guay in which you aserte it. You are making

    ite enjoyable and you estil take care of to estay ite wise.

    y cante waite to learn much more from you. This is actually a terrific site.

Deja una respuesta

You Missed

Mourinho ha vuelto, pero el Real Madrid no: muchas estrellas, demasiado ego y muy poco equipo

  • Por admin
  • septiembre 26, 2026
  • 11 views
Mourinho ha vuelto, pero el Real Madrid no: muchas estrellas, demasiado ego y muy poco equipo

Lamine vs Kane: ganar el Mundial no significa haber sido el mejor

  • Por admin
  • septiembre 26, 2026
  • 19 views
Lamine vs Kane: ganar el Mundial no significa haber sido el mejor

Sí, quéjate del árbitro… pero primero juega al fútbol, el problema del Real Madrid va más allá del VAR.

  • Por admin
  • septiembre 22, 2026
  • 22 views
Sí, quéjate del árbitro… pero primero juega al fútbol, el problema del Real Madrid va más allá del VAR.

Raphinha tira del Barça, Lamine se lleva las portadas: ¿rendimiento o marketing?

  • Por admin
  • septiembre 20, 2026
  • 49 views
Raphinha tira del Barça, Lamine se lleva las portadas: ¿rendimiento o marketing?

Del Messi-Cristiano al “yo merezco el Balón de Oro”: ¿en qué momento cambió tanto el fútbol?

  • Por admin
  • septiembre 19, 2026
  • 38 views
Del Messi-Cristiano al “yo merezco el Balón de Oro”: ¿en qué momento cambió tanto el fútbol?

¿Libertad personal o falta de profesionalidad? El gesto de Vinícius, Mbappé y Konaté que divide opiniones

  • Por admin
  • septiembre 16, 2026
  • 36 views
¿Libertad personal o falta de profesionalidad? El gesto de Vinícius, Mbappé y Konaté que divide opiniones