Improved character controller
This commit is contained in:
parent
7b97be4e9a
commit
0c5d5bbe59
12 changed files with 432 additions and 983 deletions
|
|
@ -1,489 +0,0 @@
|
|||
// GENERATED AUTOMATICALLY FROM 'Assets/Input/PlayerInputs.inputactions'
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
public class @PlayerInputs : IInputActionCollection, IDisposable
|
||||
{
|
||||
public InputActionAsset asset { get; }
|
||||
public @PlayerInputs()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
""name"": ""PlayerInputs"",
|
||||
""maps"": [
|
||||
{
|
||||
""name"": ""AlivePlayer"",
|
||||
""id"": ""8bf94838-9ca8-42b3-a990-4f60c8abff20"",
|
||||
""actions"": [
|
||||
{
|
||||
""name"": ""Move"",
|
||||
""type"": ""Value"",
|
||||
""id"": ""1f800577-0c5e-4125-b4ed-47b70445a516"",
|
||||
""expectedControlType"": ""Vector2"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""Jump"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""daed06f5-23cd-462a-9f1c-ae74c10af2e4"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""Crouch"",
|
||||
""type"": ""Value"",
|
||||
""id"": ""c6cc6b10-290e-4686-a68f-9ba33347989c"",
|
||||
""expectedControlType"": ""Integer"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""Look"",
|
||||
""type"": ""PassThrough"",
|
||||
""id"": ""87fa7a14-c047-4e6a-a340-eaecf0ebd43e"",
|
||||
""expectedControlType"": ""Vector2"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
},
|
||||
{
|
||||
""name"": ""Pause"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""ddaef88e-bbd6-45b6-80e8-698a200cbb67"",
|
||||
""expectedControlType"": ""Button"",
|
||||
""processors"": """",
|
||||
""interactions"": """"
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""62607822-e17b-4d69-ba88-0b72852efbb1"",
|
||||
""path"": ""<Keyboard>/space"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Jump"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""a2b55ccd-6229-4924-8f77-3051fd9a651a"",
|
||||
""path"": ""<XInputController>/buttonSouth"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XboxController"",
|
||||
""action"": ""Jump"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""bdf0eefc-47dc-4cc7-ab01-a45a893be2e7"",
|
||||
""path"": ""<Gamepad>/buttonSouth"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Android phone"",
|
||||
""action"": ""Jump"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""b08fd5b1-47d3-455b-b53f-eabd8ddfafbb"",
|
||||
""path"": ""<Keyboard>/ctrl"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Crouch"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""b167e894-11ae-4cda-ab81-4fabb553497a"",
|
||||
""path"": ""<XInputController>/leftStickPress"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XboxController"",
|
||||
""action"": ""Crouch"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""5816720f-ce42-4c0c-8af6-196a76d90562"",
|
||||
""path"": ""<Gamepad>/leftStickPress"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Android phone"",
|
||||
""action"": ""Crouch"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""0caeaf20-383a-4ba6-a532-7ef1afdf4a8e"",
|
||||
""path"": ""<Mouse>/delta"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Look"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""f25379a3-e24b-42e5-b333-05e83cb552d3"",
|
||||
""path"": ""<XInputController>/rightStick"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XboxController"",
|
||||
""action"": ""Look"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""2b4dd341-db48-46a3-904a-5cfffef028f7"",
|
||||
""path"": ""<Gamepad>/rightStick"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Android phone"",
|
||||
""action"": ""Look"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""2b857737-329d-4cb7-b82d-33c3d1b15a7f"",
|
||||
""path"": ""<Touchscreen>/delta"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Android phone"",
|
||||
""action"": ""Look"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""458610ce-2bc7-4bf3-9965-2ab4384682e6"",
|
||||
""path"": ""<Keyboard>/escape"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Pause"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""6c90411b-43e6-4cc5-9f70-6184fe64db7f"",
|
||||
""path"": ""<XInputController>/start"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XboxController"",
|
||||
""action"": ""Pause"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""1877ae4c-1937-4948-b7e8-2a3b4a90b337"",
|
||||
""path"": ""<Gamepad>/start"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Android phone"",
|
||||
""action"": ""Pause"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": ""WSAD"",
|
||||
""id"": ""877f83bc-2ed2-4fe6-864e-a27d135ff257"",
|
||||
""path"": ""2DVector(mode=2)"",
|
||||
""interactions"": ""Press"",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": true,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": ""up"",
|
||||
""id"": ""ba28d7f2-c6b8-4af9-bac1-e77f67fab80a"",
|
||||
""path"": ""<Keyboard>/w"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""down"",
|
||||
""id"": ""a2a78432-d184-4721-b73d-b617de497476"",
|
||||
""path"": ""<Keyboard>/s"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""left"",
|
||||
""id"": ""33ba911f-72c4-4cd3-8db8-ed6e534f70b4"",
|
||||
""path"": ""<Keyboard>/a"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""right"",
|
||||
""id"": ""73a94fd7-8940-4454-9d2c-3454092c36dc"",
|
||||
""path"": ""<Keyboard>/d"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""KeyboardAndMouse"",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""bca74622-720e-43ed-a499-4b2fddeff35d"",
|
||||
""path"": ""<XInputController>/leftStick"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""XboxController"",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""b6c8788f-4ad0-4741-a901-4e5c7e3f6891"",
|
||||
""path"": ""<Gamepad>/leftStick"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Android phone"",
|
||||
""action"": ""Move"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
""controlSchemes"": [
|
||||
{
|
||||
""name"": ""KeyboardAndMouse"",
|
||||
""bindingGroup"": ""KeyboardAndMouse"",
|
||||
""devices"": [
|
||||
{
|
||||
""devicePath"": ""<Keyboard>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
},
|
||||
{
|
||||
""devicePath"": ""<Mouse>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
""name"": ""XboxController"",
|
||||
""bindingGroup"": ""XboxController"",
|
||||
""devices"": [
|
||||
{
|
||||
""devicePath"": ""<XInputController>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
},
|
||||
{
|
||||
""devicePath"": ""<AndroidGamepadXboxController>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
""name"": ""Android phone"",
|
||||
""bindingGroup"": ""Android phone"",
|
||||
""devices"": [
|
||||
{
|
||||
""devicePath"": ""<Touchscreen>"",
|
||||
""isOptional"": false,
|
||||
""isOR"": false
|
||||
},
|
||||
{
|
||||
""devicePath"": ""<AndroidGamepadXboxController>"",
|
||||
""isOptional"": true,
|
||||
""isOR"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}");
|
||||
// AlivePlayer
|
||||
m_AlivePlayer = asset.FindActionMap("AlivePlayer", throwIfNotFound: true);
|
||||
m_AlivePlayer_Move = m_AlivePlayer.FindAction("Move", throwIfNotFound: true);
|
||||
m_AlivePlayer_Jump = m_AlivePlayer.FindAction("Jump", throwIfNotFound: true);
|
||||
m_AlivePlayer_Crouch = m_AlivePlayer.FindAction("Crouch", throwIfNotFound: true);
|
||||
m_AlivePlayer_Look = m_AlivePlayer.FindAction("Look", throwIfNotFound: true);
|
||||
m_AlivePlayer_Pause = m_AlivePlayer.FindAction("Pause", 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();
|
||||
}
|
||||
|
||||
// AlivePlayer
|
||||
private readonly InputActionMap m_AlivePlayer;
|
||||
private IAlivePlayerActions m_AlivePlayerActionsCallbackInterface;
|
||||
private readonly InputAction m_AlivePlayer_Move;
|
||||
private readonly InputAction m_AlivePlayer_Jump;
|
||||
private readonly InputAction m_AlivePlayer_Crouch;
|
||||
private readonly InputAction m_AlivePlayer_Look;
|
||||
private readonly InputAction m_AlivePlayer_Pause;
|
||||
public struct AlivePlayerActions
|
||||
{
|
||||
private @PlayerInputs m_Wrapper;
|
||||
public AlivePlayerActions(@PlayerInputs wrapper) { m_Wrapper = wrapper; }
|
||||
public InputAction @Move => m_Wrapper.m_AlivePlayer_Move;
|
||||
public InputAction @Jump => m_Wrapper.m_AlivePlayer_Jump;
|
||||
public InputAction @Crouch => m_Wrapper.m_AlivePlayer_Crouch;
|
||||
public InputAction @Look => m_Wrapper.m_AlivePlayer_Look;
|
||||
public InputAction @Pause => m_Wrapper.m_AlivePlayer_Pause;
|
||||
public InputActionMap Get() { return m_Wrapper.m_AlivePlayer; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
public bool enabled => Get().enabled;
|
||||
public static implicit operator InputActionMap(AlivePlayerActions set) { return set.Get(); }
|
||||
public void SetCallbacks(IAlivePlayerActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_AlivePlayerActionsCallbackInterface != null)
|
||||
{
|
||||
@Move.started -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnMove;
|
||||
@Move.performed -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnMove;
|
||||
@Move.canceled -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnMove;
|
||||
@Jump.started -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnJump;
|
||||
@Jump.performed -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnJump;
|
||||
@Jump.canceled -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnJump;
|
||||
@Crouch.started -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnCrouch;
|
||||
@Crouch.performed -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnCrouch;
|
||||
@Crouch.canceled -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnCrouch;
|
||||
@Look.started -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnLook;
|
||||
@Look.performed -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnLook;
|
||||
@Look.canceled -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnLook;
|
||||
@Pause.started -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnPause;
|
||||
@Pause.performed -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnPause;
|
||||
@Pause.canceled -= m_Wrapper.m_AlivePlayerActionsCallbackInterface.OnPause;
|
||||
}
|
||||
m_Wrapper.m_AlivePlayerActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
{
|
||||
@Move.started += instance.OnMove;
|
||||
@Move.performed += instance.OnMove;
|
||||
@Move.canceled += instance.OnMove;
|
||||
@Jump.started += instance.OnJump;
|
||||
@Jump.performed += instance.OnJump;
|
||||
@Jump.canceled += instance.OnJump;
|
||||
@Crouch.started += instance.OnCrouch;
|
||||
@Crouch.performed += instance.OnCrouch;
|
||||
@Crouch.canceled += instance.OnCrouch;
|
||||
@Look.started += instance.OnLook;
|
||||
@Look.performed += instance.OnLook;
|
||||
@Look.canceled += instance.OnLook;
|
||||
@Pause.started += instance.OnPause;
|
||||
@Pause.performed += instance.OnPause;
|
||||
@Pause.canceled += instance.OnPause;
|
||||
}
|
||||
}
|
||||
}
|
||||
public AlivePlayerActions @AlivePlayer => new AlivePlayerActions(this);
|
||||
private int m_KeyboardAndMouseSchemeIndex = -1;
|
||||
public InputControlScheme KeyboardAndMouseScheme
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_KeyboardAndMouseSchemeIndex == -1) m_KeyboardAndMouseSchemeIndex = asset.FindControlSchemeIndex("KeyboardAndMouse");
|
||||
return asset.controlSchemes[m_KeyboardAndMouseSchemeIndex];
|
||||
}
|
||||
}
|
||||
private int m_XboxControllerSchemeIndex = -1;
|
||||
public InputControlScheme XboxControllerScheme
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_XboxControllerSchemeIndex == -1) m_XboxControllerSchemeIndex = asset.FindControlSchemeIndex("XboxController");
|
||||
return asset.controlSchemes[m_XboxControllerSchemeIndex];
|
||||
}
|
||||
}
|
||||
private int m_AndroidphoneSchemeIndex = -1;
|
||||
public InputControlScheme AndroidphoneScheme
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_AndroidphoneSchemeIndex == -1) m_AndroidphoneSchemeIndex = asset.FindControlSchemeIndex("Android phone");
|
||||
return asset.controlSchemes[m_AndroidphoneSchemeIndex];
|
||||
}
|
||||
}
|
||||
public interface IAlivePlayerActions
|
||||
{
|
||||
void OnMove(InputAction.CallbackContext context);
|
||||
void OnJump(InputAction.CallbackContext context);
|
||||
void OnCrouch(InputAction.CallbackContext context);
|
||||
void OnLook(InputAction.CallbackContext context);
|
||||
void OnPause(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4abe0eaab01c1654daafd17bf72ed911
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,323 +0,0 @@
|
|||
{
|
||||
"name": "PlayerInputs",
|
||||
"maps": [
|
||||
{
|
||||
"name": "AlivePlayer",
|
||||
"id": "8bf94838-9ca8-42b3-a990-4f60c8abff20",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Move",
|
||||
"type": "Value",
|
||||
"id": "1f800577-0c5e-4125-b4ed-47b70445a516",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Jump",
|
||||
"type": "Button",
|
||||
"id": "daed06f5-23cd-462a-9f1c-ae74c10af2e4",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Crouch",
|
||||
"type": "Value",
|
||||
"id": "c6cc6b10-290e-4686-a68f-9ba33347989c",
|
||||
"expectedControlType": "Integer",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Look",
|
||||
"type": "PassThrough",
|
||||
"id": "87fa7a14-c047-4e6a-a340-eaecf0ebd43e",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
},
|
||||
{
|
||||
"name": "Pause",
|
||||
"type": "Button",
|
||||
"id": "ddaef88e-bbd6-45b6-80e8-698a200cbb67",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": ""
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "",
|
||||
"id": "62607822-e17b-4d69-ba88-0b72852efbb1",
|
||||
"path": "<Keyboard>/space",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a2b55ccd-6229-4924-8f77-3051fd9a651a",
|
||||
"path": "<XInputController>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XboxController",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "bdf0eefc-47dc-4cc7-ab01-a45a893be2e7",
|
||||
"path": "<Gamepad>/buttonSouth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Android phone",
|
||||
"action": "Jump",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b08fd5b1-47d3-455b-b53f-eabd8ddfafbb",
|
||||
"path": "<Keyboard>/ctrl",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Crouch",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b167e894-11ae-4cda-ab81-4fabb553497a",
|
||||
"path": "<XInputController>/leftStickPress",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XboxController",
|
||||
"action": "Crouch",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "5816720f-ce42-4c0c-8af6-196a76d90562",
|
||||
"path": "<Gamepad>/leftStickPress",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Android phone",
|
||||
"action": "Crouch",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "0caeaf20-383a-4ba6-a532-7ef1afdf4a8e",
|
||||
"path": "<Mouse>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f25379a3-e24b-42e5-b333-05e83cb552d3",
|
||||
"path": "<XInputController>/rightStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XboxController",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "2b4dd341-db48-46a3-904a-5cfffef028f7",
|
||||
"path": "<Gamepad>/rightStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Android phone",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "2b857737-329d-4cb7-b82d-33c3d1b15a7f",
|
||||
"path": "<Touchscreen>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Android phone",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "458610ce-2bc7-4bf3-9965-2ab4384682e6",
|
||||
"path": "<Keyboard>/escape",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Pause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "6c90411b-43e6-4cc5-9f70-6184fe64db7f",
|
||||
"path": "<XInputController>/start",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XboxController",
|
||||
"action": "Pause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "1877ae4c-1937-4948-b7e8-2a3b4a90b337",
|
||||
"path": "<Gamepad>/start",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Android phone",
|
||||
"action": "Pause",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "WSAD",
|
||||
"id": "877f83bc-2ed2-4fe6-864e-a27d135ff257",
|
||||
"path": "2DVector(mode=2)",
|
||||
"interactions": "Press",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "Move",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "ba28d7f2-c6b8-4af9-bac1-e77f67fab80a",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "a2a78432-d184-4721-b73d-b617de497476",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "33ba911f-72c4-4cd3-8db8-ed6e534f70b4",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "73a94fd7-8940-4454-9d2c-3454092c36dc",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardAndMouse",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "bca74622-720e-43ed-a499-4b2fddeff35d",
|
||||
"path": "<XInputController>/leftStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "XboxController",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "b6c8788f-4ad0-4741-a901-4e5c7e3f6891",
|
||||
"path": "<Gamepad>/leftStick",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Android phone",
|
||||
"action": "Move",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": [
|
||||
{
|
||||
"name": "KeyboardAndMouse",
|
||||
"bindingGroup": "KeyboardAndMouse",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Keyboard>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
},
|
||||
{
|
||||
"devicePath": "<Mouse>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "XboxController",
|
||||
"bindingGroup": "XboxController",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<XInputController>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
},
|
||||
{
|
||||
"devicePath": "<AndroidGamepadXboxController>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Android phone",
|
||||
"bindingGroup": "Android phone",
|
||||
"devices": [
|
||||
{
|
||||
"devicePath": "<Touchscreen>",
|
||||
"isOptional": false,
|
||||
"isOR": false
|
||||
},
|
||||
{
|
||||
"devicePath": "<AndroidGamepadXboxController>",
|
||||
"isOptional": true,
|
||||
"isOR": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 54e017de6d5fee54b852a5fe99fed430
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
||||
14
Assets/New Physic Material.physicMaterial
Normal file
14
Assets/New Physic Material.physicMaterial
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!134 &13400000
|
||||
PhysicMaterial:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New Physic Material
|
||||
dynamicFriction: 0.6
|
||||
staticFriction: 0.6
|
||||
bounciness: 0
|
||||
frictionCombine: 0
|
||||
bounceCombine: 0
|
||||
8
Assets/New Physic Material.physicMaterial.meta
Normal file
8
Assets/New Physic Material.physicMaterial.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 574450c1209e3f6458377b233c22fe1d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 13400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -135,16 +135,29 @@ GameObject:
|
|||
- component: {fileID: 327492105}
|
||||
- component: {fileID: 327492104}
|
||||
- component: {fileID: 327492103}
|
||||
- component: {fileID: 327492107}
|
||||
- component: {fileID: 327492102}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 327492107}
|
||||
m_Layer: 3
|
||||
m_Name: Capsule
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!54 &327492102
|
||||
--- !u!114 &327492102
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 327492101}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ec5d582fdf544e84d8dff955464dd912, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 1
|
||||
--- !u!54 &327492103
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -160,20 +173,6 @@ Rigidbody:
|
|||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!136 &327492103
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 327492101}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &327492104
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -230,27 +229,179 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 327492101}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1.27, z: 0}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1.27, z: -160}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1195983802}
|
||||
- {fileID: 1393452854}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &327492107
|
||||
MonoBehaviour:
|
||||
--- !u!136 &327492107
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 327492101}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
m_Radius: 0.5
|
||||
m_Height: 2
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &461855388
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 461855393}
|
||||
- component: {fileID: 461855392}
|
||||
- component: {fileID: 461855391}
|
||||
- component: {fileID: 461855390}
|
||||
- component: {fileID: 461855389}
|
||||
m_Layer: 0
|
||||
m_Name: Camera
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &461855389
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 461855388}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ec5d582fdf544e84d8dff955464dd912, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 1
|
||||
m_ShowDebugText: 0
|
||||
m_ShowCameraFrustum: 1
|
||||
m_IgnoreTimeScale: 0
|
||||
m_WorldUpOverride: {fileID: 0}
|
||||
m_UpdateMethod: 2
|
||||
m_BlendUpdateMethod: 1
|
||||
m_DefaultBlend:
|
||||
m_Style: 1
|
||||
m_Time: 2
|
||||
m_CustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve: []
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
m_CustomBlends: {fileID: 0}
|
||||
m_CameraCutEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_CameraActivatedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &461855390
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 461855388}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
--- !u!81 &461855391
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 461855388}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &461855392
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 461855388}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.01
|
||||
far clip plane: 1000
|
||||
field of view: 90
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &461855393
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 461855388}
|
||||
m_LocalRotation: {x: 0.3352392, y: -0.6225871, z: 0.3352392, w: 0.6225871}
|
||||
m_LocalPosition: {x: 9, y: 14.92, z: -160}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -344,7 +495,7 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &768760611
|
||||
--- !u!1 &868555978
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -352,114 +503,65 @@ GameObject:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 768760612}
|
||||
- component: {fileID: 768760615}
|
||||
- component: {fileID: 768760614}
|
||||
- component: {fileID: 768760613}
|
||||
m_Layer: 0
|
||||
m_Name: Camera
|
||||
- component: {fileID: 868555979}
|
||||
- component: {fileID: 868555980}
|
||||
m_Layer: 3
|
||||
m_Name: CM vcam1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &768760612
|
||||
--- !u!4 &868555979
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 768760611}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_GameObject: {fileID: 868555978}
|
||||
m_LocalRotation: {x: 0.3352392, y: -0.6225871, z: 0.3352392, w: 0.6225871}
|
||||
m_LocalPosition: {x: 9, y: 14.92, z: -160}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1195983802}
|
||||
m_RootOrder: 0
|
||||
m_Children:
|
||||
- {fileID: 1706117571}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &768760613
|
||||
--- !u!114 &868555980
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 768760611}
|
||||
m_GameObject: {fileID: 868555978}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
--- !u!81 &768760614
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 768760611}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &768760615
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 768760611}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
m_ExcludedPropertiesInInspector:
|
||||
- m_Script
|
||||
m_LockStageInInspector:
|
||||
m_StreamingVersion: 20170927
|
||||
m_Priority: 10
|
||||
m_StandbyUpdate: 2
|
||||
m_LookAt: {fileID: 327492106}
|
||||
m_Follow: {fileID: 327492106}
|
||||
m_Lens:
|
||||
FieldOfView: 90
|
||||
OrthographicSize: 5
|
||||
NearClipPlane: 0.01
|
||||
FarClipPlane: 1000
|
||||
Dutch: 0
|
||||
LensShift: {x: 0, y: 0}
|
||||
m_Transitions:
|
||||
m_BlendHint: 0
|
||||
m_InheritPosition: 0
|
||||
m_OnCameraLive:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_LegacyBlendHint: 0
|
||||
m_ComponentOwner: {fileID: 1706117571}
|
||||
--- !u!1 &904079452
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -556,7 +658,7 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1195983801
|
||||
--- !u!1 &1393452853
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -564,26 +666,184 @@ GameObject:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1195983802}
|
||||
m_Layer: 0
|
||||
m_Name: CamHolder
|
||||
- component: {fileID: 1393452854}
|
||||
- component: {fileID: 1393452857}
|
||||
- component: {fileID: 1393452856}
|
||||
- component: {fileID: 1393452855}
|
||||
m_Layer: 3
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1195983802
|
||||
--- !u!4 &1393452854
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1195983801}
|
||||
m_LocalRotation: {x: 0.27059805, y: -0.6532815, z: 0.27059805, w: 0.6532815}
|
||||
m_LocalPosition: {x: 4, y: 5, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 768760612}
|
||||
m_GameObject: {fileID: 1393452853}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.463, z: 0.62}
|
||||
m_LocalScale: {x: 0.25, y: 0.05, z: 0.4}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 327492106}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 45, y: -90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &1393452855
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1393452853}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &1393452856
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1393452853}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a3f0a185e9c462f4bbac7a2b56445843, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &1393452857
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1393452853}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1 &1706117570
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1706117571}
|
||||
- component: {fileID: 1706117574}
|
||||
- component: {fileID: 1706117573}
|
||||
- component: {fileID: 1706117572}
|
||||
m_Layer: 3
|
||||
m_Name: cm
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1706117571
|
||||
Transform:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1706117570}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 868555979}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1706117572
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1706117570}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_BindingMode: 4
|
||||
m_FollowOffset: {x: 9, y: 13.65, z: 0}
|
||||
m_XDamping: 1
|
||||
m_YDamping: 1
|
||||
m_ZDamping: 1
|
||||
m_AngularDampingMode: 0
|
||||
m_PitchDamping: 0
|
||||
m_YawDamping: 0
|
||||
m_RollDamping: 0
|
||||
m_AngularDamping: 0
|
||||
--- !u!114 &1706117573
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1706117570}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
|
||||
m_LookaheadTime: 0
|
||||
m_LookaheadSmoothing: 0
|
||||
m_LookaheadIgnoreY: 0
|
||||
m_HorizontalDamping: 0.5
|
||||
m_VerticalDamping: 0.5
|
||||
m_ScreenX: 0.5
|
||||
m_ScreenY: 0.5
|
||||
m_DeadZoneWidth: 0.54
|
||||
m_DeadZoneHeight: 0.43
|
||||
m_SoftZoneWidth: 0.8
|
||||
m_SoftZoneHeight: 0.8
|
||||
m_BiasX: 0
|
||||
m_BiasY: 0
|
||||
m_CenterOnActivate: 1
|
||||
--- !u!114 &1706117574
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1706117570}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
|
|
|||
|
|
@ -6,13 +6,14 @@ using UnityEngine;
|
|||
[RequireComponent(typeof(Rigidbody))]
|
||||
public class Dobber : MonoBehaviour
|
||||
{
|
||||
|
||||
Rigidbody rb;
|
||||
PlayerControls playerControls;
|
||||
float moveHorizontal;
|
||||
float moveVertical;
|
||||
[SerializeField]
|
||||
float moveSpeed;
|
||||
[SerializeField]
|
||||
float turnSpeed;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
|
@ -26,12 +27,17 @@ public class Dobber : MonoBehaviour
|
|||
playerControls.DobberControls.Enable();
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
Move();
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
#region calls to other voids
|
||||
#region calls to other voids
|
||||
Inputs();
|
||||
Move();
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
//this void assignes values to input virables
|
||||
|
|
@ -46,9 +52,11 @@ public class Dobber : MonoBehaviour
|
|||
void Move()
|
||||
{
|
||||
//new Vector3 for calculating movement values
|
||||
Vector3 move = new Vector3(moveHorizontal * 100 * moveSpeed * Time.deltaTime, rb.velocity.y, moveVertical * 100 * moveSpeed * Time.deltaTime);
|
||||
Vector3 move = new Vector3(0, 0, moveVertical * 100 * moveSpeed * Time.deltaTime);
|
||||
Quaternion rotate = Quaternion.Euler(transform.rotation.x, moveHorizontal * 100 * turnSpeed * Time.deltaTime, transform.rotation.z);
|
||||
//here we apply the movement related to the rotation of player
|
||||
rb.velocity = transform.right * move.x + transform.up * move.y + transform.forward * move.z;
|
||||
gameObject.transform.rotation = transform.rotation * rotate;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.cinemachine": "2.6.9",
|
||||
"com.unity.ide.rider": "2.0.7",
|
||||
"com.unity.ide.visualstudio": "2.0.11",
|
||||
"com.unity.ide.vscode": "1.2.3",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.cinemachine": {
|
||||
"version": "2.6.9",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ext.nunit": {
|
||||
"version": "1.0.6",
|
||||
"depth": 1,
|
||||
|
|
|
|||
|
|
@ -222,17 +222,4 @@ QualitySettings:
|
|||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
m_PerPlatformDefaultQuality:
|
||||
Android: 2
|
||||
Lumin: 5
|
||||
Nintendo 3DS: 5
|
||||
Nintendo Switch: 5
|
||||
PS4: 5
|
||||
PSP2: 2
|
||||
Stadia: 5
|
||||
Standalone: 5
|
||||
WebGL: 3
|
||||
Windows Store Apps: 5
|
||||
XboxOne: 5
|
||||
iPhone: 2
|
||||
tvOS: 2
|
||||
m_PerPlatformDefaultQuality: {}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
--- !u!78 &1
|
||||
TagManager:
|
||||
serializedVersion: 2
|
||||
tags: []
|
||||
tags:
|
||||
- Enviorment
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
- Ignore Raycast
|
||||
-
|
||||
- Player
|
||||
- Water
|
||||
- UI
|
||||
-
|
||||
|
|
|
|||
Loading…
Reference in a new issue