浏览代码

Added new Input System

/main
André McGrail 5 年前
当前提交
fde4e690
共有 12 个文件被更改,包括 1482 次插入256 次删除
  1. 177
      Assets/Objects/boats/Prefabs/_Boat.prefab
  2. 35
      Assets/Scripts/Boat/BoatController.cs
  3. 55
      Assets/Scripts/Boat/HumanController.cs
  4. 430
      Assets/scenes/Island.unity
  5. 6
      Assets/scenes/Island/GlobalFX Profile.asset
  6. 7
      Packages/manifest.json
  7. 4
      ProjectSettings/ProjectSettings.asset
  8. 10
      ProjectSettings/TagManager.asset
  9. 421
      Assets/Data/New Controls.inputactions
  10. 14
      Assets/Data/New Controls.inputactions.meta
  11. 568
      Assets/Scripts/GameSystem/InputControls.cs
  12. 11
      Assets/Scripts/GameSystem/InputControls.cs.meta

177
Assets/Objects/boats/Prefabs/_Boat.prefab


m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

- {fileID: 4566539937980892}
- {fileID: 4603238648617514}
- {fileID: 4154958958717284}
- {fileID: 2901399632790975270}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: -55.559002, z: 0}

m_Name:
m_EditorClassIdentifier:
Human: 0
PrimaryColor: {r: 0.8867924, g: 0.64780927, b: 0.079476655, a: 0}
TrimColor: {r: 0.15123336, g: 0.8962264, b: 0.08877714, a: 0}
RandomizeColors: 1
PrimaryColor: {r: 0.6066833, g: 0.080696166, b: 0.8069615, a: 1}
TrimColor: {r: 0.15882511, g: 0.06897104, b: 0.19303852, a: 1}
boatRenderer: {fileID: 23139903168929634}
--- !u!114 &114571606569623246
MonoBehaviour:

m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 3
m_RayTracingMode: 2
m_RenderingLayerMask: 4294967295
m_RendererPriority: 0
m_Materials:

m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &3138619813684846845
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2901399632790975270}
- component: {fileID: 2365855355768168390}
m_Layer: 31
m_Name: FollowCam
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2901399632790975270
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3138619813684846845}
m_LocalRotation: {x: 0.0307072, y: -0.0036797822, z: 0.00011331029, w: 0.9995217}
m_LocalPosition: {x: 0.059861183, y: 2, z: -4.6296153}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2704390242086546817}
m_Father: {fileID: 4534809148113994}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 1.7, y: 219.588, z: 0.009000001}
--- !u!114 &2365855355768168390
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3138619813684846845}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ExcludedPropertiesInInspector:
- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 0
m_LookAt: {fileID: 4534809148113994}
m_Follow: {fileID: 4534809148113994}
m_Lens:
FieldOfView: 80
OrthographicSize: 10
NearClipPlane: 0.25
FarClipPlane: 350
Dutch: 0
LensShift: {x: 0, y: 0}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0
m_OnCameraLive:
m_PersistentCalls:
m_Calls: []
m_TypeName: Cinemachine.CinemachineBrain+VcamActivatedEvent, Cinemachine, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 2704390242086546817}
--- !u!1 &8128372730392016786
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2704390242086546817}
- component: {fileID: 6914627326613298400}
- component: {fileID: 1046895372862771327}
- component: {fileID: 786896765500731348}
m_Layer: 0
m_Name: cm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2704390242086546817
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128372730392016786}
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: 2901399632790975270}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6914627326613298400
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128372730392016786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1046895372862771327
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128372730392016786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 1
m_FollowOffset: {x: 0, y: 2, z: -5}
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 2
m_RollDamping: 0
m_AngularDamping: 0
--- !u!114 &786896765500731348
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8128372730392016786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 1, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 10
m_LookaheadIgnoreY: 0
m_HorizontalDamping: 0.5
m_VerticalDamping: 0.5
m_ScreenX: 0.5
m_ScreenY: 0.5
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1

35
Assets/Scripts/Boat/BoatController.cs


