| @@ -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} |
| @@ -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; | ||
| } | ||
| } | ||
| } |
| @@ -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(); | ||
| } | ||
| } | ||
| } |
| @@ -1980,9 +1980,6 @@ MonoBehaviour: | ||
| crouchSpeed: 2 | ||
| walkSpeed: 3 | ||
| runSpeed: 6 | ||
| rotationSpeed: 0.15 | ||
| gravity: 20 | ||
| aimPoint: {fileID: 4978014999194846} | ||