This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;

namespace Gameplay
@@ -32,4 +32,4 @@ void OnTriggerExit(Collider other)
zEvents.ZoneExited(actor.Type, actor.gameObject);
}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
using UnityEngine;
using System.Collections;

using UnityEngine;
using System.Collections;

public class BulletBehavior : MonoBehaviour {

public float Speed;
@@ -10,29 +10,29 @@ public class BulletBehavior : MonoBehaviour {
//List of ranges for bullets. Ordered from: Infinity, zero, very short, short, medium, long, very long
private readonly float[] Ranges = {0f, 5f, 10f, 20f, 50f};
private float MaxDistance;
private float DistanceMoved = 0;

// Use this for initialization
private float DistanceMoved = 0;

// Use this for initialization
void Start () {
if (Range == -1) MaxDistance = -1;
else MaxDistance = Ranges[Range];
}

// Update is called once per frame
else MaxDistance = Ranges[Range];
}

// Update is called once per frame
void Update () {
MoveBullet();
}

MoveBullet();
}

void MoveBullet()
{
Vector3 pos = transform.position;
this.transform.position += this.transform.forward * Speed * Time.deltaTime;
DistanceMoved += Vector3.Distance(pos, transform.position);
if (DistanceMoved > MaxDistance) Destroy(this.gameObject);
}

if (DistanceMoved > MaxDistance) Destroy(this.gameObject);
}

void OnTriggerEnter()
{

}
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,30 @@
using UnityEngine;
using System.Collections;

namespace Combat
{
public enum Powers
{
Aggro,
BattleCry,
BoobyTrap,
Bow,
DelayedGrenadeLauncher,
DodgeRoll,
EagleEyes,
Flamethrower,
ForgethePath,
GhillieSuit,
GiveOrders,
Inspire,
Katana,
LayMines,
Ninjitsu,
RCDrone,
RocketLauncher,
SleepDart,
SniperShot,
TakeCover,
ThrowGrenade
}
}
@@ -0,0 +1,11 @@
namespace Combat
{
public enum DamageTypes
{
Normal,
SoftTargetOnly,
HardTargetOnly,
AntiPersonel,
AntiArmor
}
}
@@ -0,0 +1,93 @@
using UnityEngine;
using System.Collections;

namespace Combat
{
public class Projectile : MonoBehaviour
{
private Vector3 ProjOrigin;
public DamageTypes DamType;
[Range(0,100)] public float Speed;
public float ProjectileRange;
public int Damage;

private float CreationTime { get; set; }
private float TimeSinceCreation { get { return Time.time - CreationTime; } set { } }

void Awake()
{
CreationTime = Time.time;
}

void Start()
{
ProjOrigin = gameObject.transform.position;
}

void Update()
{
UpdatePosition();
}

void LateUpdate()
{
if (MaxDistanceReached()) MarkForDeletion(this);
}

internal static Projectile InitProj(Projectile p, Transform locAndDir, ProjectileTypes projType, float speed, int damage, float projRange)
{
if ((locAndDir == null) || (projType == null) || speed <= 0) return null;
p.ProjOrigin = p.transform.position; p.DamType = GetDamageType(projType);
p.Speed = speed; p.Damage = damage; p.ProjectileRange = projRange;
return p;
}

internal static void MarkForDeletion(Projectile proj)
{
Destroy(proj.gameObject);
}

internal static GameObject InstantiateProjectile(ProjectileTypes type, Transform locAndDir)
{
GameObject p = Instantiate(Resources.Load<GameObject>("Prefabs/Bullet"));
p.transform.position = locAndDir.position;
p.transform.forward = locAndDir.forward;
return p;
}

private bool MaxDistanceReached()
{
return Vector3.Distance(this.gameObject.transform.position, ProjOrigin) > ProjectileRange;
}

private static DamageTypes GetDamageType(ProjectileTypes projType)
{
switch (projType)
{
case ProjectileTypes.Bullet:
return DamageTypes.Normal;
case ProjectileTypes.BulletArmPierce:
return DamageTypes.AntiArmor;
case ProjectileTypes.BulletHollowPoint:
return DamageTypes.AntiPersonel;
case ProjectileTypes.Shuriken:
return DamageTypes.SoftTargetOnly;
case ProjectileTypes.Fireball:
return DamageTypes.SoftTargetOnly;
case ProjectileTypes.Rocket:
return DamageTypes.AntiArmor;
case ProjectileTypes.Grenade:
return DamageTypes.AntiArmor;
case ProjectileTypes.Arrow:
return DamageTypes.SoftTargetOnly;
default:
return DamageTypes.Normal;
}
}

private void UpdatePosition()
{
this.transform.position = ProjOrigin + transform.forward * Speed * TimeSinceCreation;
}
}
}
@@ -0,0 +1,14 @@
namespace Combat
{
public enum ProjectileTypes
{
Bullet,
BulletArmPierce,
BulletHollowPoint,
Shuriken,
Fireball,
Rocket,
Grenade,
Arrow
}
}
@@ -0,0 +1,13 @@
namespace Combat
{
public enum Weapons
{
ChainGun,
Crossbow,
M16,
Pistol,
Shotgun,
Shuriken,
SMG
}
}
@@ -0,0 +1,35 @@
using UnityEngine;
using Stats;
using System.Collections;

