ESTUDIO DE SCRIPT C# Y ANALISIS DE UN JUEGO EN GAMEJOLT


Corazon de Aquiles
Heart of Achilles

Juego corto y sencillo de disparos, pero completo y bastante bien desarrollado,  con pantalla de ganar y pantalla de perder, con sonido final de ganador y sonidos ambiente de perdedor.
Movimiento del player w,a,s,d y raton disparos.
https://videojuegosenlineaasaco4.blogspot.com/

Short and simple game of shots, but complete and quite well developed, with screen to win and screen to lose, with final sound of winner and sounds environment of loser.
Movement of player w, a, s, d and mouse shots./




https://gamejolt.com/games/Heart-of-Achilles/426984


JUEGO PARA JUGAR DIRECTAMENTE DESDE WEB Y TAMBIEN SE PUEDE DESCARGAR

 TUTORIAL DE COMO ESTA ECHO EL JUEGO Y DESCRIPCION CORTA.....AMPLIARE EL TEMA.....SI TIENE INTERES.

----------------------------------------------------------------------------------------------------
SCRIPT DE RELOJ TIMER QUE SALE ENCIMA PANTALLA DEL JUEGO
------------------------------------------------------------------------------------------------------



using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class scriptTimer : MonoBehaviour {

    public Text contador;
    public Text fin;
    private float tiempo = 150f;
    // Use this for initialization
    void Start () {
        contador.text = " " + tiempo;
        fin.enabled = false;



        
    }
    
    // Update is called once per frame
    void Update ()
    {
        tiempo -= Time.deltaTime;
        contador.text = " " + tiempo.ToString ("f0");
        if (tiempo <= 0) {
            contador.text = "0";
            fin.enabled = true;
            
        }
    }
}






----------------------------------------------------------------------------------------------------
SCRIPT DE ELIMINAR GRAFICOS POR TIEMPO 150 SEGUNDOS
------------------------------------------------------------------------------------------------------




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


public class BORRAPLAYERPORTIEMPO : MonoBehaviour {


        // Use this for initialization
        void Start ()
        {

    //    }





        //void OnCollisionEnter ()
        //{

            Destroy (gameObject, 150.00f);
    



        }
    }



----------------------------------------------------------------------------------------------------
SCRIPT   ActivateTrigger   IMPRESCINDIBLE CAMBIA GRAFICOS POR COLISIONES
----------------------------------------------------------------------------------------------------



using System;
using UnityEngine;
using Object = UnityEngine.Object;

namespace UnityStandardAssets.Utility
{
    public class ActivateTrigger : MonoBehaviour
    {
        // A multi-purpose script which causes an action to occur when
        // a trigger collider is entered.
        public enum Mode
        {
            Trigger = 0,    // Just broadcast the action on to the target
            Replace = 1,    // replace target with source
            Activate = 2,   // Activate the target GameObject
            Enable = 3,     // Enable a component
            Animate = 4,    // Start animation on target
            Deactivate = 5  // Decativate target GameObject
        }

        public Mode action = Mode.Activate;         // The action to accomplish
        public Object target;                       // The game object to affect. If none, the trigger work on this game object
        public GameObject source;
        public int triggerCount = 1;
        public bool repeatTrigger = false;


        private void DoActivateTrigger()
        {
            triggerCount--;

            if (triggerCount == 0 || repeatTrigger)
            {
                Object currentTarget = target ?? gameObject;
                Behaviour targetBehaviour = currentTarget as Behaviour;
                GameObject targetGameObject = currentTarget as GameObject;
                if (targetBehaviour != null)
                {
                    targetGameObject = targetBehaviour.gameObject;
                }

                switch (action)
                {
                    case Mode.Trigger:
                        if (targetGameObject != null)
                        {
                            targetGameObject.BroadcastMessage("DoActivateTrigger");
                        }
                        break;
                    case Mode.Replace:
                        if (source != null)
                        {
                            if (targetGameObject != null)
                            {
                                Instantiate(source, targetGameObject.transform.position,
                                            targetGameObject.transform.rotation);
                                DestroyObject(targetGameObject);
                            }
                        }
                        break;
                    case Mode.Activate:
                        if (targetGameObject != null)
                        {
                            targetGameObject.SetActive(true);
                        }
                        break;
                    case Mode.Enable:
                        if (targetBehaviour != null)
                        {
                            targetBehaviour.enabled = true;
                        }
                        break;
                    case Mode.Animate:
                        if (targetGameObject != null)
                        {
                            targetGameObject.GetComponent<Animation>().Play();
                        }
                        break;
                    case Mode.Deactivate:
                        if (targetGameObject != null)
                        {
                            targetGameObject.SetActive(false);
                        }
                        break;
                }
            }
        }


        private void OnTriggerEnter(Collider other)
        {
            DoActivateTrigger();
        }
    }
}










----------------------------------------------------------------------------------------------------
SCRIPT   ACTIVA SONIDO POR COLISIONES
----------------------------------------------------------------------------------------------------











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

public class sonidodianaroboto : MonoBehaviour {


    public AudioSource tickSource;




    //public float Destroy = 0.2f;
    // Use this for initialization
    void Start () {




        tickSource = GetComponent<AudioSource> ();





    }

    void Update () {
    }

    //void OnCollisionEnter (Collision collision){
    //    if (collision.gameObject.tag == "PUYO modelo"){


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



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




            tickSource.Play ();



        

        }}

}









critica del juego.........................aqui arriba.

No hay comentarios:

Publicar un comentario