Large diffs are not rendered by default.

@@ -0,0 +1,32 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!221 &22100000
AnimatorOverrideController:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: HackerController
m_Controller: {fileID: 9100000, guid: 45468bb434774614cab3a2166c198b8f, type: 2}
m_Clips:
- m_OriginalClip: {fileID: 7400000, guid: 904b9a8ec9da06a4b9bd519108cec0f8, type: 3}
m_OverrideClip: {fileID: 7400000, guid: 357178dc27584994ab50eee832ff7d35, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 2a87b90189670394c94e766f366e6213, type: 3}
m_OverrideClip: {fileID: 7400000, guid: 35d0299ec16f7134191c27d2b74e5db7, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: c226fc6172386db4683161e97562e98c, type: 3}
m_OverrideClip: {fileID: 7400000, guid: 0fc09f3a0d47bc6489beabf427ce91f7, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 0e00afbe892d9f4479e9d6b108dbca11, type: 3}
m_OverrideClip: {fileID: 7400000, guid: bb8148bab1186474e96b484a7f5b95d7, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 5f33fba32c99efb49ac964c31b1cf8d2, type: 3}
m_OverrideClip: {fileID: 7400000, guid: af83e8682780f0f45a3f96790571502b, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 88a2547e0e618594d978dcc575100c7d, type: 3}
m_OverrideClip: {fileID: 7400000, guid: 4409414ca52a5d74aac3044e54e1c4a5, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 6d281b220f5d2e64d9ee9219a5e9d836, type: 3}
m_OverrideClip: {fileID: 7400000, guid: 5bbfab07ae443e645bc1dbc3c7ae01c7, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: a233796a8edec6d48959ffb7f7b34969, type: 3}
m_OverrideClip: {fileID: 7400000, guid: b8283e48d6517084488e8ce64e5592fe, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 1bf457897e8edae47a732fdb9d07699e, type: 3}
m_OverrideClip: {fileID: 7400000, guid: af83e8682780f0f45a3f96790571502b, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: f2e7f27d43b152648b8b37dad7549c1f, type: 3}
m_OverrideClip: {fileID: 7400000, guid: d971e252a76082143ba5fdf99198d741, type: 3}
- m_OriginalClip: {fileID: 7400000, guid: 01bac51e1e259ed4abfa11bb7c5559cc, type: 3}
m_OverrideClip: {fileID: 7400000, guid: 5e18bd356dbbc5b43a1e801eb249aa8f, type: 3}

This file was deleted.

Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.

Large diffs are not rendered by default.