namespace Combat.WeaponVariants
{
public abstract class AutoWeapon : StandardWeapon
{
protected bool Firing { get; set; }
public override void Start()
{
base.Start();
}

internal override bool FireOn()
{
if (!Firing) return StartAutoFire();
else return true;
}

internal override bool FireOff()
{
return StopAutoFire();
}

protected bool StandardFire()
{
return base.FireOn();
}

protected abstract bool StartAutoFire();
protected abstract bool StopAutoFire();

}
}
@@ -0,0 +1,35 @@
using UnityEngine;
using Stats;
using System.Collections;

namespace Combat.WeaponVariants
{
public abstract class BurstWeapon : StandardWeapon
{
protected int BurstNumProjectiles { get; set; }
protected bool Firing { get; set; }
public override void Start()
{
base.Start();
}

internal override bool FireOn()
{
Firing = true;
ReadyToFire = false;
return BurstFire();
}
internal override bool FireOff()
{
return true;
}

protected bool StandardFire()
{
return base.FireOn();
}

protected abstract bool BurstFire();

}
}
@@ -0,0 +1,42 @@
using UnityEngine;
using System.Collections;
using Stats;

namespace Combat.WeaponVariants
{
public class ChainGun : AutoWeapon
{
public float SpinUpTime;
public override void Start()
{
base.Start();
}

protected override bool StartAutoFire()
{
StartCoroutine(AutoFire());
return true;
}

protected override bool StopAutoFire()
{
Firing = false;
return true;
}

private IEnumerator AutoFire()
{
//Play Spin up sound
Firing = true;
yield return new WaitForSeconds(SpinUpTime);
while(Firing)
{
StandardFire();
yield return new WaitForSeconds(Stats.FireRate);
}
}


}

}
@@ -0,0 +1,36 @@
using UnityEngine;
using System.Collections;

namespace Combat.WeaponVariants
{
public class M16 : BurstWeapon
{
public int NumProj = 3;
public override void Start()
{
BurstNumProjectiles = NumProj;
base.Start();
}
protected override bool BurstFire()
{
StartCoroutine(StartBurst(BurstNumProjectiles));
return true;
}

protected IEnumerator StartBurst(int numRounds)
{
int i = 0;
while(Firing)
{
StandardFire();
i++;
if (i >= numRounds)
{
ReadyToFire = true;
Firing = false;
}
else yield return new WaitForSeconds(Stats.FireRate);
}
}
}
}
@@ -0,0 +1,33 @@
using UnityEngine;
using System.Collections;
using Stats;

namespace Combat.WeaponVariants
{
public class Pistol : StandardWeapon
{
public override void Start()
{
base.Start();
}

internal override bool FireOn()
{
bool b = base.FireOn();
ReadyToFire = false;
StartCoroutine(EnforceMinCooldown());
return b;
}

internal override bool FireOff()
{
return true;
}

private IEnumerator EnforceMinCooldown()
{
yield return new WaitForSeconds(Stats.FireRate);
ReadyToFire = true;
}
}
}
@@ -0,0 +1,35 @@
using UnityEngine;
using System.Collections;
using Stats;
using System.Threading;

namespace Combat.WeaponVariants
{
public abstract class StandardWeapon : MonoBehaviour
{

internal Transform BarrelTransform { get; set; }
internal WeaponStats Stats { get; set; }
internal bool ReadyToFire { get; set; }

public virtual void Start()
{
BarrelTransform = gameObject.transform;
ReadyToFire = true;
}

internal virtual bool FireOn()
{
GameObject g = Projectile.InstantiateProjectile(Stats.ProjectileType, BarrelTransform);
Projectile p = g.AddComponent<Projectile>();
if (p == null) return false;
Projectile.InitProj(p, BarrelTransform, Stats.ProjectileType, Stats.ProjectileSpeed, Stats.ProjectileDamage, Stats.Range);
//Produce Sound
//Create relevant alert to enemies
return true;
}

internal abstract bool FireOff();

}
}
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;