using UnityEngine;
using System;
using UnityEngine;
using Random = UnityEngine.Random;
namespace BoatAttack.Boat
{

{
//Boat stats
public bool Human; // Is human
public bool RandomizeColors = true;
public Color PrimaryColor; // Boat primary colour
public Color TrimColor; // Boat secondary colour
public Renderer boatRenderer; // The renderer for the boat mesh

Random.InitState(this.gameObject.GetInstanceID() + DateTime.Now.Millisecond + DateTime.UtcNow.Second);
Randomize();
Colourize(); // Update the colour material property block
}

boatRenderer.material.SetColor("_Color1", PrimaryColor);
boatRenderer.material.SetColor("_Color2", TrimColor);
}
}
}
void Randomize()
{
if (RandomizeColors)
{
var H = Random.Range(0f, 1f);
var S = 0f;
var V = 0.9f;
var rand = Random.insideUnitCircle;
if (rand.x > 0.5f)
S = 0f;
else
S = 0.9f;
if (rand.y > 0.8f)
V = 0f;
else
V = Random.Range(0.5f, 0.9f);
var h2 = Mathf.Repeat(H + (rand.x + rand.y > 0 ? 0.5f : 0f), 1f);
var s2 = S <= 0.1f ? 0.9f : Random.Range(0.5f, 0.9f);
PrimaryColor = Color.HSVToRGB(H, S, V);
TrimColor = Color.HSVToRGB(h2, s2, 1f - V);
}
}
}

55
Assets/Scripts/Boat/HumanController.cs


using UnityEngine;
using System.Collections;
/// <summary>
/// This sends input controls to the boat engine if 'Human'
/// </summary>
/// <summary>
/// This sends input controls to the boat engine if 'Human'
/// </summary>
void Start()
public InputControls controls;
public float throttle;
public float steering;
void Awake()
controls = new InputControls();
controls.BoatControls.Trottle.performed += context => throttle = context.ReadValue<float>();
controls.BoatControls.Trottle.canceled += context => throttle = 0f;
controls.BoatControls.Steering.performed += context => steering = context.ReadValue<float>();
controls.BoatControls.Steering.canceled += context => steering = 0f;
private void OnEnable()
{
controls.BoatControls.Enable();
}
private void OnDisable()
{
controls.BoatControls.Disable();
}
////////////////////////////// Mobile controls - UNTESTED ////////////////////////////////
foreach (Touch touch in Input.touches) // Acceleration
{
if (touch.position.x >= Screen.width * 0.8f && touch.position.y <= Screen.height * 0.3f)
engine.Accel(1.0f);
}
if(Input.acceleration.x != 0f) // Turning
{
engine.Turn(Input.acceleration.x * 2f);
}
/////////////////////////////// Desktop/Controller controls ///////////////////////////////
if (Input.GetAxis("Accellerate") > 0.1f) // Acceleration
{
engine.Accel(1.0f);
}
float steer = Input.GetAxis("Horizontal");
if (Mathf.Abs(steer) > 0.05f) // Turning
{
engine.Turn(steer);
}
engine.Accel(throttle);
engine.Turn(steering);
}
}
}

430
Assets/scenes/Island.unity


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 208737145}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e1fda60c295b14bfe8a944976316d510, type: 3}
m_Name:

m_Modification:
m_TransformParent: {fileID: 305293681}
m_Modifications:
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.0000014305115
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.z
value: -5.0000014
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.09853759
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.00000008940697
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.99513334
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.00000017136335
objectReference: {fileID: 0}
- target: {fileID: 3138619813684846845, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 13
objectReference: {fileID: 0}
- target: {fileID: 4534809148113994, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
propertyPath: m_LocalPosition.x
value: 3

objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
value: 0.6152384
value: 0.2908223
value: 0.19575472
value: 0.056455925
value: 0.7830189
value: 0.5645591
value: 0.85264033
value: 0.28637695
value: 0.8773585
value: 0.4354409
value: 0.086908154
value: 0.11227228
objectReference: {fileID: 0}
- target: {fileID: 199152748015587266, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}

- {fileID: 153441713}
- {fileID: 1376922737}
- {fileID: 1210977310}
- {fileID: 1072933541}
- {fileID: 1115075796}
- {fileID: 624099549}
m_Father: {fileID: 208737146}

- {fileID: 1143740435}
- {fileID: 1768035351}
m_Father: {fileID: 324248881}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &624099551
MonoBehaviour:

m_AmplitudeGain: 1
m_FrequencyGain: 1
mNoiseOffsets: {x: -539.1776, y: -314.93887, z: 367.37033}
--- !u!1 &674142826
GameObject:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 674142827}
- component: {fileID: 674142830}
- component: {fileID: 674142828}
- component: {fileID: 674142829}
m_Layer: 0
m_Name: cm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &674142827
Transform:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674142826}
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: 1072933541}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &674142828
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674142826}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_BindingMode: 5
m_FollowOffset: {x: 0, y: 2, z: -4.63}
m_XDamping: 2.5
m_YDamping: 1
m_ZDamping: 1
m_AngularDampingMode: 0
m_PitchDamping: 0
m_YawDamping: 0
m_RollDamping: 0
m_AngularDamping: 0
--- !u!114 &674142829
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674142826}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 1.5, z: 3.5}
m_LookaheadTime: 0
m_LookaheadSmoothing: 10
m_LookaheadIgnoreY: 0
m_HorizontalDamping: 0.5
m_VerticalDamping: 0.5
m_ScreenX: 0.5
m_ScreenY: 0.5
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1
--- !u!114 &674142830
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674142826}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &674622423
GameObject:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 305293681}
m_Modifications:
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.09853759
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.00000008940697
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.00000017136335
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.99513334
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.0000023841858
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.z
value: -4.999999
objectReference: {fileID: 0}
- target: {fileID: 3138619813684846845, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 14
objectReference: {fileID: 0}
- target: {fileID: 4534809148113994, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
propertyPath: m_LocalPosition.x
value: -3

- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: PrimaryColor.r
value: 0.43921325
value: 0.7959785
value: 0.6792453
value: 0.6167086
value: 0.18262726
value: 0.07959787
value: 0
value: 0.20402151
value: 0
value: 0.1725247
value: 0
value: 0.0781571
objectReference: {fileID: 0}
- target: {fileID: 199152748015587266, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}

m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_RendererOverrideOption: 1
m_RendererData: {fileID: 0}
m_RendererOverrideOption: 0
m_RendererData: {fileID: 11400000, guid: fa301df1a78cf4a9ebe2a3139dc8be8f, type: 2}
m_Antialiasing: 1
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0

y: 0
width: 1
height: 1
near clip plane: 0.1
near clip plane: 0.25
far clip plane: 350
field of view: 80
orthographic: 0

serializedVersion: 2
m_Bits: 4294967295
m_Bits: 7735
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017609894}
m_LocalRotation: {x: 0.009573031, y: 0.9497188, z: -0.029177096, w: 0.31159484}
m_LocalPosition: {x: -88.44125, y: 2, z: -10.416151}
m_LocalRotation: {x: 0.030373309, y: 0.94667846, z: -0.093739614, w: 0.30674145}
m_LocalPosition: {x: -88.609985, y: 2, z: -10.0810375}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 208737146}

m_ClipPlaneOffset: -0.104
m_ReflectLayers:
serializedVersion: 2
m_Bits: 2147485975
m_Shadows: 0
m_Bits: 2147485719
m_Shadows: 1
target: {fileID: 633812931}
m_planeOffset: 0.24
--- !u!114 &1017609903

m_Modification:
m_TransformParent: {fileID: 305293681}
m_Modifications:
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.09853759
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.00000008940697
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.00000017136335
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.99513334
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.00000047683716
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.z
value: -5.0000024
objectReference: {fileID: 0}
- target: {fileID: 3138619813684846845, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 15
objectReference: {fileID: 0}
- target: {fileID: 4534809148113994, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
propertyPath: m_LocalPosition.x
value: 3

objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: RandomizeColors
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
value: 0.07843135
value: 0.26626712
value: 0.3155562
value: 0.08899529
value: 0.8862745
value: 0.8899527
value: 0.43624392
value: 0.048570264
value: 0.8113208
value: 0.031096486
value: 0.095674604
value: 0.11004728
objectReference: {fileID: 0}
- target: {fileID: 199152748015587266, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}

type: 3}
m_PrefabInstance: {fileID: 1064796500}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1072933540
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1072933541}
- component: {fileID: 1072933542}
m_Layer: 0
m_Name: FollowCam
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1072933541
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1072933540}
m_LocalRotation: {x: 0.009573031, y: 0.9497188, z: -0.029177096, w: 0.31159484}
m_LocalPosition: {x: -88.44125, y: 2, z: -10.416151}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 674142827}
m_Father: {fileID: 324248881}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 1.7, y: 219.588, z: 0.009000001}
--- !u!114 &1072933542
--- !u!114 &1072933542 stripped
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 2365855355768168390, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
m_PrefabInstance: {fileID: 1262981143}
m_GameObject: {fileID: 1072933540}
m_GameObject: {fileID: 0}
m_ExcludedPropertiesInInspector:
- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 597900507}
m_Follow: {fileID: 597900507}
m_Lens:
FieldOfView: 80
OrthographicSize: 10
NearClipPlane: 0.1
FarClipPlane: 350
Dutch: 0
LensShift: {x: 0, y: 0}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0
m_OnCameraLive:
m_PersistentCalls:
m_Calls: []
m_TypeName: Cinemachine.CinemachineBrain+VcamActivatedEvent, Cinemachine, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 674142827}
--- !u!1 &1074541164
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 324248881}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1143740434
GameObject:

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1143740434}
m_LocalRotation: {x: -0.0027673417, y: 0.9054671, z: -0.0059040007, w: -0.4243665}
m_LocalRotation: {x: -0.0027673438, y: 0.9054671, z: -0.005904, w: -0.42436647}
m_LocalPosition: {x: 42, y: 2.51, z: 62.1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_Modification:
m_TransformParent: {fileID: 305293681}
m_Modifications:
- target: {fileID: 8128372730392016786, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 12
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.09853758
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.000000059604645
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.000000059604645
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.99513334
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.0000009536743
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalPosition.z
value: -5.000004
objectReference: {fileID: 0}
- target: {fileID: 3138619813684846845, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 12
objectReference: {fileID: 0}
- target: {fileID: 4534809148113994, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
propertyPath: m_LocalPosition.x
value: -3

objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: Human
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114129291822198474, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
value: 0.8862745
value: 0
value: 0.16240746
value: 0
value: 0.07843135
value: 0
value: 0.8584906
value: 0.47470766
value: 0.8584906
value: 0.7668904
value: 0.8584906
value: 1
objectReference: {fileID: 0}
- target: {fileID: 199152748015587266, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1376922736}
m_LocalRotation: {x: -0.0132670235, y: 0.9827769, z: -0.16695733, w: -0.078094974}
m_LocalRotation: {x: -0.01326702, y: 0.9827769, z: -0.16695736, w: -0.078094944}
m_LocalPosition: {x: 69.76, y: 3.82, z: 81.16}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1768035350}
m_LocalRotation: {x: -0.0056329533, y: 0.98484004, z: -0.03257802, w: -0.1702853}
m_LocalRotation: {x: -0.0056329533, y: 0.98484004, z: -0.032578018, w: -0.1702853}
m_LocalPosition: {x: -52.17383, y: 5.022266, z: 35.95739}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:

m_Component:
- component: {fileID: 1901793631}
- component: {fileID: 1901793630}
- component: {fileID: 1901793629}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged

m_IsActive: 1
--- !u!114 &1901793629
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1901793628}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1901793630
MonoBehaviour:
m_ObjectHideFlags: 0

type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6589000190618102542, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.72625333
objectReference: {fileID: 0}
- target: {fileID: 6589000190618102542, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.68427867
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e70416e3bc35d4004a9981d0ac102ba5, type: 3}

6
Assets/scenes/Island/GlobalFX Profile.asset


m_Value: 0
quality:
m_OverrideState: 1
m_Value: 0
m_Value: 1
m_Value: 0.5
m_Value: 0.1
m_Value: 0.05
m_Value: 0.1
min: 0
max: 0.2
--- !u!114 &-207256469235845193

7
Packages/manifest.json


{
"registry": "https://staging-packages.unity.com",
"dependencies": {
"com.unity.burst": "1.1.0-preview.3",
"com.unity.burst": "1.1.1",
"com.unity.mathematics": "1.0.1",
"com.unity.ide.rider": "1.0.8",
"com.unity.inputsystem": "0.3.0-preview",
"com.unity.mathematics": "1.1.0",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.1.0",
"com.unity.ugui": "1.0.0",

"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"

4
ProjectSettings/ProjectSettings.asset


projectName:
organizationId:
cloudEnabled: 0
enableNativePlatformBackendsForNewInputSystem: 0
disableOldInputManagerSupport: 0
enableNativePlatformBackendsForNewInputSystem: 1
disableOldInputManagerSupport: 1
legacyClampBlendShapeWeights: 1

10
ProjectSettings/TagManager.asset


- UI
-
-
- PostFX
-
-
-
-
-
- Player1
- Player2
- Player3
- Player4
-
-
-

421
Assets/Data/New Controls.inputactions


{
"name": "New Controls",
"maps": [
{
"name": "BoatControls",
"id": "ef127e39-c6d2-4d6f-8edc-46296d5de0cb",
"actions": [
{
"name": "Trottle",
"id": "591093b7-743c-42e6-b71e-bab02d178bd1",
"expectedControlLayout": "Axis",
"continuous": true,
"passThrough": false,
"initialStateCheck": false,
"processors": "AxisDeadzone(min=0.1,max=1)",
"interactions": "",
"bindings": []
},
{
"name": "Steering",
"id": "67e3403a-b3e8-43af-ab52-4575ba23afef",
"expectedControlLayout": "Axis",
"continuous": true,
"passThrough": false,
"initialStateCheck": false,
"processors": "AxisDeadzone(min=0.1,max=1)",
"interactions": "",
"bindings": []
}
],
"bindings": [
{
"name": "Triggers",
"id": "3466fe24-0064-418d-9331-557be3fdcac4",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Trottle",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "eff0cde8-c5f9-43b6-86e8-8385017c8985",
"path": "<Gamepad>/leftTrigger",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "e7382d1c-3b18-4582-9511-5569c858581e",
"path": "<Gamepad>/rightTrigger",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "Buttons",
"id": "e1093b33-e798-4080-866e-f94010a4d7e0",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Trottle",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "b9957a1f-893b-4ee8-9579-667c3bb073d3",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "de45f7f3-08ae-4508-a9d8-aca8191f35a1",
"path": "<Gamepad>/buttonSouth",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "Arrows",
"id": "4caeca52-a08d-469a-a986-778564c27c84",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Trottle",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "6b1d89c6-a8e7-4b32-9c05-f848bb1064a8",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "b25a71de-239c-4d0a-8050-0169566cea38",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "WSAD",
"id": "1d540095-a749-43de-89cd-2806255106e3",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Trottle",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "c59fc22d-e257-4273-9159-4416a56a15d0",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "a91b562c-2ac5-4d79-9a5b-1f2e59241e92",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "Alt",
"id": "edd450a3-5814-4902-80ec-bcc25edd0366",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Trottle",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "71ae2e67-e9b6-4a48-9669-38e7fe243cbc",
"path": "<Keyboard>/z",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "a1291229-823b-4ede-82e6-090bc1bdfa21",
"path": "<Keyboard>/space",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "",
"id": "30ce0b9b-3da0-420a-abc3-8f2040388953",
"path": "<Touchscreen>/touch/position/y",
"interactions": "",
"processors": "Clamp(min=-1,max=1)",
"groups": "TouchScreen",
"action": "Trottle",
"isComposite": false,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "LeftThumbstick",
"id": "01df8425-ce9a-4024-bad4-0f5e8002094f",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Steering",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "3866264b-46e4-428b-9624-ada67f2de7bd",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "9a637b8c-8d48-42f2-9cef-114e3b8bb2ba",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": "Gamepad",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "DPad",
"id": "8aeee6b0-abef-4b03-a8b3-e592682ef6ac",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Steering",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "52a3b81b-20a0-4d9a-a700-4b0941383170",
"path": "<Gamepad>/dpad/left",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "3406ab27-525e-47ca-84d5-25e0a5a83c29",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "Arrows",
"id": "b5b408fa-df11-4ebc-b589-5ff03be94ba1",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Steering",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "010e7196-f4dd-4d5c-8f42-f47f3984bc01",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "36de1a52-c485-4d40-8d4d-323d8fe73445",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "WSAD",
"id": "24d9ae40-f8f8-4a39-abbe-68ce064083f8",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Steering",
"isComposite": true,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "negative",
"id": "c07695cd-a24b-4ba5-8162-fd6c1d55667a",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "positive",
"id": "72970fc1-f5b9-4e7b-bfb0-8356935a6274",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "Keyboard",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": true,
"modifiers": ""
},
{
"name": "",
"id": "3d3dbb25-9147-4e77-ae9d-04d1c01d2666",
"path": "<Touchscreen>/tilt/x",
"interactions": "",
"processors": "Clamp(min=-1,max=1)",
"groups": "TouchScreen",
"action": "Steering",
"isComposite": false,
"isPartOfComposite": false,
"modifiers": ""
}
]
}
],
"controlSchemes": [
{
"name": "Gamepad",
"basedOn": "",
"bindingGroup": "Gamepad",
"devices": [
{
"devicePath": "<Gamepad>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "Keyboard",
"basedOn": "",
"bindingGroup": "Keyboard",
"devices": [
{
"devicePath": "<Keyboard>",
"isOptional": false,
"isOR": false
}
]
},
{
"name": "TouchScreen",
"basedOn": "",
"bindingGroup": "TouchScreen",
"devices": [
{
"devicePath": "<Touchscreen>",
"isOptional": false,
"isOR": false
}
]
}
]
}

14
Assets/Data/New Controls.inputactions.meta


fileFormatVersion: 2
guid: 216207ae924c39842b5b2ad515311cfa
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 1
wrapperCodePath: Assets/Scripts/GameSystem/InputControls.cs
wrapperClassName: InputControls
wrapperCodeNamespace:

568
Assets/Scripts/GameSystem/InputControls.cs


// GENERATED AUTOMATICALLY FROM 'Assets/Data/New Controls.inputactions'
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public class InputControls : IInputActionCollection
{
private InputActionAsset asset;
public InputControls()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""New Controls"",
""maps"": [
{
""name"": ""BoatControls"",
""id"": ""ef127e39-c6d2-4d6f-8edc-46296d5de0cb"",
""actions"": [
{
""name"": ""Trottle"",
""id"": ""591093b7-743c-42e6-b71e-bab02d178bd1"",
""expectedControlLayout"": ""Axis"",
""continuous"": true,
""passThrough"": false,
""initialStateCheck"": false,
""processors"": ""AxisDeadzone(min=0.1,max=1)"",
""interactions"": """",
""bindings"": []
},
{
""name"": ""Steering"",
""id"": ""67e3403a-b3e8-43af-ab52-4575ba23afef"",
""expectedControlLayout"": ""Axis"",
""continuous"": true,
""passThrough"": false,
""initialStateCheck"": false,
""processors"": ""AxisDeadzone(min=0.1,max=1)"",
""interactions"": """",
""bindings"": []
}
],
""bindings"": [
{
""name"": ""Triggers"",
""id"": ""3466fe24-0064-418d-9331-557be3fdcac4"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Trottle"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""eff0cde8-c5f9-43b6-86e8-8385017c8985"",
""path"": ""<Gamepad>/leftTrigger"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""e7382d1c-3b18-4582-9511-5569c858581e"",
""path"": ""<Gamepad>/rightTrigger"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""Buttons"",
""id"": ""e1093b33-e798-4080-866e-f94010a4d7e0"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Trottle"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""b9957a1f-893b-4ee8-9579-667c3bb073d3"",
""path"": ""<Gamepad>/buttonEast"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""de45f7f3-08ae-4508-a9d8-aca8191f35a1"",
""path"": ""<Gamepad>/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""Arrows"",
""id"": ""4caeca52-a08d-469a-a986-778564c27c84"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Trottle"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""6b1d89c6-a8e7-4b32-9c05-f848bb1064a8"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""b25a71de-239c-4d0a-8050-0169566cea38"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""WSAD"",
""id"": ""1d540095-a749-43de-89cd-2806255106e3"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Trottle"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""c59fc22d-e257-4273-9159-4416a56a15d0"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""a91b562c-2ac5-4d79-9a5b-1f2e59241e92"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""Alt"",
""id"": ""edd450a3-5814-4902-80ec-bcc25edd0366"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Trottle"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""71ae2e67-e9b6-4a48-9669-38e7fe243cbc"",
""path"": ""<Keyboard>/z"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""a1291229-823b-4ede-82e6-090bc1bdfa21"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": """",
""id"": ""30ce0b9b-3da0-420a-abc3-8f2040388953"",
""path"": ""<Touchscreen>/touch/position/y"",
""interactions"": """",
""processors"": ""Clamp(min=-1,max=1)"",
""groups"": ""TouchScreen"",
""action"": ""Trottle"",
""isComposite"": false,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""LeftThumbstick"",
""id"": ""01df8425-ce9a-4024-bad4-0f5e8002094f"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Steering"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""3866264b-46e4-428b-9624-ada67f2de7bd"",
""path"": ""<Gamepad>/leftStick/left"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""9a637b8c-8d48-42f2-9cef-114e3b8bb2ba"",
""path"": ""<Gamepad>/leftStick/right"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""DPad"",
""id"": ""8aeee6b0-abef-4b03-a8b3-e592682ef6ac"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Steering"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""52a3b81b-20a0-4d9a-a700-4b0941383170"",
""path"": ""<Gamepad>/dpad/left"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""3406ab27-525e-47ca-84d5-25e0a5a83c29"",
""path"": ""<Gamepad>/dpad/right"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""Arrows"",
""id"": ""b5b408fa-df11-4ebc-b589-5ff03be94ba1"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Steering"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""010e7196-f4dd-4d5c-8f42-f47f3984bc01"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""36de1a52-c485-4d40-8d4d-323d8fe73445"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""WSAD"",
""id"": ""24d9ae40-f8f8-4a39-abbe-68ce064083f8"",
""path"": ""1DAxis"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Steering"",
""isComposite"": true,
""isPartOfComposite"": false,
""modifiers"": """"
},
{
""name"": ""negative"",
""id"": ""c07695cd-a24b-4ba5-8162-fd6c1d55667a"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": ""positive"",
""id"": ""72970fc1-f5b9-4e7b-bfb0-8356935a6274"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": true,
""modifiers"": """"
},
{
""name"": """",
""id"": ""3d3dbb25-9147-4e77-ae9d-04d1c01d2666"",
""path"": ""<Touchscreen>/tilt/x"",
""interactions"": """",
""processors"": ""Clamp(min=-1,max=1)"",
""groups"": ""TouchScreen"",
""action"": ""Steering"",
""isComposite"": false,
""isPartOfComposite"": false,
""modifiers"": """"
}
]
}
],
""controlSchemes"": [
{
""name"": ""Gamepad"",
""basedOn"": """",
""bindingGroup"": ""Gamepad"",
""devices"": [
{
""devicePath"": ""<Gamepad>"",
""isOptional"": false,
""isOR"": false
}
]
},
{
""name"": ""Keyboard"",
""basedOn"": """",
""bindingGroup"": ""Keyboard"",
""devices"": [
{
""devicePath"": ""<Keyboard>"",
""isOptional"": false,
""isOR"": false
}
]
},
{
""name"": ""TouchScreen"",
""basedOn"": """",
""bindingGroup"": ""TouchScreen"",
""devices"": [
{
""devicePath"": ""<Touchscreen>"",
""isOptional"": false,
""isOR"": false
}
]
}
]
}");
// BoatControls
m_BoatControls = asset.GetActionMap("BoatControls");
m_BoatControls_Trottle = m_BoatControls.GetAction("Trottle");
m_BoatControls_Steering = m_BoatControls.GetAction("Steering");
}
~InputControls()
{
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
{
get => 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();
}
// BoatControls
private InputActionMap m_BoatControls;
private IBoatControlsActions m_BoatControlsActionsCallbackInterface;
private InputAction m_BoatControls_Trottle;
private InputAction m_BoatControls_Steering;
public struct BoatControlsActions
{
private InputControls m_Wrapper;
public BoatControlsActions(InputControls wrapper) { m_Wrapper = wrapper; }
public InputAction @Trottle { get { return m_Wrapper.m_BoatControls_Trottle; } }
public InputAction @Steering { get { return m_Wrapper.m_BoatControls_Steering; } }
public InputActionMap Get() { return m_Wrapper.m_BoatControls; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled { get { return Get().enabled; } }
public InputActionMap Clone() { return Get().Clone(); }
public static implicit operator InputActionMap(BoatControlsActions set) { return set.Get(); }
public void SetCallbacks(IBoatControlsActions instance)
{
if (m_Wrapper.m_BoatControlsActionsCallbackInterface != null)
{
Trottle.started -= m_Wrapper.m_BoatControlsActionsCallbackInterface.OnTrottle;
Trottle.performed -= m_Wrapper.m_BoatControlsActionsCallbackInterface.OnTrottle;
Trottle.canceled -= m_Wrapper.m_BoatControlsActionsCallbackInterface.OnTrottle;
Steering.started -= m_Wrapper.m_BoatControlsActionsCallbackInterface.OnSteering;
Steering.performed -= m_Wrapper.m_BoatControlsActionsCallbackInterface.OnSteering;
Steering.canceled -= m_Wrapper.m_BoatControlsActionsCallbackInterface.OnSteering;
}
m_Wrapper.m_BoatControlsActionsCallbackInterface = instance;
if (instance != null)
{
Trottle.started += instance.OnTrottle;
Trottle.performed += instance.OnTrottle;
Trottle.canceled += instance.OnTrottle;
Steering.started += instance.OnSteering;
Steering.performed += instance.OnSteering;
Steering.canceled += instance.OnSteering;
}
}
}
public BoatControlsActions @BoatControls
{
get
{
return new BoatControlsActions(this);
}
}
private int m_GamepadSchemeIndex = -1;
public InputControlScheme GamepadScheme
{
get
{
if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.GetControlSchemeIndex("Gamepad");
return asset.controlSchemes[m_GamepadSchemeIndex];
}
}
private int m_KeyboardSchemeIndex = -1;
public InputControlScheme KeyboardScheme
{
get
{
if (m_KeyboardSchemeIndex == -1) m_KeyboardSchemeIndex = asset.GetControlSchemeIndex("Keyboard");
return asset.controlSchemes[m_KeyboardSchemeIndex];
}
}
private int m_TouchScreenSchemeIndex = -1;
public InputControlScheme TouchScreenScheme
{
get
{
if (m_TouchScreenSchemeIndex == -1) m_TouchScreenSchemeIndex = asset.GetControlSchemeIndex("TouchScreen");
return asset.controlSchemes[m_TouchScreenSchemeIndex];
}
}
public interface IBoatControlsActions
{
void OnTrottle(InputAction.CallbackContext context);
void OnSteering(InputAction.CallbackContext context);
}
}

11
Assets/Scripts/GameSystem/InputControls.cs.meta


fileFormatVersion: 2
guid: 28f3f037f6ca67c4d8b3c6ac364642e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存