2. NARRATIVA DEL VIDEOJUEGO
• En un mundo distópico los perros han comenzado a razonar al
igual que los humanos gracias a que su alimento fue alterado
genéticamente por los dueños de una industria de comida para
mascotas. Ahora los perros se han reunido para planear la
caída del mundo humano, se han apoderado de armamento y
están listo para acabar con el mundo tal cual se conoce.
15. CRONOGRAMA
• SEMANA 1 : Planteamiento del juego
• SEMANA 2-3: Diseño de personajes y animaciones
• SEMANA 4-5: Creación de escenarios y sprites
• SEMANA 6-7: Mecánicas del juego
• SEMANA 8-9: HUD y power ups
• SEMANA 10: Testeo del juego con diferentes usuarios
• SEMANA 11-13: Corrección de problemas
• SEMANA 14-15: Música y detalles
• SEMANA 16: Entrega
18. SCRIPT: MUERTE DEL JUGADOR
EMANUEL
using UnityEngine;
using System.Collections;
public class MuertePorToque : MonoBehaviour {
public bool KillSelf;
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player")
{
FindObjectOfType<PlayerController>().Death();
if (KillSelf) Destroy(gameObject);
}
}
}
19. SCRIPT: MUERTE DEL ENEMIGO
EMANUEL
public class MuerteEnemigo : MonoBehaviour
{ public float height;
private int scale;
// Use this for initialization
void Start ()
{
scale = Mathf.Clamp((int)(FindObjectOfType<PlayerController>().transform.position.x*10000 - transform.position.x * 10000), -1, 1);
transform.localScale = new Vector3(scale, 1, 1);
if(GetComponent<Rigidbody2D>() != null)
{
GetComponent<Rigidbody2D>().velocity = new Vector2(-scale*3, height);
}
} // Update is called once per frame
void Update ()
{
}
}
21. SCRIPT: MUERTE POR TOQUE ENEMIGO
MIRYAN
public bool killSelf;
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player")
{
FindObjectOfType<PlayerController>().Death();
if (killSelf) Destroy(gameObject);
}
}
22. SCRIPT: PANTALLAS DE INICIO
EMANUEL
void Update () {
if (Input.GetKey(KeyCode.D))
{
SceneManager.LoadScene(4);
}
if (Input.GetKey(KeyCode.A))
{
SceneManager.LoadScene(5);
}
if (Input.GetKey(KeyCode.Space))
{
SceneManager.LoadScene(2);
}
}
23. SCRIPTS: BALA DEL ENEMIGO
MIRYAN
public class BalaEnemigo : MonoBehaviour
{
Rigidbody2D myRigidbody;
public float movespeed;
void Start()
{
myRigidbody = GetComponent<Rigidbody2D>();
myRigidbody.AddRelativeForce(Vector2.right * (movespeed + PlayerController.rapidsPicked * PlayerController.projectileSpeedKoeff),
ForceMode2D.Impulse);
}
void OnBecameInvisible()
{
Destroy(gameObject);
if (transform.parent != null) Destroy(transform.parent.gameObject);
}
}
24. SCRIPT: MUERTE
EMANUEL
public void Death()
{
Instantiate(DeathEffect, transform.position, transform.rotation);
transform.position = SpawnPoint.transform.position;
if (invincCounter > 0) return;
isDead = true;
isActive = false;
inactCounter = inactivityTime;