Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewired #9

Merged
merged 6 commits into from
Jul 23, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added JoystickManager with new DS4 map!
  • Loading branch information
Aestial committed Jun 18, 2018
commit a0c5b1e30144f69b32fc4fc616be541930bc0da7
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@ public class JoystickAssigner : MonoBehaviour
{
[SerializeField] private JoystickCanvas m_CanvasController;
[SerializeField] private AudioClip selectedClip;
[SerializeField] private AudioClip enabledClip;

void Update()
{
39 changes: 39 additions & 0 deletions Assets/_ChickenFlu/Scenes/_PlayerSelector/JoystickManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Rewired;

namespace JoystickControl
{
public class JoystickManager : MonoBehaviour
{
[SerializeField] private AudioClip readyFXClip;

// Use this for initialization
void Start ()
{

}

// Update is called once per frame
void Update ()
{
if (!ReInput.isReady)
return;
this.CheckInput();
}

private void CheckInput()
{
for(int i = 0; i < ReInput.players.playerCount; i++)
{
if(ReInput.players.GetPlayer(i).GetButtonDown("Start"))
{
Debug.Log("Some fucker pressed start!");
AudioManager.Instance.PlayOneShoot2D(this.readyFXClip);

}
}
}
}
}
11 changes: 11 additions & 0 deletions Assets/_ChickenFlu/Scenes/_PlayerSelector/JoystickManager.cs.meta

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

124 changes: 61 additions & 63 deletions Assets/_ChickenFlu/Scenes/_PlayerSelector/PlayerSelector.unity
Original file line number Diff line number Diff line change
@@ -587,7 +587,7 @@ GameObject:
- component: {fileID: 504648874}
- component: {fileID: 504648875}
m_Layer: 0
m_Name: AudioManager
m_Name: Audio
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -865,8 +865,8 @@ GameObject:
m_Component:
- component: {fileID: 879092251}
- component: {fileID: 879092250}
- component: {fileID: 879092252}
- component: {fileID: 879092249}
- component: {fileID: 879092252}
m_Layer: 0
m_Name: RewiredInputManager
m_TagString: Untagged
@@ -882,14 +882,10 @@ MonoBehaviour:
m_GameObject: {fileID: 879092248}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 15b9b3d5912fd41e9b3df20409c2484e, type: 3}
m_Script: {fileID: 11500000, guid: 58c8ec5fd709b45128b47a5b8d246975, type: 3}
m_Name:
m_EditorClassIdentifier:
panels:
- {fileID: 1957180741}
- {fileID: 678298721}
- {fileID: 1028985167}
- {fileID: 1335963231}
readyFXClip: {fileID: 8300000, guid: a7c6703090dc54656ac6b3128433aaaf, type: 3}
--- !u!114 &879092250
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1029,13 +1025,13 @@ MonoBehaviour:
_defaultKeyboardMaps: []
_defaultCustomControllerMaps: []
_startingCustomControllers: []
_assignMouseOnStart: 1
_assignKeyboardOnStart: 1
_assignMouseOnStart: 0
_assignKeyboardOnStart: 0
_excludeFromControllerAutoAssignment: 0
- _id: 2
_name: Player1
_descriptiveName: Player0
_startPlaying: 1
_descriptiveName: Player1
_startPlaying: 0
_defaultJoystickMaps:
- _enabled: 1
_categoryId: 0
@@ -1045,43 +1041,37 @@ MonoBehaviour:
_defaultCustomControllerMaps: []
_startingCustomControllers: []
_assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_assignKeyboardOnStart: 0
_excludeFromControllerAutoAssignment: 0
- _id: 5
_name: Player2
_descriptiveName: Player2
_startPlaying: 1
_startPlaying: 0
_defaultJoystickMaps:
- _enabled: 1
_categoryId: 0
_layoutId: 0
_defaultMouseMaps: []
_defaultKeyboardMaps:
- _enabled: 1
_categoryId: 0
_layoutId: 0
_defaultKeyboardMaps: []
_defaultCustomControllerMaps: []
_startingCustomControllers: []
_assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_assignKeyboardOnStart: 0
_excludeFromControllerAutoAssignment: 0
- _id: 6
_name: Player3
_descriptiveName: Player3
_startPlaying: 1
_startPlaying: 0
_defaultJoystickMaps:
- _enabled: 1
_categoryId: 0
_layoutId: 0
_defaultMouseMaps: []
_defaultKeyboardMaps:
- _enabled: 1
_categoryId: 0
_layoutId: 1
_defaultKeyboardMaps: []
_defaultCustomControllerMaps: []
_startingCustomControllers: []
_assignMouseOnStart: 0
_assignKeyboardOnStart: 1
_assignKeyboardOnStart: 0
_excludeFromControllerAutoAssignment: 0
actions:
- _id: 0
@@ -1111,6 +1101,15 @@ MonoBehaviour:
_behaviorId: 0
_userAssignable: 1
_categoryId: 0
- _id: 4
_name: Start
_type: 1
_descriptiveName: Start
_positiveDescriptiveName:
_negativeDescriptiveName:
_behaviorId: 0
_userAssignable: 1
_categoryId: 0
actionCategories:
- _name: Default
_descriptiveName: Default
@@ -1120,7 +1119,7 @@ MonoBehaviour:
actionCategoryMap:
list:
- categoryId: 0
actionIds: 000000000100000002000000
actionIds: 00000000010000000200000004000000
inputBehaviors:
- _id: 0
_name: Default
@@ -1181,7 +1180,7 @@ MonoBehaviour:
customControllerUid: 0
actionElementMaps:
- _actionCategoryId: 0
_actionId: 0
_actionId: 4
_elementType: 0
_elementIdentifierId: 0
_axisRange: 0
@@ -1213,39 +1212,10 @@ MonoBehaviour:
_modifierKey1: 0
_modifierKey2: 0
_modifierKey3: 0
- id: 3
categoryId: 0
layoutId: 0
name:
hardwareGuidString: 00000000-0000-0000-0000-000000000000
customControllerUid: 0
actionElementMaps:
- _actionCategoryId: 0
_actionId: 0
_elementType: 0
_elementIdentifierId: 0
_axisRange: 0
_invert: 0
_axisContribution: 0
_keyboardKeyCode: 0
_modifierKey1: 0
_modifierKey2: 0
_modifierKey3: 0
- _actionCategoryId: 0
_actionId: 1
_elementType: 0
_elementIdentifierId: 1
_axisRange: 0
_invert: 1
_axisContribution: 0
_keyboardKeyCode: 0
_modifierKey1: 0
_modifierKey2: 0
_modifierKey3: 0
- _actionCategoryId: 0
_actionId: 2
_actionId: 4
_elementType: 1
_elementIdentifierId: 32
_elementIdentifierId: 14
_axisRange: 0
_invert: 0
_axisContribution: 0
@@ -1382,15 +1352,15 @@ MonoBehaviour:
customControllerMaps: []
customControllers: []
playerIdCounter: 7
actionIdCounter: 4
actionIdCounter: 5
actionCategoryIdCounter: 2
inputBehaviorIdCounter: 1
mapCategoryIdCounter: 2
joystickLayoutIdCounter: 1
keyboardLayoutIdCounter: 2
mouseLayoutIdCounter: 1
customControllerLayoutIdCounter: 1
joystickMapIdCounter: 4
joystickMapIdCounter: 5
keyboardMapIdCounter: 3
mouseMapIdCounter: 0
customControllerMapIdCounter: 0
@@ -1421,9 +1391,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 057c166906e924e9a914fb86da58e8b6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_CanvasController: {fileID: 879092249}
m_CanvasController: {fileID: 2013002180}
selectedClip: {fileID: 8300000, guid: 8234c5ff790fb447fb06ac61412ff4d0, type: 3}
enabledClip: {fileID: 8300000, guid: a7c6703090dc54656ac6b3128433aaaf, type: 3}
--- !u!1 &913298868
GameObject:
m_ObjectHideFlags: 0
@@ -1795,7 +1764,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &1049653636
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -2627,6 +2596,8 @@ GameObject:
serializedVersion: 5
m_Component:
- component: {fileID: 2013002179}
- component: {fileID: 2013002181}
- component: {fileID: 2013002180}
m_Layer: 0
m_Name: SceneManager
m_TagString: Untagged
@@ -2647,6 +2618,33 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2013002180
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2013002178}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 15b9b3d5912fd41e9b3df20409c2484e, type: 3}
m_Name:
m_EditorClassIdentifier:
panels:
- {fileID: 1957180741}
- {fileID: 678298721}
- {fileID: 1028985167}
- {fileID: 1335963231}
--- !u!114 &2013002181
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2013002178}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 29420c084020f40a1847dea67172d150, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2044035286
GameObject:
m_ObjectHideFlags: 0
8 changes: 8 additions & 0 deletions Assets/_ChickenFlu/Scripts/Scenes.meta

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

16 changes: 16 additions & 0 deletions Assets/_ChickenFlu/Scripts/Scenes/MenuManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MenuManager : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}
}
11 changes: 11 additions & 0 deletions Assets/_ChickenFlu/Scripts/Scenes/MenuManager.cs.meta

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