Strip down to just input system itself, without the demo scenes and assets. This allows using as nested repository in multiple projects.
This commit is contained in:
Родитель
deac59eb22
Коммит
b3f364898a
|
@ -1,9 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c2b74d235406c462491ea624ddff153b
|
||||
folderAsset: yes
|
||||
timeCreated: 1448545813
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,9 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 521693cd2c6ca43f7b63598008dd1ed6
|
||||
folderAsset: yes
|
||||
timeCreated: 1439303925
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,138 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Black
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 10305, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Cutoff
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _Parallax
|
||||
second: .0199999996
|
||||
data:
|
||||
first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _Glossiness
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b46d87009a4c145c6891eab363aff04d
|
||||
timeCreated: 1439303889
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Двоичные данные
Assets/Demo/Assets/ButtonSpacebarSprite.png
Двоичные данные
Assets/Demo/Assets/ButtonSpacebarSprite.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 3.4 KiB |
|
@ -1,53 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3d8675433a508ec47b8f895201eacf20
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
21300000: JumpButton
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
filterMode: 1
|
||||
aniso: 16
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 40, y: 40, z: 40, w: 40}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
Двоичные данные
Assets/Demo/Assets/ButtonThumbstickUpSprite.png
Двоичные данные
Assets/Demo/Assets/ButtonThumbstickUpSprite.png
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 8.1 KiB |
|
@ -1,52 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9866a92691696b346901281f2b329034
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
linearTexture: 0
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: .25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 8
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 256
|
||||
textureSettings:
|
||||
filterMode: 1
|
||||
aniso: 16
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: .5, y: .5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 8
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
|
@ -1,128 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &111794
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 419880}
|
||||
- 114: {fileID: 11481032}
|
||||
- 114: {fileID: 11465786}
|
||||
- 114: {fileID: 11484220}
|
||||
- 114: {fileID: 11403636}
|
||||
- 114: {fileID: 11469920}
|
||||
- 114: {fileID: 11463854}
|
||||
- 114: {fileID: 11448536}
|
||||
m_Layer: 0
|
||||
m_Name: Controller
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &419880
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
--- !u!114 &11403636
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2b151f756c495834fa63f07ea366132a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &11448536
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 53b34d6500cdc4b47b70e4834694fd5c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &11463854
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 776e5fc7985e7f64fa92c05511f18927, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &11465786
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0bc9e4d06df9449e89dde99e67fbd830, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profiles: []
|
||||
--- !u!114 &11469920
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 330c8870b308a774a82a43198e179c33, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &11481032
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fa2ae5dc56e8f0946bd21197f7ad682a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profiles:
|
||||
- {fileID: 11400000, guid: 1f0b6f1051a864d66ab7abeff1df6464, type: 2}
|
||||
- {fileID: 11400000, guid: 891fa6df0f6fd4f2da335b1f251f3a84, type: 2}
|
||||
--- !u!114 &11484220
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 111794}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 69b9f73264982e34197f4f0c12305253, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 111794}
|
||||
m_IsPrefabParent: 1
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4200e450a210b4616a6abe294f16a795
|
||||
timeCreated: 1448544797
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,385 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 24e5bc088c9caeb44bc4283dc321b033, type: 3}
|
||||
m_Name: FirstPersonControls
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions:
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 1
|
||||
name: MoveX
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 1
|
||||
name: MoveY
|
||||
- m_ControlData:
|
||||
componentControlIndices: 0000000001000000
|
||||
controlType: 3
|
||||
name: Move
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 1
|
||||
name: LookX
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 1
|
||||
name: LookY
|
||||
- m_ControlData:
|
||||
componentControlIndices: 0300000004000000
|
||||
controlType: 3
|
||||
name: Look
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 0
|
||||
name: Fire
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 0
|
||||
name: Menu
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 0
|
||||
name: LockCursor
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 0
|
||||
name: UnlockCursor
|
||||
- m_ControlData:
|
||||
componentControlIndices:
|
||||
controlType: 0
|
||||
name: Reconfigure
|
||||
m_ControlSchemes:
|
||||
- m_Name: KeyboardMouse
|
||||
m_Bindings:
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources:
|
||||
- negative:
|
||||
controlIndex: 113
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
positive:
|
||||
controlIndex: 100
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
- negative:
|
||||
controlIndex: 276
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
positive:
|
||||
controlIndex: 275
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 1
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources:
|
||||
- negative:
|
||||
controlIndex: 115
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
positive:
|
||||
controlIndex: 119
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
- negative:
|
||||
controlIndex: 274
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
positive:
|
||||
controlIndex: 273
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 1
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 9
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Pointer, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 10
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Pointer, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 15
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Pointer, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 32
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 15
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Pointer, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 27
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 114
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Keyboard, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- m_Name: Gamepad
|
||||
m_Bindings:
|
||||
- sources:
|
||||
- controlIndex: 0
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Gamepad, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 1
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Gamepad, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 3
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Gamepad, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 4
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Gamepad, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 15
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Gamepad, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 22
|
||||
m_DeviceTypeName: UnityEngine.InputNew.Gamepad, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- m_Name: VirtualJoystick
|
||||
m_Bindings:
|
||||
- sources:
|
||||
- controlIndex: 0
|
||||
m_DeviceTypeName: UnityEngine.InputNew.VirtualJoystick, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 1
|
||||
m_DeviceTypeName: UnityEngine.InputNew.VirtualJoystick, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 2
|
||||
m_DeviceTypeName: UnityEngine.InputNew.VirtualJoystick, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 3
|
||||
m_DeviceTypeName: UnityEngine.InputNew.VirtualJoystick, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 4
|
||||
m_DeviceTypeName: UnityEngine.InputNew.VirtualJoystick, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources:
|
||||
- controlIndex: 14
|
||||
m_DeviceTypeName: UnityEngine.InputNew.VirtualJoystick, Assembly-CSharp, Version=0.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
||||
- sources: []
|
||||
deadZone: .300000012
|
||||
buttonAxisSources: []
|
||||
gravity: 1000
|
||||
sensitivity: 1000
|
||||
snap: 1
|
||||
primaryIsButtonAxis: 0
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 24548a596fd7f47dfa0d33e0d38d0dbd
|
||||
timeCreated: 1447957621
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,20 +0,0 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.InputNew;
|
||||
|
||||
// GENERATED FILE - DO NOT EDIT MANUALLY
|
||||
public class FirstPersonControls : ActionMapInput {
|
||||
public FirstPersonControls (ActionMap actionMap) : base (actionMap) { }
|
||||
public FirstPersonControls (ControlSchemeInput controlSchemeInput) : base (controlSchemeInput) { }
|
||||
|
||||
public AxisInputControl @moveX { get { return (AxisInputControl)this[0]; } }
|
||||
public AxisInputControl @moveY { get { return (AxisInputControl)this[1]; } }
|
||||
public Vector2InputControl @move { get { return (Vector2InputControl)this[2]; } }
|
||||
public AxisInputControl @lookX { get { return (AxisInputControl)this[3]; } }
|
||||
public AxisInputControl @lookY { get { return (AxisInputControl)this[4]; } }
|
||||
public Vector2InputControl @look { get { return (Vector2InputControl)this[5]; } }
|
||||
public ButtonInputControl @fire { get { return (ButtonInputControl)this[6]; } }
|
||||
public ButtonInputControl @menu { get { return (ButtonInputControl)this[7]; } }
|
||||
public ButtonInputControl @lockCursor { get { return (ButtonInputControl)this[8]; } }
|
||||
public ButtonInputControl @unlockCursor { get { return (ButtonInputControl)this[9]; } }
|
||||
public ButtonInputControl @reconfigure { get { return (ButtonInputControl)this[10]; } }
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 17df4e4b1ba5443adac98de219402793
|
||||
timeCreated: 1445358572
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fb8afa4e7f37746b191b1080b74a8737
|
||||
timeCreated: 1439303940
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,130 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &171512
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 4
|
||||
m_Component:
|
||||
- 4: {fileID: 447610}
|
||||
- 33: {fileID: 3334922}
|
||||
- 65: {fileID: 6549984}
|
||||
- 23: {fileID: 2349160}
|
||||
- 54: {fileID: 5463056}
|
||||
m_Layer: 0
|
||||
m_Name: Projectile
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &447610
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 171512}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: .5, y: .5, z: .5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
--- !u!23 &2349160
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 171512}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_SubsetIndices:
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_UseLightProbes: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 1
|
||||
m_ImportantGI: 0
|
||||
m_AutoUVMaxDistance: .5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &3334922
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 171512}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!54 &5463056
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 171512}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: .0500000007
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 1
|
||||
--- !u!65 &6549984
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 171512}
|
||||
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!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: .5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: .5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: .5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 0}
|
||||
propertyPath: m_CollisionDetection
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 171512}
|
||||
m_IsPrefabParent: 1
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 35bb1b2b246f2924c9e37e30f454c7ee
|
||||
timeCreated: 1439296163
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,138 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: White
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 10305, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _BumpMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _ParallaxMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _EmissionMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 10, y: 10}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailMask
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _DetailAlbedoMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
data:
|
||||
first:
|
||||
name: _MetallicGlossMap
|
||||
second:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _SrcBlend
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DstBlend
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Cutoff
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _Parallax
|
||||
second: .0199999996
|
||||
data:
|
||||
first:
|
||||
name: _ZWrite
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _Glossiness
|
||||
second: .5
|
||||
data:
|
||||
first:
|
||||
name: _BumpScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _OcclusionStrength
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _DetailNormalMapScale
|
||||
second: 1
|
||||
data:
|
||||
first:
|
||||
name: _UVSec
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Mode
|
||||
second: 0
|
||||
data:
|
||||
first:
|
||||
name: _Metallic
|
||||
second: 0
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _EmissionColor
|
||||
second: {r: 0, g: 0, b: 0, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: eb572b57293d24315994d77ab8406c84
|
||||
timeCreated: 1439304449
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,9 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bb32c5a0b9aca46a8aa5f6a568aeccf8
|
||||
folderAsset: yes
|
||||
timeCreated: 1448545820
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ff348d70b257d456c8554852ee3f11d2
|
||||
timeCreated: 1441198171
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 12525ed3f1ff842a980fbd9f33def67e
|
||||
timeCreated: 1439304678
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,9 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 88d9c5f1617cb4459876d4845eaf77d6
|
||||
folderAsset: yes
|
||||
timeCreated: 1439384528
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,150 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.InputNew;
|
||||
using Random = UnityEngine.Random;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class CharacterInputController
|
||||
: MonoBehaviour
|
||||
{
|
||||
FirstPersonControls m_PlayerInput;
|
||||
Rigidbody m_Rigid;
|
||||
Vector2 m_Rotation = Vector2.zero;
|
||||
float m_TimeOfLastShot;
|
||||
|
||||
[FormerlySerializedAs("controlMap")]
|
||||
public ActionMap actionMap;
|
||||
|
||||
[Space(10)]
|
||||
|
||||
public int playerIndex = -1;
|
||||
public Transform head;
|
||||
public float moveSpeed = 5;
|
||||
public GameObject projectile;
|
||||
public float timeBetweenShots = 0.5f;
|
||||
|
||||
[Space(10)]
|
||||
|
||||
public CubeSizer sizer;
|
||||
public Text controlsText;
|
||||
public RuntimeRebinding rebinder;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (playerIndex == -1)
|
||||
{
|
||||
playerIndex = InputSystem.CreatePlayerHandle(actionMap, false).index;
|
||||
SetupPlayer(playerIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetupPlayer(int playerIndex)
|
||||
{
|
||||
this.playerIndex = playerIndex;
|
||||
m_PlayerInput = InputSystem.GetPlayerHandle(playerIndex).GetActions<FirstPersonControls>();
|
||||
m_PlayerInput.active = true;
|
||||
|
||||
if (sizer != null)
|
||||
sizer.playerIndex = playerIndex;
|
||||
if (rebinder != null)
|
||||
rebinder.Initialize(m_PlayerInput.currentControlScheme);
|
||||
|
||||
m_Rigid = GetComponent<Rigidbody>();
|
||||
LockCursor(true);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
// Move
|
||||
var move = m_PlayerInput.move.vector2;
|
||||
|
||||
Vector3 velocity = transform.TransformDirection(new Vector3(move.x, 0, move.y)) * moveSpeed;
|
||||
m_Rigid.velocity = new Vector3(velocity.x, m_Rigid.velocity.y, velocity.z);
|
||||
|
||||
// Look
|
||||
var look = m_PlayerInput.look.vector2;
|
||||
|
||||
m_Rotation.y += look.x;
|
||||
m_Rotation.x = Mathf.Clamp(m_Rotation.x - look.y, -89, 89);
|
||||
|
||||
transform.localEulerAngles = new Vector3(0, m_Rotation.y, 0);
|
||||
head.localEulerAngles = new Vector3(m_Rotation.x, 0, 0);
|
||||
|
||||
// Fire
|
||||
var fire = m_PlayerInput.fire.isHeld;
|
||||
if (fire)
|
||||
{
|
||||
var currentTime = Time.time;
|
||||
var timeElapsedSinceLastShot = currentTime - m_TimeOfLastShot;
|
||||
if (timeElapsedSinceLastShot > timeBetweenShots)
|
||||
{
|
||||
m_TimeOfLastShot = currentTime;
|
||||
Fire();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_PlayerInput.lockCursor.wasJustPressed)
|
||||
LockCursor(true);
|
||||
|
||||
if (m_PlayerInput.unlockCursor.wasJustPressed)
|
||||
LockCursor(false);
|
||||
|
||||
if (m_PlayerInput.menu.wasJustPressed)
|
||||
sizer.ToggleMenu();
|
||||
|
||||
if (rebinder != null)
|
||||
{
|
||||
if (m_PlayerInput.reconfigure.wasJustPressed)
|
||||
rebinder.enabled = !rebinder.enabled;
|
||||
|
||||
if (rebinder.enabled == m_PlayerInput.active)
|
||||
{
|
||||
LockCursor(!rebinder.enabled);
|
||||
m_PlayerInput.active = !rebinder.enabled;
|
||||
controlsText.enabled = !rebinder.enabled;
|
||||
}
|
||||
}
|
||||
|
||||
HandleControlsText();
|
||||
}
|
||||
|
||||
void HandleControlsText()
|
||||
{
|
||||
string help = string.Empty;
|
||||
|
||||
help += GetControlHelp(m_PlayerInput.moveX) + "\n";
|
||||
help += GetControlHelp(m_PlayerInput.moveY) + "\n";
|
||||
help += GetControlHelp(m_PlayerInput.lookX) + "\n";
|
||||
help += GetControlHelp(m_PlayerInput.lookY) + "\n";
|
||||
help += GetControlHelp(m_PlayerInput.fire) + "\n";
|
||||
help += GetControlHelp(m_PlayerInput.menu);
|
||||
controlsText.text = help;
|
||||
}
|
||||
|
||||
private string GetControlHelp(InputControl control)
|
||||
{
|
||||
return string.Format("Use {0} to {1}!", control.GetPrimarySourceName(), control.name);
|
||||
}
|
||||
|
||||
void Fire()
|
||||
{
|
||||
var newProjectile = Instantiate(projectile);
|
||||
newProjectile.transform.position = head.position + head.forward * 0.6f;
|
||||
newProjectile.transform.rotation = head.rotation;
|
||||
float size = (sizer == null ? 1 : sizer.size);
|
||||
newProjectile.transform.localScale *= size;
|
||||
newProjectile.GetComponent<Rigidbody>().mass = Mathf.Pow(size, 3);
|
||||
newProjectile.GetComponent<Rigidbody>().AddForce(head.forward * 20f, ForceMode.Impulse);
|
||||
newProjectile.GetComponent<MeshRenderer>().material.color = new Color(Random.value, Random.value, Random.value, 1.0f);
|
||||
}
|
||||
|
||||
void LockCursor(bool value)
|
||||
{
|
||||
var mouse = Mouse.current;
|
||||
if (mouse != null)
|
||||
mouse.cursor.isLocked = value;
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2732bf3ae11598c4aa8073c0d23017df
|
||||
timeCreated: 1439295368
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,57 +0,0 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.InputNew;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
// This sizer does not use the UI event system,
|
||||
// since it's not integrated with the Input System prototype at this point.
|
||||
// UI is only used for graphics.
|
||||
|
||||
public class CubeSizer : MonoBehaviour
|
||||
{
|
||||
FirstPersonControls m_PlayerInput;
|
||||
|
||||
[FormerlySerializedAs("controlMap")]
|
||||
public ActionMap actionMap;
|
||||
public int playerIndex;
|
||||
|
||||
[Space(10)]
|
||||
public GameObject menu;
|
||||
public Slider slider;
|
||||
|
||||
public float size { get { return slider.value; } }
|
||||
|
||||
public void OpenMenu()
|
||||
{
|
||||
enabled = true;
|
||||
menu.SetActive(true);
|
||||
m_PlayerInput = InputSystem.GetPlayerHandle(playerIndex).AssignActions<FirstPersonControls>(actionMap);
|
||||
m_PlayerInput.active = true;
|
||||
}
|
||||
|
||||
public void CloseMenu()
|
||||
{
|
||||
m_PlayerInput.active = false;
|
||||
menu.SetActive(false);
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
public void ToggleMenu()
|
||||
{
|
||||
if (enabled)
|
||||
CloseMenu();
|
||||
else
|
||||
OpenMenu();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (m_PlayerInput.moveX.negative.wasJustPressed)
|
||||
slider.value -= 0.1f;
|
||||
if (m_PlayerInput.moveX.positive.wasJustPressed)
|
||||
slider.value += 0.1f;
|
||||
if (m_PlayerInput.menu.wasJustPressed)
|
||||
ToggleMenu();
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c4fbb736be73a4e8b89a33bf81127c06
|
||||
timeCreated: 1439986059
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,141 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputNew;
|
||||
using Random = UnityEngine.Random;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class MultiplayerManager
|
||||
: MonoBehaviour
|
||||
{
|
||||
public GameObject playerPrefab;
|
||||
[FormerlySerializedAs("controlMap")]
|
||||
public ActionMap actionMap;
|
||||
public GameObject hubCamera;
|
||||
|
||||
enum PlayerStatus { Inactive, Joined, Ready }
|
||||
|
||||
class PlayerInfo
|
||||
{
|
||||
public PlayerHandle playerHandle;
|
||||
public FirstPersonControls actions;
|
||||
public bool ready = false;
|
||||
public int colorIndex;
|
||||
|
||||
public PlayerInfo(PlayerHandle playerHandle)
|
||||
{
|
||||
this.playerHandle = playerHandle;
|
||||
actions = playerHandle.GetActions<FirstPersonControls>();
|
||||
actions.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
List<PlayerInfo> players = new List<PlayerInfo>();
|
||||
|
||||
public void Destroy()
|
||||
{
|
||||
for (int i = players.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (players[i].actions != null)
|
||||
players[i].actions.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (players.Count < 4)
|
||||
{
|
||||
PlayerHandle newPlayer = InputSystem.CreatePlayerHandle(actionMap, true);
|
||||
if (newPlayer != null)
|
||||
players.Add(new PlayerInfo(newPlayer));
|
||||
}
|
||||
|
||||
int readyCount = 0;
|
||||
for (int i = players.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var player = players[i];
|
||||
if (!player.ready)
|
||||
{
|
||||
if (player.actions.fire.wasJustPressed)
|
||||
player.ready = true;
|
||||
if (player.actions.menu.wasJustPressed)
|
||||
{
|
||||
player.playerHandle.Destroy();
|
||||
players.Remove(player);
|
||||
continue;
|
||||
}
|
||||
if (player.actions.moveX.positive.wasJustPressed)
|
||||
player.colorIndex = ((player.colorIndex + 1) % colors.Length);
|
||||
if (player.actions.moveX.negative.wasJustPressed)
|
||||
player.colorIndex = ((player.colorIndex + colors.Length - 1) % colors.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.actions.fire.wasJustPressed || player.actions.menu.wasJustPressed)
|
||||
player.ready = false;
|
||||
}
|
||||
if (player.ready)
|
||||
readyCount++;
|
||||
}
|
||||
|
||||
if (readyCount >= 1 && (players.Count - readyCount) == 0)
|
||||
StartGame();
|
||||
}
|
||||
|
||||
Color[] colors = new Color[] { Color.red, Color.green, Color.blue, Color.yellow, Color.cyan, Color.magenta };
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
float width = 200;
|
||||
float height = 300;
|
||||
int playerNum = 0;
|
||||
for (int i = 0; i < players.Count; i++)
|
||||
{
|
||||
PlayerInfo player = players[i];
|
||||
|
||||
Rect rect = new Rect(20 + (width + 20) * playerNum, (Screen.height - height) * 0.5f, width, height);
|
||||
GUILayout.BeginArea(rect, "Player", "box");
|
||||
GUILayout.Space(20);
|
||||
|
||||
GUI.color = colors[player.colorIndex];
|
||||
GUILayout.Button(GUIContent.none, GUILayout.Height(50));
|
||||
GUI.color = Color.white;
|
||||
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.FlexibleSpace();
|
||||
if (!player.ready)
|
||||
GUILayout.Label(string.Format("Press {0} when ready", player.actions.fire.GetPrimarySourceName()));
|
||||
else
|
||||
GUILayout.Label("READY");
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
|
||||
playerNum++;
|
||||
}
|
||||
}
|
||||
|
||||
void StartGame()
|
||||
{
|
||||
hubCamera.SetActive(false);
|
||||
|
||||
int playerCount = players.Count;
|
||||
float fraction = 1f / playerCount;
|
||||
for (int i = 0; i < players.Count; i++)
|
||||
{
|
||||
PlayerInfo playerInfo = players[i];
|
||||
if (!playerInfo.ready)
|
||||
{
|
||||
playerInfo.playerHandle.Destroy();
|
||||
continue;
|
||||
}
|
||||
|
||||
var player = (GameObject)Instantiate(playerPrefab, Vector3.right * 2 * i, Quaternion.identity);
|
||||
player.GetComponent<CharacterInputController>().SetupPlayer(playerInfo.playerHandle.index);
|
||||
player.GetComponentInChildren<Camera>().rect = new Rect(0, fraction * i, 1, fraction);
|
||||
player.transform.Find("Canvas/Virtual Joystick").gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 21f60b19720614458b7eca4357886564
|
||||
timeCreated: 1441198800
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,109 +0,0 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine.InputNew;
|
||||
|
||||
public class RuntimeRebinding : MonoBehaviour
|
||||
{
|
||||
ControlSchemeInput m_ControlSchemeInput;
|
||||
|
||||
const int k_NameWidth = 200;
|
||||
const int k_BindingWidth = 120;
|
||||
|
||||
string[] controlSchemeNames;
|
||||
InputControlDescriptor descriptorToBeAssigned = null;
|
||||
|
||||
public void Initialize(ControlSchemeInput controlSchemeInput)
|
||||
{
|
||||
m_ControlSchemeInput = controlSchemeInput;
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
if (m_ControlSchemeInput == null)
|
||||
{
|
||||
GUILayout.Label("No scheme input assigned.");
|
||||
return;
|
||||
}
|
||||
|
||||
ActionMap actionMap = m_ControlSchemeInput.actionMap;
|
||||
ControlScheme controlScheme = m_ControlSchemeInput.controlScheme;
|
||||
|
||||
if (controlScheme == null)
|
||||
{
|
||||
GUILayout.Label("No control scheme assigned.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (controlScheme.bindings.Count != actionMap.actions.Count)
|
||||
{
|
||||
GUILayout.Label("Control scheme bindings don't match action map actions.");
|
||||
return;
|
||||
}
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
for (int control = 0; control < actionMap.actions.Count; control++)
|
||||
{
|
||||
DisplayControlBinding(actionMap.actions[control], controlScheme.bindings[control]);
|
||||
}
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
if (GUILayout.Button("Done"))
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
void DisplayControlBinding(InputAction action, ControlBinding controlBinding)
|
||||
{
|
||||
if (controlBinding.sources.Count > 0)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label(action.name, GUILayout.Width(k_NameWidth));
|
||||
for (int i = 0; i < controlBinding.sources.Count; i++)
|
||||
DisplaySource(controlBinding.sources[i]);
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if (controlBinding.buttonAxisSources.Count > 0)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
// Use unicode minus sign that has same width as plus sign.
|
||||
GUILayout.Label(action.name + " (\u2212)", GUILayout.Width(k_NameWidth));
|
||||
for (int i = 0; i < controlBinding.buttonAxisSources.Count; i++)
|
||||
DisplayButtonAxisSource(controlBinding.buttonAxisSources[i], false);
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label(action.name + " (+)", GUILayout.Width(k_NameWidth));
|
||||
for (int i = 0; i < controlBinding.buttonAxisSources.Count; i++)
|
||||
DisplayButtonAxisSource(controlBinding.buttonAxisSources[i], true);
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayButtonAxisSource(ButtonAxisSource source, bool positive)
|
||||
{
|
||||
DisplaySource(positive ? source.positive : source.negative);
|
||||
}
|
||||
|
||||
void DisplaySource(InputControlDescriptor descriptor)
|
||||
{
|
||||
if (descriptor == descriptorToBeAssigned)
|
||||
{
|
||||
GUILayout.Button("...", GUILayout.Width(k_BindingWidth));
|
||||
}
|
||||
else if (GUILayout.Button(InputDeviceUtility.GetDeviceControlName(descriptor), GUILayout.Width(k_BindingWidth)))
|
||||
{
|
||||
descriptorToBeAssigned = descriptor;
|
||||
InputSystem.ListenForBinding(BindInputControl);
|
||||
}
|
||||
}
|
||||
|
||||
bool BindInputControl(InputControl control)
|
||||
{
|
||||
m_ControlSchemeInput.BindControl(descriptorToBeAssigned, control, false);
|
||||
descriptorToBeAssigned = null;
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b7d413865cbbf436a94478bc13bf9c21
|
||||
timeCreated: 1448535692
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,32 +0,0 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputNew;
|
||||
|
||||
namespace UnityStandardAssets.CrossPlatformInput
|
||||
{
|
||||
public class VirtualButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
||||
{
|
||||
public VirtualJoystick.VirtualJoystickControl m_ButtonControl = VirtualJoystick.VirtualJoystickControl.Action1;
|
||||
|
||||
bool m_Down = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_Down = false;
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData data)
|
||||
{
|
||||
m_Down = false;
|
||||
VirtualJoystick.current.SetButtonValue((int)m_ButtonControl, m_Down);
|
||||
}
|
||||
|
||||
|
||||
public void OnPointerDown(PointerEventData data)
|
||||
{
|
||||
m_Down = true;
|
||||
VirtualJoystick.current.SetButtonValue((int)m_ButtonControl, m_Down);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7da8d11a628c84d52a5bd7ca9381ef4e
|
||||
timeCreated: 1440163644
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,87 +0,0 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputNew;
|
||||
|
||||
namespace UnityStandardAssets.CrossPlatformInput
|
||||
{
|
||||
public class VirtualStick : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IDragHandler
|
||||
{
|
||||
public enum AxisOption
|
||||
{
|
||||
// Options for which axes to use
|
||||
Both, // Use both
|
||||
OnlyHorizontal, // Only horizontal
|
||||
OnlyVertical // Only vertical
|
||||
}
|
||||
|
||||
public int m_MovementRange = 100;
|
||||
public AxisOption m_AxesToUse = AxisOption.Both; // The options for the axes that the still will use
|
||||
public VirtualJoystick.VirtualJoystickControl m_HorizontalControl = VirtualJoystick.VirtualJoystickControl.LeftStickX;
|
||||
public VirtualJoystick.VirtualJoystickControl m_VerticalControl = VirtualJoystick.VirtualJoystickControl.LeftStickY;
|
||||
|
||||
Vector3 m_StartPos;
|
||||
Vector2 m_PointerDownPos;
|
||||
bool m_UseX; // Toggle for using the x axis
|
||||
bool m_UseY; // Toggle for using the Y axis
|
||||
Camera m_EventCamera;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
CreateVirtualAxes();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
m_StartPos = (transform as RectTransform).anchoredPosition;
|
||||
Canvas canvas = GetComponentInParent<Canvas>();
|
||||
if (canvas)
|
||||
m_EventCamera = canvas.worldCamera;
|
||||
}
|
||||
|
||||
void UpdateVirtualAxes(Vector3 delta)
|
||||
{
|
||||
if (m_UseX)
|
||||
VirtualJoystick.current.SetAxisValue((int)m_HorizontalControl, delta.x);
|
||||
|
||||
if (m_UseY)
|
||||
VirtualJoystick.current.SetAxisValue((int)m_VerticalControl, delta.y);
|
||||
}
|
||||
|
||||
void CreateVirtualAxes()
|
||||
{
|
||||
// Set axes to use
|
||||
m_UseX = (m_AxesToUse == AxisOption.Both || m_AxesToUse == AxisOption.OnlyHorizontal);
|
||||
m_UseY = (m_AxesToUse == AxisOption.Both || m_AxesToUse == AxisOption.OnlyVertical);
|
||||
}
|
||||
|
||||
public void OnPointerDown(PointerEventData data)
|
||||
{
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(transform.parent as RectTransform, data.position, m_EventCamera, out m_PointerDownPos);
|
||||
}
|
||||
|
||||
public void OnDrag(PointerEventData data)
|
||||
{
|
||||
Vector2 position;
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(transform.parent as RectTransform, data.position, m_EventCamera, out position);
|
||||
Vector2 delta = position - m_PointerDownPos;
|
||||
|
||||
if (!m_UseX)
|
||||
delta.x = 0;
|
||||
|
||||
if (!m_UseY)
|
||||
delta.y = 0;
|
||||
|
||||
delta = Vector2.ClampMagnitude(delta, m_MovementRange);
|
||||
|
||||
(transform as RectTransform).anchoredPosition = m_StartPos + (Vector3)delta;
|
||||
UpdateVirtualAxes(delta / m_MovementRange);
|
||||
}
|
||||
|
||||
public void OnPointerUp(PointerEventData data)
|
||||
{
|
||||
(transform as RectTransform).anchoredPosition = m_StartPos;
|
||||
UpdateVirtualAxes(Vector2.zero);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 00c3c865782347f41b6358d9fba14b48
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче