viernes, 23 de mayo de 2025

Enlace FlappyBird

https://mega.nz/folder/4fJ0VYLJ#h869LwEpSYmRBNxUBha8Cg


using UnityEngine;

public class FlappyBird : MonoBehaviour
{
    // Start is called once before the first execution of Update after the MonoBehaviour is created

    public float velocity =2;
    public Rigidbody2D rd2D;

    public float rotationSpeed = 25;
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
if (Input.GetMouseButtonDown(0))
    {

        rd2D.linearVelocity = Vector2.up * velocity;
    }

transform.rotation = Quaternion.Euler(0,0,rd2D.linearVelocity.y * rotationSpeed * Time.deltaTime * 100);
    }
}

Share:

Vistas a la página totales

Buscar este blog

Con tecnología de Blogger.

Translate

Texto alrededor de Imagen

PASO A PASO: Colocar texto detrás de una imagen en GIMP Abrir GIMP. Importar la imagen principal Ir a Archivo → Abrir y elegir una...

Formulario de contacto

Nombre

Correo electrónico *

Mensaje *

Formulario de contacto

Nombre

Correo electrónico *

Mensaje *