Added Animations. Changed inspector view for navpoints. A lot of fixes. Changed project structure.

This commit is contained in:
2022-05-09 21:31:21 +07:00
parent 6aa872c92f
commit d617ddabe7
166 changed files with 28460 additions and 2197 deletions

View File

@ -0,0 +1,35 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices: []
m_UpdateMode: 1
m_MaxEventBytesPerUpdate: 5242880
m_MaxQueuedEventsPerUpdate: 1000
m_CompensateForScreenOrientation: 1
m_BackgroundBehavior: 0
m_EditorInputBehaviorInPlayMode: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_ButtonReleaseThreshold: 0.75
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75
m_DisableRedundantEventsMerging: 0
m_iOSSettings:
m_MotionUsage:
m_Enabled: 0
m_Description:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4480bcbc35319b14588f3c0eb33e88c8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,354 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.3.0
// from Assets/Inputs/ThirdPersonViewInput.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public partial class @ThirdPersonViewInput : IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @ThirdPersonViewInput()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""ThirdPersonViewInput"",
""maps"": [
{
""name"": ""Player Movement"",
""id"": ""50a259c9-d17f-4483-bd4b-feb4e290989d"",
""actions"": [
{
""name"": ""Movement"",
""type"": ""PassThrough"",
""id"": ""be8e85db-0110-45cd-823f-1058ed7eb184"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Camera"",
""type"": ""PassThrough"",
""id"": ""f7ad7ce9-d43f-468d-ab0f-54cc66ac33fa"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": ""WASD"",
""id"": ""72e37b69-1a0d-4e6e-a5aa-7a2a62845d22"",
""path"": ""2DVector(mode=2)"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Movement"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""a5e60c10-53e0-484a-be45-210fc2d3d305"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Movement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""cdafb043-b1bc-4680-9d55-91854d1e2eb4"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Movement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""4da8623e-6baa-4256-99ec-d016f9ad6c1f"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Movement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""5c98d073-e749-49de-bb73-c6f5920f53f1"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Movement"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""d8db2334-67bd-461e-92dc-dc04f2b64660"",
""path"": ""<Mouse>/delta"",
""interactions"": """",
""processors"": ""NormalizeVector2"",
""groups"": """",
""action"": ""Camera"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Player Actions"",
""id"": ""7c28b681-44ce-4c44-832c-561051fceb49"",
""actions"": [
{
""name"": ""Jump"",
""type"": ""Button"",
""id"": ""ef60df41-7d24-45f4-a426-4e6b9fe4d374"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Crouch"",
""type"": ""Button"",
""id"": ""19075beb-f2d7-4af5-bbcc-e2b53e1e139a"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Fire"",
""type"": ""PassThrough"",
""id"": ""2b493869-f7ab-4acb-8918-11b0265f0993"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""e8b4d9c1-7565-4954-b6f9-f9c7ed95f613"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""a02f0962-5e78-44c2-aaf3-ee059376bda6"",
""path"": ""<Keyboard>/c"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Crouch"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""5caa47c3-a8d5-4aad-86fe-40cdca87210a"",
""path"": ""<Mouse>/leftButton"",
""interactions"": ""Hold(duration=0.1)"",
""processors"": """",
""groups"": """",
""action"": ""Fire"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// Player Movement
m_PlayerMovement = asset.FindActionMap("Player Movement", throwIfNotFound: true);
m_PlayerMovement_Movement = m_PlayerMovement.FindAction("Movement", throwIfNotFound: true);
m_PlayerMovement_Camera = m_PlayerMovement.FindAction("Camera", throwIfNotFound: true);
// Player Actions
m_PlayerActions = asset.FindActionMap("Player Actions", throwIfNotFound: true);
m_PlayerActions_Jump = m_PlayerActions.FindAction("Jump", throwIfNotFound: true);
m_PlayerActions_Crouch = m_PlayerActions.FindAction("Crouch", throwIfNotFound: true);
m_PlayerActions_Fire = m_PlayerActions.FindAction("Fire", throwIfNotFound: true);
}
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
public ReadOnlyArray<InputDevice>? devices
{
get => asset.devices;
set => asset.devices = value;
}
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
public IEnumerator<InputAction> GetEnumerator()
{
return asset.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Enable()
{
asset.Enable();
}
public void Disable()
{
asset.Disable();
}
public IEnumerable<InputBinding> bindings => asset.bindings;
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
{
return asset.FindAction(actionNameOrId, throwIfNotFound);
}
public int FindBinding(InputBinding bindingMask, out InputAction action)
{
return asset.FindBinding(bindingMask, out action);
}
// Player Movement
private readonly InputActionMap m_PlayerMovement;
private IPlayerMovementActions m_PlayerMovementActionsCallbackInterface;
private readonly InputAction m_PlayerMovement_Movement;
private readonly InputAction m_PlayerMovement_Camera;
public struct PlayerMovementActions
{
private @ThirdPersonViewInput m_Wrapper;
public PlayerMovementActions(@ThirdPersonViewInput wrapper) { m_Wrapper = wrapper; }
public InputAction @Movement => m_Wrapper.m_PlayerMovement_Movement;
public InputAction @Camera => m_Wrapper.m_PlayerMovement_Camera;
public InputActionMap Get() { return m_Wrapper.m_PlayerMovement; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(PlayerMovementActions set) { return set.Get(); }
public void SetCallbacks(IPlayerMovementActions instance)
{
if (m_Wrapper.m_PlayerMovementActionsCallbackInterface != null)
{
@Movement.started -= m_Wrapper.m_PlayerMovementActionsCallbackInterface.OnMovement;
@Movement.performed -= m_Wrapper.m_PlayerMovementActionsCallbackInterface.OnMovement;
@Movement.canceled -= m_Wrapper.m_PlayerMovementActionsCallbackInterface.OnMovement;
@Camera.started -= m_Wrapper.m_PlayerMovementActionsCallbackInterface.OnCamera;
@Camera.performed -= m_Wrapper.m_PlayerMovementActionsCallbackInterface.OnCamera;
@Camera.canceled -= m_Wrapper.m_PlayerMovementActionsCallbackInterface.OnCamera;
}
m_Wrapper.m_PlayerMovementActionsCallbackInterface = instance;
if (instance != null)
{
@Movement.started += instance.OnMovement;
@Movement.performed += instance.OnMovement;
@Movement.canceled += instance.OnMovement;
@Camera.started += instance.OnCamera;
@Camera.performed += instance.OnCamera;
@Camera.canceled += instance.OnCamera;
}
}
}
public PlayerMovementActions @PlayerMovement => new PlayerMovementActions(this);
// Player Actions
private readonly InputActionMap m_PlayerActions;
private IPlayerActionsActions m_PlayerActionsActionsCallbackInterface;
private readonly InputAction m_PlayerActions_Jump;
private readonly InputAction m_PlayerActions_Crouch;
private readonly InputAction m_PlayerActions_Fire;
public struct PlayerActionsActions
{
private @ThirdPersonViewInput m_Wrapper;
public PlayerActionsActions(@ThirdPersonViewInput wrapper) { m_Wrapper = wrapper; }
public InputAction @Jump => m_Wrapper.m_PlayerActions_Jump;
public InputAction @Crouch => m_Wrapper.m_PlayerActions_Crouch;
public InputAction @Fire => m_Wrapper.m_PlayerActions_Fire;
public InputActionMap Get() { return m_Wrapper.m_PlayerActions; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(PlayerActionsActions set) { return set.Get(); }
public void SetCallbacks(IPlayerActionsActions instance)
{
if (m_Wrapper.m_PlayerActionsActionsCallbackInterface != null)
{
@Jump.started -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnJump;
@Jump.performed -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnJump;
@Jump.canceled -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnJump;
@Crouch.started -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnCrouch;
@Crouch.performed -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnCrouch;
@Crouch.canceled -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnCrouch;
@Fire.started -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnFire;
@Fire.performed -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnFire;
@Fire.canceled -= m_Wrapper.m_PlayerActionsActionsCallbackInterface.OnFire;
}
m_Wrapper.m_PlayerActionsActionsCallbackInterface = instance;
if (instance != null)
{
@Jump.started += instance.OnJump;
@Jump.performed += instance.OnJump;
@Jump.canceled += instance.OnJump;
@Crouch.started += instance.OnCrouch;
@Crouch.performed += instance.OnCrouch;
@Crouch.canceled += instance.OnCrouch;
@Fire.started += instance.OnFire;
@Fire.performed += instance.OnFire;
@Fire.canceled += instance.OnFire;
}
}
}
public PlayerActionsActions @PlayerActions => new PlayerActionsActions(this);
public interface IPlayerMovementActions
{
void OnMovement(InputAction.CallbackContext context);
void OnCamera(InputAction.CallbackContext context);
}
public interface IPlayerActionsActions
{
void OnJump(InputAction.CallbackContext context);
void OnCrouch(InputAction.CallbackContext context);
void OnFire(InputAction.CallbackContext context);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e6b0597c7a248fd4e8e5ca2ef5d7f29f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,166 @@
{
"name": "ThirdPersonViewInput",
"maps": [
{
"name": "Player Movement",
"id": "50a259c9-d17f-4483-bd4b-feb4e290989d",
"actions": [
{
"name": "Movement",
"type": "PassThrough",
"id": "be8e85db-0110-45cd-823f-1058ed7eb184",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Camera",
"type": "PassThrough",
"id": "f7ad7ce9-d43f-468d-ab0f-54cc66ac33fa",
"expectedControlType": "Vector2",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "WASD",
"id": "72e37b69-1a0d-4e6e-a5aa-7a2a62845d22",
"path": "2DVector(mode=2)",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "a5e60c10-53e0-484a-be45-210fc2d3d305",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "cdafb043-b1bc-4680-9d55-91854d1e2eb4",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "4da8623e-6baa-4256-99ec-d016f9ad6c1f",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "5c98d073-e749-49de-bb73-c6f5920f53f1",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "",
"action": "Movement",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "d8db2334-67bd-461e-92dc-dc04f2b64660",
"path": "<Mouse>/delta",
"interactions": "",
"processors": "NormalizeVector2",
"groups": "",
"action": "Camera",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "Player Actions",
"id": "7c28b681-44ce-4c44-832c-561051fceb49",
"actions": [
{
"name": "Jump",
"type": "Button",
"id": "ef60df41-7d24-45f4-a426-4e6b9fe4d374",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Crouch",
"type": "Button",
"id": "19075beb-f2d7-4af5-bbcc-e2b53e1e139a",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Fire",
"type": "PassThrough",
"id": "2b493869-f7ab-4acb-8918-11b0265f0993",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "e8b4d9c1-7565-4954-b6f9-f9c7ed95f613",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "",
"action": "Jump",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "a02f0962-5e78-44c2-aaf3-ee059376bda6",
"path": "<Keyboard>/c",
"interactions": "",
"processors": "",
"groups": "",
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "5caa47c3-a8d5-4aad-86fe-40cdca87210a",
"path": "<Mouse>/leftButton",
"interactions": "Hold(duration=0.1)",
"processors": "",
"groups": "",
"action": "Fire",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": []
}

View File

@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: a17c8887bfca8834d8287fab2f0cadf8
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 1
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace: