GRAPHICS PROGRAMMING

The engine that got used is Howest property.

 

Features:

  • Enemy animations/movement/attacks
  • Avatar movement/aiming/shooting
  • Enemy wave manager
  • Avatar health
  • Post processing effect low health
  • Post processing effect grey
  • Enemy spawning
  • Health pickups

Example code:

 
using UnityEngine;
using System.Collections;

public class LevelManager : MonoBehaviour
{
    //--------------
    //TWO DIFFERENT level areas
    //--------------
    enum ActiveAvatar
    {
        AVATAR1 = 1,
        AVATAR2 = 2
    }

    private GameObject _levelAvatar1;
    private GameObject _levelAvatar2;
    private AvatarManager _avatarManager;

    void Start()
    {
        _avatarManager = GameManager.SingleTon().GetAvatarManager();
    }

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            GameManager.SingleTon().GetLevelSelectManager().ReloadCurrentLevel();
        }
    }

    void EnableLevel(GameObject levelObjects)
    {
        Component[] renderers;
        renderers = levelObjects.GetComponentsInChildren<Renderer>();
        foreach (Renderer renderer in renderers)
        {
            renderer.enabled = true;
        }
        Component[] colliders;
        colliders = levelObjects.GetComponentsInChildren<Collider>();
        foreach (Collider collider in colliders)
        {
            collider.enabled = true;
        }
        Component[] rB;
        rB = levelObjects.GetComponentsInChildren<Rigidbody>();
        foreach (Rigidbody body in rB)
        {
            body.isKinematic = false;
            body.useGravity = true;
        }
        Component[] lights;
        lights = levelObjects.GetComponentsInChildren<Light>();
        foreach (Light light in lights)
        {
            light.enabled = true;
        }
    }
    
    void DisableLevel(GameObject levelObjects)
    {
        Component[] renderers;
        renderers = levelObjects.GetComponentsInChildren<Renderer>();
        foreach (Renderer renderer in renderers)
        {
            renderer.enabled = false;
        }
        Component[] colliders;
        colliders = levelObjects.GetComponentsInChildren<Collider>();
        foreach (Collider collider in colliders)
        {
            collider.enabled = false;
        }
        Component[] rB;
        rB = levelObjects.GetComponentsInChildren<Rigidbody>();
        foreach (Rigidbody body in rB)
        {
            body.isKinematic = true;
            body.useGravity = false;
        }
        Component[] lights;
        lights = levelObjects.GetComponentsInChildren<Light>();
        foreach (Light light in lights)
        {
            light.enabled = false;
        }
    }
    
    public void SetLevelAvatars(GameObject level1, GameObject level2)
    {
        _levelAvatar1 = level1;
        _levelAvatar2 = level2;
    }
    
    public void ChangeActiveLevel()
    {
        if ((ActiveAvatar)_avatarManager.GetActiveAvatar() == ActiveAvatar.AVATAR1)
        {
            EnableLevel(_levelAvatar1);
            DisableLevel(_levelAvatar2);
        }
        if ((ActiveAvatar)_avatarManager.GetActiveAvatar() == ActiveAvatar.AVATAR2)
        {
            EnableLevel(_levelAvatar2);
            DisableLevel(_levelAvatar1);
        }
    }
}