Page 2 of 4
WEEKLY MEETING #4.1
Posted: Thu Feb 21, 2019 10:50 pm
by David Ballesteros V
Sólo responderemos el
¿Qué vamos a hacer? dado a que lo que hemos hecho, ha sido lo mismo del anterior post dado a las mismas dificultades, esperamos este fin de semana desatrazarnos de todas las tareas pendientes para retomar la próxima semana de buena manera.

WEEKLY MEETING #5
Posted: Tue Feb 26, 2019 10:36 pm
by David Ballesteros V
¿QUÉ HEMOS HECHO?
Se ha estado trabajando en programación ya que en cuanto a gráficas no se ha podido invertir el tiempo necesario, así que ya tenemos el código de las monedas, vida de la base y del menú de inicio:
-CÓDIGO MONEDAS:
Code: Select all
public class Monedas : MonoBehaviour {
public GameObject centenas, decenas, unidades;
private Animator ce, de, un;
private string[] estado = { "Estado_0", "Estado_1", "Estado_2", "Estado_3", "Estado_4", "Estado_5", "Estado_6", "Estado_7", "Estado_8", "Estado_9" };
private float tiempoLimite = 60f;
private float tiempo = 0f;
private int dinero = 0;
public int Dinero
{
get
{
return dinero;
}
set
{
dinero = value;
}
}
// Inicializacion
void Start()
{
ce = centenas.GetComponent<Animator>();
de = decenas.GetComponent<Animator>();
un = unidades.GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
tiempo++;
if (tiempo > tiempoLimite)
{
dinero++;
ActualizadorContador(dinero);
tiempo = 0;
}
}
public void ActualizadorContador(int numero)
{
int unidades = numero % 10;
int decenas = numero % 100 - unidades;
int centenas = numero % 1000 - decenas;
Debug.Log("numero " + numero + " centenas " + centenas / 100 + " decenas " + decenas / 10 + " unidades " + unidades);
decenas = decenas / 10;
centenas = centenas / 100;
if (numero > 9)
{
de.Play(estado[decenas]);
}
else
{
de.Play(estado[0]);
}
if (numero > 99)
{
ce.Play(estado[centenas]);
}
else
{
ce.Play(estado[0]);
}
un.Play(estado[unidades]);
}
}
-CÓDIGO VIDA DE LA BASE:
Code: Select all
public class Muerte : MonoBehaviour {
private const string ENEMIGO = "Enemigo";
private int vidas = 100;
public int Vidas
{
get
{
return vidas;
}
set
{
vidas = value;
}
}
void OnTriggerEnter2D(Collider2D otro)
{
if (otro.gameObject.tag.Equals(ENEMIGO))
{
--vidas;
Destroy(otro.gameObject);
}
}
}
¿QUÉ VAMOS A HACER?
Recuperar el ritmo en cuanto a visuales para poder implementar todos los códigos.
¿QUÉ DIFICULTADES HEMOS TENIDO?
Retraso en visuales, ya que el encargado se ha visto saturado por las demás materias.

WEEKLY MEETING #5.1
Posted: Thu Feb 28, 2019 11:35 pm
by David Ballesteros V
-¿QUÉ HEMOS HECHO?
-¿QUÉ VAMOS A HACER?
-¿QUÉ DIFICULTADES HEMOS TENIDO?
Re: Calumnia - RavenEye
Posted: Tue Mar 12, 2019 12:06 pm
by xacarana
La publicación del 28 esta incompleta, no publican desde febrero.
WEEKLY MEETING #6 / SPRINT #4
Posted: Tue Mar 12, 2019 11:16 pm
by David Ballesteros V
ACTIVIDAD #4
-Inició: Feb 17
-Finalizó: Marzo 11
-Posicionamiento de Torres y Cambio de Escena -Kateryn Pérez
-Dif: 2
-Código de Monedas -Miguel Vargas
-Dif: 3
-Código Vida de Base -Miguel Vargas
-Dif: 5
-Código de Umbral -Miguel Vargas
-Dif: 2
-Botones de Inicio -David Ballesteros
-Dif: 5
¿QUÉ HEMOS HECHO?
Dado a que ya tenemos gran parte de la mecánica básica del juego hemos decidido empezar a implementar elementos como el menú de inicio con su respectivo cambio de escena.
Botón de inicio sin presión/con presión:

Código cambio de escena:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LevelManager : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void cargaScene(string nombreScene)
{
SceneManager.LoadScene(nombreScene); //Abre la escena del parametro
}
}
Código Posicionamiento de Torres (habiamos olvidarlo montarlo la vez pasada):
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LogicaTorres : MonoBehaviour {
// Use this for initialization
public GameObject torre;
void OnMouseDown()
{
//Debug.Log("Test");
GameObject temp;
Vector3 pos = this.transform.position;
temp = Instantiate(torre);
temp.transform.position = pos;
temp.layer = 5;
Destroy(this.gameObject);
}
}
Código Umbral de ataque de torres:
Code: Select all
using UnityEngine;
using System.Collections;
public class Torres : MonoBehaviour {
public GameObject enemigo;
private float UmbrualdeDistancia = 2;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
float dist = (enemigo.transform.position - this.transform.position).magnitude;
if (dist <= UmbrualdeDistancia)
{
Debug.DrawLine(this.transform.position, enemigo.transform.position, Color.green);
}
}
}
¿QUÉ VAMOS A HACER?
Montar evidencia de todos los códigos aplicados con sus respectivos apoyos gráficos y ponernos al día.
¿QUÉ DIFICULTADES HEMOS TENIDO?
Hemos estado involucrados en proyectos de otros cursos con plazo de entrega mucho más cercanos.

WEEKLY MEETING #6.1
Posted: Thu Mar 14, 2019 11:33 pm
by David Ballesteros V
¿QUÉ HEMOS HECHO?
Se estuvo implementando todo el código que se tiene con sprites prueba mientras los originales estan listos.
Se implementó el código de disparo y monedas, y se hicieron pequeños cambios en el de torres y las oleadas.
-Código de disparo:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Flechas : MonoBehaviour {
private GameObject objetivo;
private float disparoLife = 2f;
private float speed = 5f;
private const string ENEMIGO = "Enemigo";
// Use this for initialization
void Start () {
}
private void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.tag.Equals(ENEMIGO))
{
Debug.Log("Ataco al enemigo");
Destroy(this.gameObject);
}
}
public void ActivarFlecha(Torres torre)
{
objetivo = torre.Enemigo;
}
// Update is called once per frame
void Update () {
Vector3 direccion;
if (objetivo != null)
{
direccion = objetivo.transform.position - this.transform.position;
this.transform.position += speed * direccion * Time.deltaTime;
Destroy(this.gameObject, disparoLife);
}
}
}
-Código de oleadas:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Oleadas : MonoBehaviour {
public static ArrayList enemigos = new ArrayList();
[SerializeField]
private GameObject enemigo1;
[SerializeField]
private GameObject enemigo2;
[SerializeField]
private Transform spawn;
private int waves = 2;
private int contador = 0;
void Oleada1()
{
GameObject temp;
GameObject temp2;
Vector3 pos_inicial = spawn.transform.position;
Vector3 incremento = new Vector3(0,5);
for(int i =0; i<4;i++)
{
temp = Instantiate(enemigo1, pos_inicial + incremento, Quaternion.identity);
pos_inicial = temp.transform.position;
enemigos.Add(temp);
if (i>=2)
{
temp2 = Instantiate(enemigo2, pos_inicial + incremento, Quaternion.identity);
pos_inicial = temp2.transform.position;
enemigos.Add(temp2);
}
}
}
void Oleada2()
{
GameObject temp;
GameObject temp2;
Vector3 pos_inicial = spawn.transform.position;
Vector3 incremento = new Vector3(0, 5);
for (int i = 0; i < 6; i++)
{
temp = Instantiate(enemigo1, pos_inicial + incremento, Quaternion.identity);
pos_inicial = temp.transform.position;
enemigos.Add(temp);
if (i >= 3)
{
temp2 = Instantiate(enemigo2, pos_inicial + incremento, Quaternion.identity);
pos_inicial = temp2.transform.position;
enemigos.Add(temp2);
}
}
}
IEnumerator spawnOleadas()
{
contador++;
Debug.Log("Empieza la oleada:"+contador);
if (contador == 1)
{
Oleada1();
yield return new WaitForSeconds(2f);
}
else if(contador==2)
{
Oleada2();
yield return new WaitForSeconds(2f);
}
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.Space))
{
if(contador<=waves)
{
StartCoroutine(spawnOleadas());
}
else
{
StopCoroutine(spawnOleadas());
}
}
}
}
-Código de torres:
Code: Select all
using UnityEngine;
using System.Collections;
public class Torres : MonoBehaviour {
private GameObject enemigo;
private float UmbrualdeDistancia = 2.2f;
[SerializeField]
private GameObject disparo;
private static float seg;
public GameObject Enemigo
{
get
{
return enemigo;
}
set
{
enemigo = value;
}
}
void Start()
{
Torres.seg=25f;
}
GameObject BuscarEnemigos()
{
ArrayList objetivos = Oleadas.enemigos;
GameObject temp;
foreach(Object item in objetivos)
{
temp = (GameObject)item;
if (Vector3.Distance(temp.transform.position, this.transform.position)<UmbrualdeDistancia)
{
return temp;
}
}
return null;
}
void Disparar()
{
GameObject obj = Instantiate(disparo, this.transform.position, Quaternion.identity);
Flechas flecha = obj.GetComponent<Flechas>();
flecha.ActivarFlecha(this);
}
// Update is called once per frame
void Update()
{
seg += 1 + Time.deltaTime;
Enemigo = BuscarEnemigos();
if(Torres.seg>25f)
{
Torres.seg = 0f;
Debug.Log("Entro");
if (Enemigo != null)
{
Disparar();
Debug.DrawLine(this.transform.position, enemigo.transform.position, Color.green);
}
}
}
}
¿QUÉ VAMOS A HACER?
Se implementará la compra de torres, vida de enemigo y de la base.
¿QUÉ DIFICULTAD HEMOS TENIDO?
No hemos tenido inconvenientes, sólo algo de retraso en cuando a arte.

WEEKLY MEETING #7
Posted: Tue Mar 19, 2019 10:58 pm
by David Ballesteros V
WEEKLY MEETING #7.1
Posted: Thu Mar 21, 2019 11:14 pm
by David Ballesteros V
¿QUÉ HEMOS HECHO?
No hemos hecho muchos avances, pero se realizó el código de la vida de enemigos de manera general:
-Código general de vida de enemigos:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Muerte_Enemigos : MonoBehaviour
{
private int vida_enemigo=20;
private const string FLECHA = "Flecha";
public int Vida_enemigo
{
get
{
return vida_enemigo;
}
set
{
vida_enemigo = value;
}
}
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.gameObject.tag.Equals(FLECHA))
{
vida_enemigo = vida_enemigo - 3;
if(vida_enemigo==0)
{
Destroy(this.gameObject);
}
}
}
}
¿QUÉ VAMOS A HACER?
Vamos a empezar a dejar un poco de lado la programación para dedicarnos en programación, arreglar el código de la vida de enemigos con clases abstractas y arreglar la compra de torres.
¿QUÉ DIFICULTADES HEMOS TENIDO?
No son dificultades pero si se ha pospuesto mucho la parte gráfica y no se ha podido llegar al código de la compra de torres.

WEEKLY MEETING #8 / SPRINT #5
Posted: Tue Mar 26, 2019 11:23 pm
by David Ballesteros V
ACTIVIDAD #5
Inició: Mar 13
Finalizó:Mar 25
-Código Oleadas: -Miguel Vargas
-Dif: 3
-Código Torre y Vida Enemigo: -Miguel Vargas
-Dif: 3
-Código Torre#2 -Miguel Vargas
-Dif: 4
-Torres y Props de Escenario: -David Ballesteros
-Dif: 3
¿QUÉ HEMOS HECHO?
Se realizaron las dos primeras torres, implementamos la barra de selección de torre y creamos un inicializador de oleadas.
-Torre#1 Arqueros:
-Torre#2 Iglesia:
-Código torre #2:
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Iglesia : MonoBehaviour
{
[SerializeField]
private GameObject aura;
[SerializeField]
private Transform creacion;
[SerializeField]
private float tiempo_aura;
public static int seg;
void Start()
{
Iglesia.seg = 700;
}
void Update()
{
seg = 1 +seg;
Debug.Log(seg);
if(Iglesia.seg>700)
{
Iglesia.seg = 0;
GameObject crear_aura = Instantiate(aura, creacion.position, creacion.rotation);
Destroy(crear_aura.gameObject, tiempo_aura);
}
}
}
¿QUÉ VAMOS A HACER?
A hacer mejoras en algunas cosas como la torre"2, las animaciones, el mapa e interfaz.
¿QUÉ DIFICULTADES HEMOS TENIDO?
Ninguna relevante por el momento.

WEEKLY MEETING #8.1
Posted: Thu Mar 28, 2019 11:12 pm
by David Ballesteros V