Page 5 of 5
WEEKLY MEETING
Posted: Fri Apr 28, 2017 9:09 am
by David Ballesteros V
-¿Qué hemos hecho?:
Hemos adecuado el nivel para mayor comodidad, hecho las colisiones tanto de torres como de enemigos a la base y también mejoramos el menú de selección de torres para mayor estética, hemos cambiado la programación de las oleadas para que se vea mejor.
-¿Qué haremos?:
Haremos la vida de los enemigos, montaremos los sprites de la base principal porque ya no tendrá una barra sino que se irá dañando dependiendo de las colisiones que tengan con ella y la programación y animación de la torre de manguera.
-¿Qué dificultades hemos tenido?:
En esta semana no hemos tenido ninguna dificultad.
Delegados
Posted: Fri Apr 28, 2017 11:35 am
by miguel199804
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace delegado
{
class Program
{
delegate float Delegado(int num1, int num2);
delegate void Prueba3(string saludar, string despedirse);
delegate string Nombres();
delegate int[] Array(int num1);
public static float Prueba(int num1, int num2)
{
float num3;
num3 = num1 / num2;
Console.WriteLine(num3);
return num3;
}
public static float Prueba2(int num1, int num2)
{
float num3;
num3 = (num1 * num2) / num1;
Console.WriteLine(num3);
return num3;
}
public static float Prueba5(int num1, int num2)
{
float num3;
num3 = (num1 / num2) * num1;
Console.WriteLine(num3);
return num3;
}
public static void Prueba4(string saludar, string despedirse)
{
Console.WriteLine(saludar + ", " + despedirse);
}
public static void Prueba6(string saludar, string despedirse)
{
Console.WriteLine(saludar + " Miguel, " + despedirse + " Juan");
}
public static void Prueba7(string saludar, string despedirse)
{
string[] nombres;
nombres = new string [] { "Pedro", "Antonio", "Jose","Natalia", "Susana" };
for(int i=0; i<nombres.Length; i++)
{
Console.WriteLine(saludar + " " + nombres[i] + ", " + despedirse);
}
}
public static string Prueba8()
{
string nombre;
nombre = "Jose";
Console.WriteLine(nombre);
return nombre;
}
public static string Prueba9()
{
string nombre;
nombre = "Camila";
Console.WriteLine(nombre);
return nombre;
}
public static string Prueba10()
{
string nombre;
nombre = "Suleima";
Console.WriteLine(nombre);
return nombre;
}
public static int[] Prueba11(int num)
{
int[] res;
int n;
string temp;
res = new int[num];
for (int i=0;i<res.Length;i++)
{
Console.WriteLine("Que valor va en al array [" + i+"]");
temp = Console.ReadLine();
if(int.TryParse(temp,out n))
{
res[i] = n;
}
}
Console.WriteLine("El array es:");
Console.Write("[");
for(int i=0; i<res.Length;i++)
{
Console.Write(res[i]);
if(i+1==res.Length)
{
Console.Write("]");
}
else
{
Console.Write(", ");
}
}
Console.WriteLine("");
return res;
}
public static int[] Prueba12(int num)
{
int[] res;
res = new int[num];
int n;
int pares , impares ;
string temp;
pares = 0;
impares = 0;
for(int i=0; i<res.Length;i++)
{
Console.WriteLine("Que valor va en al array [" + i + "]");
temp = Console.ReadLine();
if(int.TryParse(temp, out n))
{
res[i] = n;
if(res[i]%2==0)
{
pares++;
}
else
{
impares++;
}
}
}
Console.WriteLine("El array es:");
Console.Write("[");
for (int i = 0; i < res.Length; i++)
{
Console.Write(res[i]);
if (i + 1 == res.Length)
{
Console.Write("]");
}
else
{
Console.Write(", ");
}
}
Console.WriteLine(" ");
Console.WriteLine("El array tiene " + pares + " numeros pares");
Console.WriteLine("El array tiene " + impares + " numeros impares");
return res;
}
static void Main(string[] args)
{
Delegado num3;
Prueba3 hola;
Nombres estudiantes;
Array prueba;
num3 = Prueba;
num3 += Prueba2;
num3 += Prueba;
num3 += Prueba5;
num3(5, 15);
hola = Prueba4;
hola += Prueba6;
hola += Prueba7;
hola("Holaa", "Adios");
estudiantes = Prueba8;
estudiantes += Prueba9;
estudiantes += Prueba10;
estudiantes();
estudiantes -= Prueba9;
estudiantes();
prueba = Prueba11;
prueba += Prueba12;
prueba(5);
Console.ReadKey();
}
}
}
ADELANTOS GRÁFICOS
Posted: Fri Apr 28, 2017 1:08 pm
by David Ballesteros V
-TORRE MANGUERA ESTÁTICA:

WEEKLY MEETING
Posted: Fri May 05, 2017 1:26 am
by miguel199804
-¿Qué hemos hecho?:
Esta semana se trabajo principalmente en corregir algunos errores que se nos estaban presentando en las waves y las rutas de los enemigos.
-¿Qué haremos?:
Se terminara la programación de la manguera y se empezara la programación de las otras dos torres. Ademas, se empezaran a subir a unity las animaciones de los enemigos y demás.
-¿Qué dificultades hemos tenido?:
Esta semana en programación no se avanzo por cuestión de parciales y entregas.
Programación base: Vida enemigos
Posted: Fri May 05, 2017 2:05 am
by miguel199804
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BarraVida_enemigo : MonoBehaviour {
public GameObject enemigo;
public GameObject barra_verde;
public GameObject barra_roja;
float escala = 0.001f;
SpriteRenderer sr;
// Use this for initialization
void Start () {
sr = barra_verde.GetComponent<SpriteRenderer>();
}
// Update is called once per frame
void Update () {
if(sr.transform.localScale.x>0)
{
sr.transform.localScale -= new Vector3(escala, 0);
barra_verde.transform.position = enemigo.transform.position- new Vector3(0.3f-sr.bounds.size.x/2,0.4f);
barra_roja.transform.position = enemigo.transform.position - new Vector3(0.5f, 0.4f);
}
}
}
Presentacion final
Posted: Fri May 19, 2017 8:13 pm
by miguel199804
Video juego
Posted: Fri May 19, 2017 8:14 pm
by miguel199804