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

El fútbol femenino español lo tiene todo menos una gran audiencia: ¿qué está fallando?

  • Por admin
  • agosto 19, 2026
  • 5 views
El fútbol femenino español lo tiene todo menos una gran audiencia: ¿qué está fallando?

La paradoja del fútbol español: el Barcelona juega con más españoles que el Real Madrid

  • Por admin
  • agosto 18, 2026
  • 9 views
La paradoja del fútbol español: el Barcelona juega con más españoles que el Real Madrid

Rodri por 60 millones y con 30 años: ¿fichajazo del Barcelona o demasiado riesgo?

  • Por admin
  • agosto 18, 2026
  • 7 views
Rodri por 60 millones y con 30 años: ¿fichajazo del Barcelona o demasiado riesgo?

Ferran Torres ficha por el PSG: ¿se arrepentirá el Barcelona de su salida?

  • Por admin
  • agosto 15, 2026
  • 23 views
Ferran Torres ficha por el PSG: ¿se arrepentirá el Barcelona de su salida?

LaLiga 2026-27: Real Madrid, Barcelona y Atlético luchan por el título

  • Por admin
  • agosto 15, 2026
  • 21 views
LaLiga 2026-27: Real Madrid, Barcelona y Atlético luchan por el título

Ferran al PSG: una cosa son los colores y otra muy distinta el dinero

  • Por admin
  • agosto 15, 2026
  • 28 views
Ferran al PSG: una cosa son los colores y otra muy distinta el dinero