jueves, 4 de mayo de 2023

script en C#, sirve para abrir y cerrar puertas, pone los gameobjects necesarios uno animado;

 script en C#,para Unity; sirve para abrir y cerrar puertas, pone los gameobjects necesarios uno animado; el otro quieto, imitando las puertas , este es el primero que lo escrito yo combinando varias lineas....apartir de aqui creo podre hacer scripts nuevos originales echos por mi, 

Aun nose programar, pero pienso que es como aprender un idioma nuevo, con signos dibujos de letras nuevos....

primero por poner un ejemplo del concepto abstrapto de lo que hay que retener en la mente para programar.......


es como aprender las bocales y sus dibujos de letra...por ejemplo la  -a-  la  -e- la  -i-  la  -o - la  -u-

hay que aprender una base. luego las consonantes, osea el abecedario sin las bocales...abcdefghijkqelxiyz....


el siguiente paso es combinar ambas para hacer silabas...la b con la a ba...la b con la e be la b con la i bi.....

combinar estas entre si y hacer palabras por ejemplo la m con la a ma y otra bez  la m con la a ma  osea la palabra mama, y siguiendo esta forma de imaginar la  programacion, seguir haciendo combinacion para nuebas palabras y hacer frases enteras y con esas frases relatos, e ir escalando hacia programas mas complejos........


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

public class COMBINACIONMULTIPLE : MonoBehaviour
{
 


    public GameObject quieta;
    public GameObject abre;
    public GameObject puerta;

    private void OnTriggerEnter(Collider other)
    {






        if (other.tag == "Player")
        {

          //  if (other.tag == "nazi")
           // {

              //  if (other.tag == "caca")
               // {

                    quieta.SetActive(true);
                    abre.SetActive(true);
            puerta.SetActive(false);
        }
            }

     //   }
   // }

    private void OnTriggerExit(Collider other)
    {




        if (other.tag == "Player")
        {


           // if (other.tag == "nazi")
           // {


              //  if (other.tag == "caca")
               // {



               quieta.SetActive(false);
abre.SetActive(false);
            puerta.SetActive(true);


        }
            }

        }

   // }

//}

-----------------------------------------------

---------------------------------------------- el script de arriba lo boy a juntar con el de abajo intentare hacer uno nuevo sumando partes de estos dos------------------------------------------------------------------------------------------------------------------------------------------------

 

 

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

public class controladordevaquero : MonoBehaviour
{
 

    public Animator Anim;
    public float WalkSpeed;

