Tuesday, June 14, 2016

Thursday, June 9, 2016

Design Document

If you have the chance fill out parts of the document
https://drive.google.com/file/d/0B9Djz2xh-c2bVDB0UmNrME1ILUU/view?usp=sharing

(If you can't get the link to work go to the dropbox it should be there or you can go on the MAA)

Saturday, May 14, 2016

UI (Having Problems)

For some reason im having problems with the UI. Whenever I finish the whole UI, save file, exit out of the file, and come back into the file, only half of my UI shows and not rest of the work I did with UI. I will keep working on it and hopefully I can fix this problem.

Thursday, May 12, 2016

Google Drive

https://drive.google.com/drive/folders/0B_H1X-0DsSBUWWpfVHdUQTFDNEk

Tuesday, May 3, 2016

Link to the level

https://drive.google.com/file/d/0B9u6tGHszDlPS2F3SjNjQ3FHam8/view?usp=sharing

EnemyHealth Script

using UnityEngine;

public class EnemyHealth : MonoBehaviour
{
                public int startingHealth = 100;       // The amount of health the enemy starts the game with.
                public int currentHealth;              // The current health the enemy has.
    //public float sinkSpeed = 2.5f;
                public int scoreValue = 10;            // The amount added to the player's score when the enemy dies.
    //public AudioClip deathClip;


                Animator m_animator;                    // Reference to the animator.
    //AudioSource m_enemyAudio;
                ParticleSystem m_hitParticles;          // Reference to the particle system that plays when the enemy is damaged.
                CapsuleCollider m_capsuleCollider;      // Reference to the capsule collider.
                bool isDead;                            // Whether the enemy is dead.
    //bool isSinking;


    void Awake ()
    {
                                // Setting up the references.
        m_animator = GetComponent <Animator> ();
        m_hitParticles = GetComponentInChildren <ParticleSystem> ();
        m_capsuleCollider = GetComponent <CapsuleCollider> ();

                       // Setting the current health when the enemy first spawns
                          currentHealth = startingHealth;
    }




    public void TakeDamage (int amount, Vector3 hitPoint)
    {
                                // If the enemy is dead...
                                if(isDead)
                                                // ... no need to take damage so exit the function.
                                                return;

                                //m_enemyAudio.Play ();

                                // Reduce the current health by the amount of damage sustained.
        currentHealth -= amount;
           
                                // Set the position of the particle system to where the hit was sustained.
                                m_hitParticles.transform.position = hitPoint;
       
                                // And play the particles.
                                m_hitParticles.Play();

                                // If the current health is less than or equal to zero...
                                if(currentHealth <= 0)
        {
                                                // ... the enemy is dead.
                                                Death ();
        }
    }


    void Death ()
    {
                                // ... the enemy is dead.
                                isDead = true;

                                // Turn the collider into a trigger so shots can pass through it.
                                m_capsuleCollider.isTrigger = true;

                                // Tell the animator that the enemy is dead.
                                m_animator.SetTrigger ("Dead");

        //m_enemyAudio.clip = deathClip;
        //m_enemyAudio.Play ();
                                ScoreManager.score += scoreValue;
    }



}

Thursday, April 28, 2016

tail attack



PlayerHealth Script

PlayerHealth:


using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class PlayerHealth : MonoBehaviour
{
                public int startingHealth = 100; // The amount of health the player starts the game with.;
                public int currentHealth;        // The current health the player has.
                public Slider healthSlider;      // Reference to the UI's health bar.
                public Image damageImage;        // Reference to an image to flash on the screen on being hurt.
                public AudioClip deathClip;       // The audio clip to play when the player dies.
                public float flashSpeed = 5f;      // The speed the damageImage will fade at.
                public Color flashColour = new Color(1f, 0f, 0f, 0.1f);  // The colour the damageImage is set to, to flash.


                float healthTimer = 0.0f;
                bool healthPackShouldRespawn = false;
                public GameObject healthPack;



                Animator m_animator;               // Reference to the Animator component.
                AudioSource m_playerAudio;         // Reference to the AudioSource component.
                PlayerMovement m_playerMovement;    // Reference to the player's movement.
                PlayerShooting m_playerShooting;    // Reference to the PlayerShooting script.
                bool isDead;                         // Whether the player is dead.
                bool damaged;                       // True when the player gets damaged.
              

    void Awake ()
    {
                                // Setting up the references.
        m_animator = GetComponent <Animator> ();
        m_playerAudio = GetComponent <AudioSource> ();
        m_playerMovement = GetComponent <PlayerMovement> ();
        m_playerShooting = GetComponentInChildren <PlayerShooting> ();
       
                                // Set the initial health of the player.
                                currentHealth = startingHealth;
                                //InvokeRepeating ("PlayerHealthPack", 5,1);
    }


    void Update ()
    {
                                // If the player has just been damaged...
                                if (damaged)
                                {
                                                damageImage.color = flashColour;
                                }
                                // Otherwise...
                                else
                                {
                                                // ... transition the colour back to clear.
                                                damageImage.color = Color.Lerp (damageImage.color, Color.clear, flashSpeed * Time.deltaTime);
                                }
       
                                // Reset the damaged flag.
                                damaged = false;

                                if (healthPackShouldRespawn)
                                {
                                                healthTimer += Time.deltaTime;

                                                if (healthTimer > 20.0f)
                                                {
                                                                healthPack.gameObject.SetActive (true);
                                                                healthTimer = 0.0f;
                                                              

                                                }
                               
                                }

                }
               

    public void TakeDamage (int amount)
    {
                                // Set the damaged flag so the screen will flash.
                                damaged = true;

                                // Reduce the current health by the damage amount.
                                currentHealth -= amount;

                                // Set the health bar's value to the current health.
                                healthSlider.value = currentHealth;

                                // Play the hurt sound effect.
                                m_playerAudio.Play ();

                                // If the player has lost all it's health and the death flag hasn't been set yet...
                                if(currentHealth <= 0 && !isDead)
        {
            Death ();
        }
    }

                void OnTriggerEnter(Collider item)
                {
                                if(item.gameObject.tag == "PlayerHealthPack")
                                {
                                                if(currentHealth < 100)
                                                {
                                                                currentHealth = currentHealth + 10;
                                                                healthSlider.value = currentHealth;
                                                                item.gameObject.SetActive(false);
                                                                healthPackShouldRespawn = true;

                                                }
                                }
                }

               
    void Death ()
    {
                                // Set the death flag so this function won't be called again.
                                isDead = true;

                                // Turn off any remaining shooting effects.
                                m_playerShooting.DisableEffects ();

                                // Tell the animator that the player is dead.
                                m_animator.SetTrigger ("Die");

                                // Set the audiosource to play the death clip and play it (this will stop the hurt sound from playing).
                                m_playerAudio.clip = deathClip;
                                m_playerAudio.Play ();

                                // Turn off the movement and shooting scripts.
                                m_playerMovement.enabled = false;
                               m_playerShooting.enabled = false;
    }

               

    public void RestartLevel ()
    {
        Application.LoadLevel (Application.loadedLevel);
    }

}

EnemyAttack Script (Computer Aspect) (Close Attack)

EnemyAttack:

using UnityEngine;
using System.Collections;

public class EnemyAttack : MonoBehaviour
{
                public float timeBetweenAttacks = 0.5f;    // The time in seconds between each attack.
                public int attackDamage = 10;              // The amount of health taken away per attack.


                Animator m_animator;                       // Reference to the animator component.
                Animator m_lightAttack;                           // Reference to  the animator component.
                Animator m_DoNotAttack;                      // Reference to the animator component.
                GameObject m_player;                       // Reference to the player GameObject.
                //GameObject m_enemy;                        // Reference to the enemy GameObject.
                PlayerHealth m_playerHealth;               // Reference to the player's health.
                EnemyHealth m_enemyHealth;                  // Reference to this enemy's health.
                bool playerInRange;                         // Whether player is within the trigger collider and can be attacked.
               
float timer;                               // Timer for counting up to the next attack.


    void Awake ()
    {  

                                // Setting up the references.
        m_player = GameObject.FindGameObjectWithTag ("Player");
        m_playerHealth = m_player.GetComponent <PlayerHealth> ();
        m_enemyHealth = GetComponent<EnemyHealth>();
        m_animator = GetComponent <Animator> ();
        m_lightAttack = GetComponent <Animator> ();
        m_DoNotAttack = GetComponent <Animator> ();
    }


    void OnTriggerEnter (Collider other)
    {
                                // If the entering collider is the player...
                                if(other.gameObject == m_player)
        {
                                                // ... the player is in range.
                                                playerInRange = true;
        }
    
}


    void OnTriggerExit (Collider other)
    {
                                // If the exiting collider is the player...
                                if(other.gameObject == m_player)
        {
                                                // ... the player is no longer in range.
                                                playerInRange = false;
        }
    
}


    void Update ()
    {
       
                                // Add the time since Update was last called to the timer.
                                timer += Time.deltaTime;

                                // If the timer exceeds the time between attacks, the player is in range and this enemy is alive...
                                if (timer >= timeBetweenAttacks && playerInRange && m_enemyHealth.currentHealth > 0)
                                {
                                                Attack ();
                                }

                                else if (!playerInRange)
                                {
                                                DoNotAttack ();
                                }

                                // If the player has zero or less health...
                                if(m_playerHealth.currentHealth <= 0)
        {
                m_animator.SetTrigger ("PlayerDead");
                m_lightAttack.SetTrigger ("PlayerDead");
                                               
        }
    }


    void Attack ()
    {
                                // Reset the timer.
                                timer = 0f;

                                // If the player has health to lose...
                                if(m_playerHealth.currentHealth > 0)
        {
                                                // ... Attack the player.

                                                m_lightAttack.SetTrigger ("LightAttack");
        }
                                 
                }

                void DamagePlayer()
                {
                                //Damage the player.
                                m_playerHealth.TakeDamage (attackDamage);
                }

                void DoNotAttack ()
                {
                                m_DoNotAttack.SetBool ("DoNotAttack", false);
                }
}


Underwater environment, work in progress


Thursday, April 21, 2016

Wednesday, April 20, 2016

Tuesday, April 19, 2016

Google Doc

Put files you want to share with the group in here
https://drive.google.com/drive/folders/0B_H1X-0DsSBUWWpfVHdUQTFDNEk

Forest environment and volcano sample

Finished up the forest environment, and working on two others.

This is an example of the volcano environment, but it still needs tweaking. any suggestions?

Thursday, April 14, 2016

Student's weekend task's

Etienne: Getting attacks to function
Simon: Working on the game manger
Allen: Working on the networking
Wallace: Working on the camera
Chelsea: Working on the spread sheet
Irvin: Working on the arena

Tuesday, April 12, 2016

Attacks

This week (Week 2), programmers will work on the functionally of different attacks.

how to make sprite sheets in photoshop

week 2


examples of art ideas
the style is of the game is fantasy chibi with each character having one specific weapon.
right now the artists will be working on the background of the game and the sprite sheets for the characters.





Thursday, April 7, 2016

week 1

we have decided to do an arena based game with fighting, artists are working on the concept art. still working on a theme for the game. programmers are working on mechanics for the game, how the characters are going to fight and what not. next class we will finalize everything and get started on the project.