Skip to content

Commit

Permalink
Update on-screen input to reduce input lag.
Browse files Browse the repository at this point in the history
  • Loading branch information
SardineFish committed Apr 20, 2019
1 parent ba8ce5b commit f928f0f
Show file tree
Hide file tree
Showing 12 changed files with 297 additions and 105 deletions.
38 changes: 36 additions & 2 deletions Assets/Input/MAJIKAInput.inputactions
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,16 @@
"processors": "",
"interactions": "",
"bindings": []
},
{
"name": "Touch",
"id": "6e192c60-8edc-4d0f-b132-807bbb64e9cf",
"expectedControlLayout": "",
"continuous": true,
"passThrough": false,
"processors": "",
"interactions": "",
"bindings": []
}
],
"bindings": [
Expand Down Expand Up @@ -387,7 +397,7 @@
},
{
"name": "",
"path": "<Keyboard>/t",
"path": "<Touchscreen>/phase",
"interactions": "",
"processors": "",
"groups": "",
Expand All @@ -399,7 +409,7 @@
},
{
"name": "",
"path": "<Pointer>/button",
"path": "<Touchscreen>/touch",
"interactions": "",
"processors": "",
"groups": "",
Expand All @@ -408,6 +418,30 @@
"isComposite": false,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "",
"path": "<Touchscreen>/position",
"interactions": "",
"processors": "",
"groups": "",
"action": "Touch",
"chainWithPrevious": false,
"isComposite": false,
"isPartOfComposite": false,
"modifiers": ""
},
{
"name": "",
"path": "<Mouse>/position",
"interactions": "",
"processors": "",
"groups": "",
"action": "Touch",
"chainWithPrevious": false,
"isComposite": false,
"isPartOfComposite": false,
"modifiers": ""
}
]
}
Expand Down
1 change: 1 addition & 0 deletions Assets/Input/MAJIKAInput.inputactions.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 54 additions & 1 deletion Assets/Resources/Prefabs/TouchController.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2851912902410229067}
- component: {fileID: 1340831905813441345}
- component: {fileID: 1409148334606108716}
- component: {fileID: 2236975457994727411}
m_Layer: 0
m_Name: TouchController
m_TagString: Untagged
Expand Down Expand Up @@ -760,6 +763,56 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0.000061035156}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &1340831905813441345
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7649134036024794370}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &1409148334606108716
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7649134036024794370}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &2236975457994727411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7649134036024794370}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: feb0ebdb5fd5cbd4ba6af2f87d0e98df, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &7995154422616259494
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -821,7 +874,7 @@ GameObject:
- component: {fileID: 1371330268270028592}
- component: {fileID: 439598316914481921}
- component: {fileID: 7979750304746981087}
m_Layer: 0
m_Layer: 5
m_Name: Jump
m_TagString: Untagged
m_Icon: {fileID: 0}
Expand Down
130 changes: 95 additions & 35 deletions Assets/Scenes/Boss-0.unity
Original file line number Diff line number Diff line change
Expand Up @@ -8194,18 +8194,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &709402985 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5418956735876568678, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
m_PrefabInstance: {fileID: 4158792539530800599}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a4cfe0a6759a3d3469187a3277076c4c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &878695612
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -8362,18 +8350,6 @@ Transform:
m_Father: {fileID: 1121480750}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &932332763 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 436401141486805312, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
m_PrefabInstance: {fileID: 4158792539530800599}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a4cfe0a6759a3d3469187a3277076c4c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &991334604
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -15155,8 +15131,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 391f0f44927bde5499ae67add68ac0cc, type: 3}
m_Name:
m_EditorClassIdentifier:
PassUI: {fileID: 932332763}
FailedUI: {fileID: 709402985}
PassUI: {fileID: 4158792539530800600}
FailedUI: {fileID: 4158792539530800601}
NextScene: Demo-1
ActiveAtLoaded:
- {fileID: 114480810976018487}
Expand Down Expand Up @@ -15278,11 +15254,6 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 4009174072939725}
m_Modifications:
- target: {fileID: 4428250248357110565, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_Name
value: GUI
objectReference: {fileID: 0}
- target: {fileID: 4498039197396181749, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_LocalPosition.x
Expand Down Expand Up @@ -15388,6 +15359,11 @@ PrefabInstance:
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4428250248357110565, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_Name
value: GUI
objectReference: {fileID: 0}
- target: {fileID: 4498248609074906325, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
Expand Down Expand Up @@ -15431,22 +15407,106 @@ PrefabInstance:
- target: {fileID: 4011484478014564244, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -94.08
value: -196
objectReference: {fileID: 0}
- target: {fileID: 4011484478014564244, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: -196.16
value: -400
objectReference: {fileID: 0}
- target: {fileID: 4011484478885484883, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0.00012207031
value: -517.8999
objectReference: {fileID: 0}
- target: {fileID: 4011484478885484883, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: -16.000244
value: -1051.8003
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739031, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739031, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739028, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 231.5
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739028, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739028, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739028, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739028, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7294128093959739028, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5559616483646187750, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -175.616
objectReference: {fileID: 0}
- target: {fileID: 5559616483646187750, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: -359.232
objectReference: {fileID: 0}
- target: {fileID: 5559616483646187751, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -414.3199
objectReference: {fileID: 0}
- target: {fileID: 5559616483646187751, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: -844.64026
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 32b9034704dde6e4ea609d575faa4738, type: 3}
--- !u!114 &4158792539530800600 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 436401141486805312, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
m_PrefabInstance: {fileID: 4158792539530800599}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a4cfe0a6759a3d3469187a3277076c4c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &4158792539530800601 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5418956735876568678, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
m_PrefabInstance: {fileID: 4158792539530800599}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a4cfe0a6759a3d3469187a3277076c4c, type: 3}
m_Name:
m_EditorClassIdentifier:
8 changes: 4 additions & 4 deletions Assets/Scenes/Demo-1.unity
Original file line number Diff line number Diff line change
Expand Up @@ -8787,22 +8787,22 @@ PrefabInstance:
- target: {fileID: 4011484478014564244, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -175.61601
value: -94.08
objectReference: {fileID: 0}
- target: {fileID: 4011484478014564244, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: -359.23203
value: -196.16
objectReference: {fileID: 0}
- target: {fileID: 4011484478885484883, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -414.31995
value: 0.00012207031
objectReference: {fileID: 0}
- target: {fileID: 4011484478885484883, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
propertyPath: m_SizeDelta.x
value: -844.6404
value: -16.000244
objectReference: {fileID: 0}
- target: {fileID: 1460059405891056835, guid: 32b9034704dde6e4ea609d575faa4738,
type: 3}
Expand Down
Loading

0 comments on commit f928f0f

Please sign in to comment.