😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁
APOYA ESTE GAME...SOLO ES UNA SUGERENCIA....JAJAJAJAJJAJAJAJAJA¡¡¡¡¡¡😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁
Godot, scripts para Godot estudios y aprendizajes, Creacion de videojuegos. Creacion y publicacion de videojuegos en internet. Como hacer videojuegos. C# unity. Animaciones unity blender. Personajes videojuegos graficos dibujos. Diseño grafico. Comic. Animaciones gif. Dibujo de retratos. Realidad virtual. Cine y realidad virtual.
😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁
APOYA ESTE GAME...SOLO ES UNA SUGERENCIA....JAJAJAJAJJAJAJAJAJA¡¡¡¡¡¡😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁
Como hacer ítems de recuperar vidas con Unity, aquí pongo los scripts en el blog, es muy sencillo solo se cambia una linea que pone el signo – menos por otra linea que pondremos el signo +mas, el mismo script pero con otro nombre y el mismo texto que utilizamos en el mismo camvas,
cuando toquemos los ítems que son unos cubos con la cruz roja sumara vidas el player cuando le alcances las balas del enemigos restara vidas el player en este caso el tag de sumar se llama “cruz” y el tag de restar se llama “pomada”.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class restavidaamericanodeintrocuarta : MonoBehaviour {
// Create public variables for player speed, and for the Text UI game objects
public float speed;
public Text countText;
public Text winText;
// Create private references to the rigidbody component on the player, and the count of pick up objects picked up so far
private Rigidbody rb;
private int count;/// <summary>
// At the start of the game..
void Start ()
{
rb = GetComponent<Rigidbody>();
// Set the count to zero
//count = 0;////original
count = 10;
// Run the SetCountText function to update the UI (see below)
SetCountText ();
// Set the text property of our Win Text UI to an empty string, making the 'You Win' (game over message) blank
winText.text = "";
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag ("pomada")){
other.gameObject.SetActive (false);///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Add one to the score variable 'count'
//count = count + 1;//////original
count = count - 1;
SetCountText ();
}
}
// Create a standalone function that can update the 'countText' UI and check if the required amount to win has been achieved
void SetCountText()
{
// countText.text = "VIDAS: " + count.ToString ();///original
countText.text = "AMERICANO VIDAS: " + count.ToString ();
// Check if our 'count' is equal to or exceeded 12
//if (count >= 10) ////original
if (count <= 1)
//if (count >= 99)
{
// Set the text value of our 'winText'
winText.text = "TE HAN MATADO";
//Destroy (gameObject, 1.2f);
Application.LoadLevel (3);
}
}
}
---------------------------------------------------------------------
-------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SUMAVIDASAMERICANOINTROCUARTA : MonoBehaviour {
// Create public variables for player speed, and for the Text UI game objects
public float speed;
public Text countText;
public Text winText;
// Create private references to the rigidbody component on the player, and the count of pick up objects picked up so far
private Rigidbody rb;
private int count;/// <summary>
// At the start of the game..
void Start ()
{
rb = GetComponent<Rigidbody>();
// Set the count to zero
//count = 0;////original
count = 10;
//count = 0;
// Run the SetCountText function to update the UI (see below)
SetCountText ();
// Set the text property of our Win Text UI to an empty string, making the 'You Win' (game over message) blank
winText.text = "";
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag ("cruz")){
other.gameObject.SetActive (false);///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Add one to the score variable 'count'
//count = count + 1;//////original
count = count + 1;
SetCountText ();
}
}
// Create a standalone function that can update the 'countText' UI and check if the required amount to win has been achieved
void SetCountText()
{
// countText.text = "VIDAS: " + count.ToString ();///original
countText.text = "AMERICANO VIDAS: " + count.ToString ();
// Check if our 'count' is equal to or exceeded 12
//if (count >= 10) ////original
if (count <= 1)
//if (count >= 99)
{
// Set the text value of our 'winText'
winText.text = "TE HAN MATADO";
//Destroy (gameObject, 1.2f);
Application.LoadLevel (3);
}
}
}
😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄😄
👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👀👌👌👀👀👀👀👀👀👀👀
👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌
👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄👄
COMO HACER PERSECUCIONES INTELIGENCIA ARTIFICIAL DE ENEMIGOS
😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁😁
0,2,7 versión de warlike_feats, sigo trabajando en el videojuego, pongo la versión para quien quiera probarla e imágenes de las futuras mejorías que se verán muy pronto en el videojuego, como la idea de un enemigo especial mas poderoso de lo normal que tiene 1000 vidas y me persigne por el terreno de juego, también una mejora en el aspecto grafico para que se vea con claridad quien suma puntos en el videojuego y quien pierde vidas, e puesto una imagen en las puntuaciones para que el jugador sepa con claridad que es lo que esta pasando a lo largo de la jugada……...
/// <summary>
/// Launcher.
///
/// 3/2/2013
/// Steve Peters
/// Game Developers Guild - Miami, FL
///
/// Allows us to launch projectiles at a wall. It preinstantiates and stores the projectiles in a
/// stack to improve performance
/// </summary>
using UnityEngine;
using System.Collections;
public class Launcher : MonoBehaviour
{
public Rigidbody projectile;
public Rigidbody explosiveProjectile;
public float launchspeed = 50;
public bool useExplodingProjectiles = false;
private float _LaunchDelayTime = 0.0f;
public int stackSize = 60;
public Transform launchHole1;
public Transform launchHole2;
private Stack _Projectiles;
private Stack _ExplosiveProjectiles;
private Transform _myTransform;
// Use this for initialization
void Start ()
{
_myTransform = transform;
_Projectiles = new Stack();
if(useExplodingProjectiles)
{
_ExplosiveProjectiles = new Stack();
}
for(int i = 0; i < stackSize; i++)
{
Rigidbody tr = Instantiate (projectile, _myTransform.position, _myTransform.rotation) as Rigidbody;
PushProjectile(tr);
if(useExplodingProjectiles)
{
Rigidbody rr = Instantiate (explosiveProjectile, _myTransform.position, _myTransform.rotation) as Rigidbody;
PushExplosiveProjectile(rr);
}
}
}
// Update is called once per frame
void Update ()
{
if(_Projectiles.Count > 0)
{
if(Time.time > _LaunchDelayTime)
{
if (Input.GetButton ("Fire1")) ////ametralladora
// if (Input.GetButtonDown ("Fire1")) original tiro a tiro
{
Rigidbody tr = PopProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole1.position;
tr.transform.rotation = launchHole1.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
tr = PopProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole2.position;
tr.transform.rotation = launchHole2.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
_LaunchDelayTime = Time.time + 0.5f;
}
}
}
if(useExplodingProjectiles)
{
if(_ExplosiveProjectiles.Count > 0)
{
if(Time.time > _LaunchDelayTime)
{
if (Input.GetButtonDown ("Fire2"))
{
Rigidbody tr = PopExplosiveProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole1.position;
tr.transform.rotation = launchHole1.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
tr = PopExplosiveProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole2.position;
tr.transform.rotation = launchHole2.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
_LaunchDelayTime = Time.time + 0.5f;
}
}
}
}
}
public void PushProjectile(Rigidbody x)
{
x.gameObject.SetActive(false);
_Projectiles.Push(x);
}
public Rigidbody PopProjectile()
{
return (Rigidbody)_Projectiles.Pop();
}
public void PushExplosiveProjectile(Rigidbody x)
{
x.gameObject.SetActive(false);
_ExplosiveProjectiles.Push(x);
}
public Rigidbody PopExplosiveProjectile()
{
return (Rigidbody)_ExplosiveProjectiles.Pop();
}
}
DISPARO A DISPARO RAFAGAS MUY RAPIDO IMITA AMETRALLADORA---------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class launchermasvelocidad : MonoBehaviour {
public Rigidbody projectile;
public Rigidbody explosiveProjectile;
public float launchspeed = 50;
public bool useExplodingProjectiles = false;
private float _LaunchDelayTime = 0.0f;
public int stackSize = 60;
public Transform launchHole1;
public Transform launchHole2;
private Stack _Projectiles;
private Stack _ExplosiveProjectiles;
private Transform _myTransform;
// Use this for initialization
void Start ()
{
_myTransform = transform;
_Projectiles = new Stack();
if(useExplodingProjectiles)
{
_ExplosiveProjectiles = new Stack();
}
for(int i = 0; i < stackSize; i++)
{
Rigidbody tr = Instantiate (projectile, _myTransform.position, _myTransform.rotation) as Rigidbody;
PushProjectile(tr);
if(useExplodingProjectiles)
{
Rigidbody rr = Instantiate (explosiveProjectile, _myTransform.position, _myTransform.rotation) as Rigidbody;
PushExplosiveProjectile(rr);
}
}
}
// Update is called once per frame
void Update ()
{
if(_Projectiles.Count > 0)
{
if(Time.time > _LaunchDelayTime)
{
if (Input.GetButton ("Fire1")) ////ametralladora
// if (Input.GetButtonDown ("Fire1")) original tiro a tiro
{
Rigidbody tr = PopProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole1.position;
tr.transform.rotation = launchHole1.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
tr = PopProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole2.position;
tr.transform.rotation = launchHole2.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
_LaunchDelayTime = Time.time + 0.1f;
}
}
}
if(useExplodingProjectiles)
{
if(_ExplosiveProjectiles.Count > 0)
{
if(Time.time > _LaunchDelayTime)
{
if (Input.GetButtonDown ("Fire2"))
{
Rigidbody tr = PopExplosiveProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole1.position;
tr.transform.rotation = launchHole1.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
tr = PopExplosiveProjectile();
tr.gameObject.SetActive(true);
tr.transform.position = launchHole2.position;
tr.transform.rotation = launchHole2.rotation;
tr.velocity = transform.TransformDirection (Vector3.forward * launchspeed);
_LaunchDelayTime = Time.time + 0.5f;
}
}
}
}
}
public void PushProjectile(Rigidbody x)
{
x.gameObject.SetActive(false);
_Projectiles.Push(x);
}
public Rigidbody PopProjectile()
{
return (Rigidbody)_Projectiles.Pop();
}
public void PushExplosiveProjectile(Rigidbody x)
{
x.gameObject.SetActive(false);
_ExplosiveProjectiles.Push(x);
}
public Rigidbody PopExplosiveProjectile()
{
return (Rigidbody)_ExplosiveProjectiles.Pop();
}
}
0,2,6 versión de warlike_feats, pongo aquí esta ultima versión para jugarla y descargarla, si la queréis probar, y una captura de video, a apartir de aquí are sobre papel los siguientes niveles, versiones del videojuego para concretar mejor lo que quiero poner en las pantallas, de momento voy añadiendo atrezo para intentar darle el máximo ambiente de guerra de la época, y pondré un script para que al llegar a cierto numero de puntos se abra la 3 parte del videojuego, esto me va ir mas lento porque quiero basarme primero sobre lo escrito en papel y con dibujos de los escenarios y anotaciones , que también pondré en el blog durante estos próximos días…...