namespace Stats
@@ -16,4 +16,4 @@ public CharStats(string name, int health, int speed, EquipmentStats loadout)
if (CharacterName == null) CharacterName = "Default";
}
}
}
}
@@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
using System.Collections;

namespace Stats
@@ -14,4 +14,4 @@ public EquipmentStats(WeaponStats mainWeapon, PowerStats pow1, PowerStats pow2)
MainWeaponStats = mainWeapon; Power1Stats = pow1; Power2Stats = pow2;
}
}
}
}
@@ -1,21 +1,23 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
using Combat;

namespace Stats
{
public struct PowerStats
{
public string PowerName;
public Powers PowerType;
public int Cooldown;
public int Range;
public int Damage;
public int NoiseLevel;
public int BaseNumUses;

public PowerStats(string name, int cooldown, int range, int dam, int noise, int baseNum)
public PowerStats(string name, Powers type, int cooldown, int range, int dam, int noise, int baseNum)
{
PowerName = name; Cooldown = cooldown; Range = range; Damage = dam; NoiseLevel = noise; BaseNumUses = baseNum;
if (PowerName == null) PowerName = "Default";
PowerName = name; Cooldown = cooldown; Range = range; Damage = dam; NoiseLevel = noise; BaseNumUses = baseNum; PowerType = type;
if (PowerName == null) PowerName = PowerType.ToString();
}
}
}
}
@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;
using Combat;

namespace Stats
{
public struct WeaponStats
{
public string WeaponName;
public Weapons WeaponType;
public float FireRate;
public float Range;
public ProjectileTypes ProjectileType;
public int ProjectileDamage;
public float ProjectileSpeed;
public int NoiseLevel;

public WeaponStats(string name, Weapons type, float fireRate, int range, ProjectileTypes projType, int damage, float projSpeed, int noise)
{
WeaponName = name; FireRate = fireRate; Range = range; ProjectileType = projType; ProjectileDamage = damage; NoiseLevel = noise;
WeaponType = type; ProjectileSpeed = projSpeed;
if (WeaponName == null) WeaponName = WeaponType.ToString();
}
}
}
@@ -1,6 +1,6 @@
using UnityEngine;
using System.Collections;

using UnityEngine;
using System.Collections;

public class FireBullet : MonoBehaviour {

public GameObject Bullet;
@@ -10,14 +10,14 @@ public class FireBullet : MonoBehaviour {
private bool BurstFiring = false;
private float TimeBetweenBursts = .1f;
private int BulletsPerBurst = 3;
private bool auto = false;

// Use this for initialization
void Start () {

}

// Update is called once per frame
private bool auto = false;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if(Automatic && !auto)
{
@@ -29,21 +29,21 @@ public class FireBullet : MonoBehaviour {
StopCoroutine("AutoFire");
auto = false;
}
else if (Input.GetKeyDown(KeyCode.F) && !BurstFiring) StartCoroutine("BurstFire");
}

else if (Input.GetKeyDown(KeyCode.F) && !BurstFiring) StartCoroutine("BurstFire");
}

public void Fire()
{
if(!BurstFiring) StartCoroutine("BurstFire");
}

}

void FireABullet()
{
GameObject.Instantiate(Bullet, Barrel.transform.position, Barrel.transform.rotation);
AudioClip clip = Resources.Load<AudioClip>("Gunshot");
AudioSource.PlayClipAtPoint(clip, transform.position);
}

}

IEnumerator AutoFire()
{
while (true)
@@ -53,8 +53,8 @@ IEnumerator AutoFire()
yield return new WaitForSeconds(minTime);
}

}

}

IEnumerator BurstFire()
{
BurstFiring = true;
@@ -65,5 +65,5 @@ IEnumerator BurstFire()
}
yield return new WaitForSeconds(TimeBetweenBursts);
BurstFiring = false;
}
}
}
}
File renamed without changes.
File renamed without changes.
@@ -1,8 +1,8 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Stats;

using System.Collections.Generic;
using Stats;

namespace Managers
{
public class PlayerStatusManager{
@@ -40,7 +40,7 @@ public PlayerStats(CharStats info)
internal static void PlayerExitedLevel(ActorComponent player)
{
GameplayManager.ConditionMet(GameplayManager.EndCondition.AllPlayersExited);
}
}
}
}

}
@@ -28,10 +28,17 @@ void Awake()
InitializeGame();
}

void Update()
{

}

protected virtual void InitializeGame()
{
GameManager = new GameplayManager();
this.LevelManager = new LevelManager();
}


}
}
File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.