    void Update()
    {

        if (Input.GetKey(KeyCode.E))
        {
            Anim.SetBool("CORRER", true);
            transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
        }
        else
        {
            Anim.SetBool("CORRER", false);

            if (Input.GetKey(KeyCode.W))
            {
                Anim.SetBool("ANDA", true);
                transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
            }
            else
            {
                Anim.SetBool("ANDA", false);

                if (Input.GetKey(KeyCode.S))
                {
                    Anim.SetBool("ATRAS", true);
                    transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                }
                else
                {
                    Anim.SetBool("ATRAS", false);

                    if (Input.GetKey(KeyCode.A))
                    {

                        Anim.SetBool("CORRER", true);
                        transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                    }
                    else
                    {
                        Anim.SetBool("CORRER", false);






                        if (Input.GetKey(KeyCode.P))
                        {/////ORIGINAL



                            Anim.SetBool("BOMBA", true);
                            transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                        }
                        else
                        {
                            Anim.SetBool("BOMBA", false);










                            if (Input.GetKey(KeyCode.O))
                            {

                                Anim.SetBool("BOMBA", true);
                                transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                            }
                            else
                            {
                                Anim.SetBool("BOMBA", false);

                                if (Input.GetKey(KeyCode.D))
                                {

                                    Anim.SetBool("CORRER", true);
                                    transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                }
                                else
                                {
                                    Anim.SetBool("CORRER", false);
























                                        if (Input.GetButton ("Fire3")) {

                                        Anim.SetBool ("DISPARANDO", true);
                                    transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                    } else {
                                        Anim.SetBool ("DISPARANDO", false);

















                                    if (Input.GetKey(KeyCode.P))
                                   
                                    {

                                        Anim.SetBool("LANZAR", true);
                                        transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                    }
                                    else
                                    {
                                        Anim.SetBool("LANZAR", false);




                                       
                                        //if (Input.GetButton("Fire1"))/////original que ba
                                            //if (Input.GetButtonUp("Fire1"))//////funciona a otro ritmo
                                            if (Input.GetButtonDown("Fire1"))
                                            {/////ORIGINAL



                                            Anim.SetBool("BOMBA", true);
                                            transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                        }
                                        else
                                        {
                                            Anim.SetBool("BOMBA", false);
























                                            //if (Input.GetButton ("Fire1"))////// AMETRALLADORA AMETRAYADORA

                                            //if (Input.GetButtonUp("Fire1"))/////TIRO A TIRO
                                            //if (Input.GetButtonDown("Fire1"))/////TIRO A TIRO
                                            if (Input.GetKey(KeyCode.Mouse1))
                                        {///////////ORIGINAL 8-7-22
                                         //if (Input.GetKey (KeyCode.Mouse2)){///////////ORIGINAL 8-7-22
                                         //if (Input.GetKey (KeyCode.M)) {/////////////////////////loroooooooooooooooooooooooo
                                            Anim.SetBool("LANZAR", true);
                                            transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                        }
                                        else
                                        {
                                            Anim.SetBool("LANZAR", false);






                                            if (Input.GetKey(KeyCode.Space))
                                            {
                                                //if (Input.GetButtonDown("Fire1"))/////TIRO A TIRO
                                                Anim.SetBool("LANZAR", true);
                                                transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                            }
                                            else
                                            {
                                                Anim.SetBool("LANZAR", false);









                                                //if ((Input.GetKey(KeyCode.L)) & (Input.GetKey(KeyCode.Space)))
                                                //    if ((Input.GetKey(KeyCode.S)) & (Input.GetKey(KeyCode.Space)))

                                                if (Input.GetKey(KeyCode.Space))

                                                {
                                                    //if (Input.GetButtonDown("Fire1"))/////TIRO A TIRO
                                                    Anim.SetBool("SEÑALA", true);
                                                    transform.Translate(Vector3.forward * WalkSpeed * Time.deltaTime);
                                                }
                                                else
                                                {
                                                    Anim.SetBool("SEÑALA", false);

















                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }


        }
    }

}
}



}




martes, 25 de abril de 2023

Prototype 7 from World War II Y Prototype 6 from World War II;

 
























jueves, 20 de abril de 2023

ejemplo de sript C# unity de sonido por colision y tag;

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

public class SUENAPORTACELBEBEALPASAR : MonoBehaviour
{



    public AudioSource tickSource;


    void Start()
    {

        tickSource = GetComponent<AudioSource>();

    }

    void Update()
    {
    }

    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("caca"))
        {


            tickSource.Play();

            //Destroy (gameObject, 0.2f);


        }
    }

}
 


miércoles, 19 de abril de 2023

script en c# de unity para hacer disparos tiro a tiro o en rafagas con el raton o con el teclado;

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

public class DISPARAESCUPITAJOSBOTONDERECHORATON : MonoBehaviour
{
   


    [SerializeField] private AudioClip sndNewDamage;
    [SerializeField] private AudioClip sndCrashWarning;
    [SerializeField] private AudioClip sndHasDamageWarning;
    [SerializeField] private AudioClip sndFueldLow;
    public Rigidbody projectile;
    public float speed = 1;//originallllllllllllllllllllllllllllllllllllllllllllll

    //public float speed = 0.1f;
    // Update is called once per frame
    void Update()
    {
        //if (Input.GetKey (KeyCode.Mouse1)){///ORIGINAL 8-7-22
        //if (Input.GetButtonDown("Fire3")){///TIRO A TIRO


       // if (Input.GetButtonDown("Fire2"))
      
       // {///TIRO A TIRO


          //  if (Input.GetButton("Fire2"))
           // {//AMETRALLADORA




           // if (Input.GetButton("Fire2"))
          //  {//AMETRALLADORA






                //if (Input.GetButtonDown("Fire2")){///TIRO A TIRO
                //if (Input.GetButton ("Fire1"))////// AMETRALLADORA AMETRAYADORA
                //if (Input.GetKey (KeyCode.M)){
                //if (Input.GetButtonUp("Fire1"))/////TIRO A TIRO

                //    if (Input.GetMouseButtonDown(3))
                //if (Input.GetKey (KeyCode.Mouse1)){







                    //if (Input.GetKey (KeyCode.Space)) {// escupe rafagas

                   if (Input.GetKeyDown("space"))
                                                   {// escupe de 1 en 1










                //if (Input.GetKey (KeyCode.Mouse1)){///ORIGINAL 8-7-22
                //    if ((Input.GetKey (KeyCode.I)) && (Input.GetKey (KeyCode.O))) {////////funciona al apretar las 2 teclas a la vez  I O ////
                //    if (Input.GetKey (KeyCode.O)) {

                //{
                Rigidbody p = Instantiate(projectile, transform.position, transform.rotation);
            p.velocity = transform.forward * speed;


        }
    }
}




lunes, 17 de abril de 2023

Prototype 5 from World War II by TOZUDO;

Desarrollando videojuego indie, con un estilo surrealista, y gore, inspirado en la historia de las experimentaciones nazis en temas sobre la salud humana, tema macabro, y disparatado........intento sorprender, impresionar o reir.....aunque todos savemos que los echos reales que me dieron pie para desarrollar este juego son horripilantes, no se puede viajar en el tiempo para desacer esas varbaridades, por desgracia el ser humano es capaz de cualquier cosa, tanto a nivel de bondad, como a nivel de maldad. 

Developing an indie video game, with a surreal and gore style, inspired by the history of Nazi experimentation on human health issues, a macabre theme, and crazy........I try to surprise, impress or laugh.... Although we all know that the real events that led me to develop this game are horrifying, you cannot travel back in time to undo these varbarities, unfortunately human beings are capable of anything, both at the level of kindness and at evil level.


viernes, 7 de abril de 2023

jueves, 6 de abril de 2023