@@ -39,7 +39,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 5a1c4bec877bccb4ab360fb8fbcebe3f, type: 3}
m_Texture: {fileID: 2800000, guid: 376383e98fff6bd4dbdbab09db43492b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:

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.

@@ -0,0 +1,94 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Core
{
public class DebugInput : MonoBehaviour
{
public static DebugInput Instance
{
get { return s_Instance; }
}

protected static DebugInput s_Instance;

[HideInInspector]
public bool playerControllerInputBlocked;

protected Vector2 movement;
protected bool crouch;
protected bool aim;
protected bool m_Attack;
protected bool pause;
protected bool externalInputBlocked;

public Vector2 MoveInput
{
get
{
if (playerControllerInputBlocked || externalInputBlocked)
return Vector2.zero;
return movement;
}
}
public bool CrouchInput
{
get { return crouch && !playerControllerInputBlocked && !externalInputBlocked; }
}

public bool AimInput
{
get { return aim && !playerControllerInputBlocked && !externalInputBlocked; }
}

public bool Attack
{
get { return m_Attack && !playerControllerInputBlocked && !externalInputBlocked; }
}

public bool Pause
{
get { return pause; }
}

void Awake()
{
if (s_Instance == null)
s_Instance = this;
else if (s_Instance != this)
throw new UnityException("There cannot be more than one DebugInput script. The instances are " + s_Instance.name + " and " + name + ".");
}


void Update()
{
movement.Set(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
crouch = Input.GetButton("Crouch");

if (Input.GetButtonDown("Fire"))
{

}
if (Input.GetButtonDown("Aim"))
{

}
pause = Input.GetButtonDown("Pause");
}

public bool HaveControl()
{
return !externalInputBlocked;
}

public void ReleaseControl()
{
externalInputBlocked = true;
}

public void GainControl()
{
externalInputBlocked = false;
}
}
}
@@ -1,13 +1,9 @@
// ----------------------------------------------------------------------------
// Author: William O'Toole
// Project: BitRivet Framework
// Date: 20 JUNE 2018
// Date: 27 JUNE 2018
// ----------------------------------------------------------------------------
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif

namespace Core
{
@@ -106,34 +102,7 @@ protected bool InPause
}
#endregion

public Text someText;


void Start()
{
if (!alwaysDisplayMouse)
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
else
{
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}


}

public void Quit()
{
#if UNITY_EDITOR
EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
}


public void ExitPause()
{
InPause = true;
@@ -160,12 +129,6 @@ protected void SwitchPauseState()
if (InPause && Time.timeScale > 0 || !InPause && ScreenFader.IsFading)
return;

if (!alwaysDisplayMouse)
{
Cursor.lockState = InPause ? CursorLockMode.Locked : CursorLockMode.None;
Cursor.visible = !InPause;
}

if (InPause)
PlayerInput.Instance.GainControl();
else
@@ -14,6 +14,7 @@ namespace Core
public class IKCharacterControl : MonoBehaviour
{
// Components
public PlayerInput PlayerInput { get; private set; }
CharacterController controller;
Animator animator;
AimIK aimIK;
@@ -34,8 +35,6 @@ public class IKCharacterControl : MonoBehaviour
public float crouchSpeed = 2.0f;
public float walkSpeed = 3.0f;
public float runSpeed = 6.0f;
public bool aiming;
public bool crouching;
public float rotationSpeed = 0.15f;
public float gravity = 20.0f;
public Transform aimPoint;
@@ -45,6 +44,15 @@ public class IKCharacterControl : MonoBehaviour
// Use this for initialization
void Start ()
{
try
{
PlayerInput = FindObjectOfType<PlayerInput>();
}
catch (System.NullReferenceException)
{
throw new UnityException("There is no PlayerInput Script. Please add one.");
}

controller = GetComponent<CharacterController>();
animator = GetComponent<Animator>();
aimIK = GetComponent<AimIK>();
@@ -61,51 +69,38 @@ void Update()
//aiming = false;
if (controller.isGrounded)
{
float moveX = Input.GetAxisRaw("Horizontal");
float moveY = Input.GetAxisRaw("Vertical");
moveDirection = new Vector3(moveX, 0.0f, moveY);
moveDirection = new Vector3(PlayerInput.MoveInput.x, 0.0f, PlayerInput.MoveInput.y);

if (cameraTransform != null)
{
cameraForward = Vector3.Scale(cameraTransform.up, new Vector3(1, 0, 1)).normalized;
moveAnimation = moveY * cameraForward + moveX * cameraTransform.right;
moveAnimation = PlayerInput.MoveInput.y * cameraForward + PlayerInput.MoveInput.x * cameraTransform.right;
}
else
{
moveAnimation = moveY * Vector3.forward + moveX * Vector3.right;
moveAnimation = PlayerInput.MoveInput.y * Vector3.forward + PlayerInput.MoveInput.x * Vector3.right;
}
if (moveAnimation.sqrMagnitude > 1)
{
moveAnimation.Normalize();
}

if (Input.GetButton("Aim"))
if (PlayerInput.AimInput)
{
aimIK.enabled = true;
AimPoint();
currentSpeed = walkSpeed;
aiming = true;
currentSpeed = walkSpeed;
}
else
{
aimIK.enabled = false;
aiming = false;
}

if (Input.GetButton("Crouch"))
{
crouching = true;
}
else
{
crouching = false;
}
MovementAnimation(moveAnimation);
LegRotation(PlayerInput.AimInput);
}
LegRotation(aiming);
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime * currentSpeed);
//Debug.Log("Movement Speed: "+ currentSpeed);
}

private void MovementAnimation(Vector3 moveAnim)
@@ -121,8 +116,8 @@ private void MovementAnimation(Vector3 moveAnim)

animator.SetFloat("Forward", forwardAmount, 0.1f, Time.deltaTime);
animator.SetFloat("Turn", turnAmount, 0.1f, Time.deltaTime);
animator.SetBool("Aiming", aiming);
animator.SetBool("Crouching", crouching);
animator.SetBool("Aiming", PlayerInput.AimInput);
animator.SetBool("Crouching", PlayerInput.CrouchInput);
}

void LegRotation(bool aiming)
@@ -34,12 +34,12 @@ public Vector2 MoveInput
}
public bool CrouchInput
{
get { return crouch && !playerControllerInputBlocked && !externalInputBlocked; }
get { return Input.GetButton("Crouch") && !playerControllerInputBlocked && !externalInputBlocked; }
}

public bool AimInput
{
get { return aim && !playerControllerInputBlocked && !externalInputBlocked; }
get { return Input.GetButton("Aim") && !playerControllerInputBlocked && !externalInputBlocked; }
}

public bool Attack
@@ -52,15 +52,8 @@ public bool Pause
get { return pause; }
}

WaitForSeconds m_AttackInputWait;
Coroutine m_AttackWaitCoroutine;

const float k_AttackInputDuration = 0.03f;

void Awake()
{
m_AttackInputWait = new WaitForSeconds(k_AttackInputDuration);

if (s_Instance == null)
s_Instance = this;
else if (s_Instance != this)
@@ -73,14 +66,11 @@ void Update()
movement.Set(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
crouch = Input.GetButton("Crouch");

if (Input.GetButtonDown("Fire1"))
if (Input.GetButtonDown("Fire"))
{

}
if (Input.GetButtonDown("Aim"))
{

}
pause = Input.GetButtonDown("Pause");
}

@@ -10,6 +10,7 @@ namespace Core
[RequireComponent(typeof(CharacterController))]
public class TDCharacterControl : MonoBehaviour
{
public PlayerInput playerInput;
public float movementSpeed = 6.0f;
public float rotationSpeed = 0.15f;
public float lookSpeed = 20f;
@@ -37,28 +38,18 @@ void Update()
{
if (controller.isGrounded)
{
float moveHorizontal = Input.GetAxisRaw("Horizontal");
float moveVertical = Input.GetAxisRaw("Vertical");
moveDirection = new Vector3(moveHorizontal, 0.0f, moveVertical);
//float moveHorizontal = Input.GetAxisRaw("Horizontal");
//float moveVertical = Input.GetAxisRaw("Vertical");
moveDirection = new Vector3(playerInput.MoveInput.x, 0.0f, playerInput.MoveInput.y);

if (Input.GetMouseButton(1))
if (playerInput.AimInput)
{
Aiming();
}
else if (moveDirection != Vector3.zero)
{
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(moveDirection.normalized), rotationSpeed);
}

if (Input.GetButton("Jump"))
{
moveDirection.y = jumpSpeed;
}

if (Input.GetButton("Crouch"))
{

}
}
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime * movementSpeed);
@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Core
{
public class DummyDetect : MonoBehaviour
{

// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{

}
private void OnTriggerEnter(Collider other)
{
if(other.tag == "Player")
{

}
}
}
}

@@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8a52a1a939e1c554abe197103e9dac60, type: 3}
m_Name: SomeCrazyEvent
m_EditorClassIdentifier:
@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Core.Events
{
[CreateAssetMenu]
public class SomeEvent : ScriptableObject
{
/// <summary>
/// The list of listeners that this event will notify if it is raised.
/// </summary>
private readonly List<SomeListener> eventListeners =
new List<SomeListener>();

public void Raise()
{
for (int i = eventListeners.Count - 1; i >= 0; i--)
eventListeners[i].OnEventRaised();
}

public void RegisterListener(SomeListener listener)
{
if (!eventListeners.Contains(listener))
eventListeners.Add(listener);
}

public void UnregisterListener(SomeListener listener)
{
if (eventListeners.Contains(listener))
eventListeners.Remove(listener);
}
}
}
@@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

namespace Core.Events
{
public class SomeListener : MonoBehaviour
{
[Tooltip("Event to register with.")]
public SomeEvent Event;

[Tooltip("Response to invoke when Event is raised.")]
public UnityEvent Response;

private void OnEnable()
{
Event.RegisterListener(this);
}

private void OnDisable()
{
Event.UnregisterListener(this);
}

public void OnEventRaised()
{
Response.Invoke();
}
}
}

Large diffs are not rendered by default.

@@ -1980,9 +1980,6 @@ MonoBehaviour:
crouchSpeed: 2
walkSpeed: 3
runSpeed: 6
sprintSpeed: 10
aiming: 0
crouching: 0
rotationSpeed: 0.15
gravity: 20
aimPoint: {fileID: 4978014999194846}

Large diffs are not rendered by default.

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.
Binary file not shown.
Binary file not shown.
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657868, g: 0.49641263, b: 0.57481706, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@@ -89,7 +89,8 @@ LightmapSettings:
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_LightingDataAsset: {fileID: 112000002, guid: 632c2629b01f55243b69d244c1acd616,
type: 2}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
@@ -470,6 +471,11 @@ Prefab:
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 224980571069498762, guid: 35ac80520f4115e4baa8baedf46f4463,
type: 2}
propertyPath: m_AnchoredPosition.x
value: -0.000061035156
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 35ac80520f4115e4baa8baedf46f4463, type: 2}
m_IsPrefabParent: 0
Binary file not shown.
Binary file not shown.
@@ -213,3 +213,19 @@ InputManager:
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Pause
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: escape
altNegativeButton:
altPositiveButton: joystick button 1
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 0
invert: 0
type: 0
axis: 0
joyNum: 0