Demo Overhaul
This commit is contained in:
BIN
Assets/.DS_Store
vendored
BIN
Assets/.DS_Store
vendored
Binary file not shown.
3196
Assets/Animations/Bones/AirPunch.anim
Normal file
3196
Assets/Animations/Bones/AirPunch.anim
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Animations/Bones/AirPunch.anim.meta
Normal file
8
Assets/Animations/Bones/AirPunch.anim.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eb8fa292b9d2f43bd9dedb423b25c937
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -25,6 +25,81 @@ AnimatorStateTransition:
|
|||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
m_CanTransitionToSelf: 1
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1101 &-6908172086093276855
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 6
|
||||||
|
m_ConditionEvent: state
|
||||||
|
m_EventTreshold: 2
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: -65348665591799820}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0.2
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.5
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1101 &-6412564485926626614
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 1
|
||||||
|
m_ConditionEvent: punch
|
||||||
|
m_EventTreshold: 0
|
||||||
|
- m_ConditionMode: 6
|
||||||
|
m_ConditionEvent: state
|
||||||
|
m_EventTreshold: 2
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 2500419510660092995}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.75
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 0
|
||||||
|
--- !u!1101 &-3941187688435178234
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions: []
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: -65348665591799820}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 1
|
||||||
|
m_HasExitTime: 1
|
||||||
|
m_HasFixedDuration: 0
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
--- !u!1101 &-3289816270970516984
|
--- !u!1101 &-3289816270970516984
|
||||||
AnimatorStateTransition:
|
AnimatorStateTransition:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
@@ -75,6 +150,31 @@ AnimatorStateTransition:
|
|||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
m_CanTransitionToSelf: 1
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1101 &-2141031755032314946
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 6
|
||||||
|
m_ConditionEvent: state
|
||||||
|
m_EventTreshold: 1
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 2600039493493020915}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0.1
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.6808511
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
--- !u!1107 &-1538096663108953913
|
--- !u!1107 &-1538096663108953913
|
||||||
AnimatorStateMachine:
|
AnimatorStateMachine:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
@@ -96,9 +196,13 @@ AnimatorStateMachine:
|
|||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 4390441580030614539}
|
m_State: {fileID: 4390441580030614539}
|
||||||
m_Position: {x: 60, y: 80, z: 0}
|
m_Position: {x: 60, y: 80, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 2500419510660092995}
|
||||||
|
m_Position: {x: 100, y: -140, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions:
|
m_AnyStateTransitions:
|
||||||
- {fileID: 5263795009836994554}
|
- {fileID: 5263795009836994554}
|
||||||
|
- {fileID: -6412564485926626614}
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
m_StateMachineTransitions: {}
|
m_StateMachineTransitions: {}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
@@ -106,7 +210,7 @@ AnimatorStateMachine:
|
|||||||
m_EntryPosition: {x: 890, y: 0, z: 0}
|
m_EntryPosition: {x: 890, y: 0, z: 0}
|
||||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
m_DefaultState: {fileID: 2600039493493020915}
|
m_DefaultState: {fileID: 1699472617733096240}
|
||||||
--- !u!1101 &-1491732674038617540
|
--- !u!1101 &-1491732674038617540
|
||||||
AnimatorStateTransition:
|
AnimatorStateTransition:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
@@ -204,7 +308,7 @@ AnimatorController:
|
|||||||
m_Type: 9
|
m_Type: 9
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 1
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 9100000}
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
@@ -272,6 +376,35 @@ AnimatorState:
|
|||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &2500419510660092995
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: AirPunch
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions:
|
||||||
|
- {fileID: -3941187688435178234}
|
||||||
|
- {fileID: -2141031755032314946}
|
||||||
|
- {fileID: 7802407454979388569}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 7400000, guid: eb8fa292b9d2f43bd9dedb423b25c937, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
--- !u!1102 &2600039493493020915
|
--- !u!1102 &2600039493493020915
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
@@ -312,6 +445,7 @@ AnimatorState:
|
|||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions:
|
m_Transitions:
|
||||||
- {fileID: 7801668757208663834}
|
- {fileID: 7801668757208663834}
|
||||||
|
- {fileID: -6908172086093276855}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
m_IKOnFeet: 0
|
m_IKOnFeet: 0
|
||||||
@@ -338,6 +472,9 @@ AnimatorStateTransition:
|
|||||||
- m_ConditionMode: 1
|
- m_ConditionMode: 1
|
||||||
m_ConditionEvent: punch
|
m_ConditionEvent: punch
|
||||||
m_EventTreshold: 0
|
m_EventTreshold: 0
|
||||||
|
- m_ConditionMode: 7
|
||||||
|
m_ConditionEvent: state
|
||||||
|
m_EventTreshold: 2
|
||||||
m_DstStateMachine: {fileID: 0}
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_DstState: {fileID: 4390441580030614539}
|
m_DstState: {fileID: 4390441580030614539}
|
||||||
m_Solo: 0
|
m_Solo: 0
|
||||||
@@ -374,3 +511,28 @@ AnimatorStateTransition:
|
|||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
m_CanTransitionToSelf: 1
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1101 &7802407454979388569
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 6
|
||||||
|
m_ConditionEvent: state
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 1699472617733096240}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0.1
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.65116274
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
|
|||||||
@@ -1582,4 +1582,25 @@ AnimationClip:
|
|||||||
flags: 0
|
flags: 0
|
||||||
m_HasGenericRootTransform: 0
|
m_HasGenericRootTransform: 0
|
||||||
m_HasMotionFloatCurves: 0
|
m_HasMotionFloatCurves: 0
|
||||||
m_Events: []
|
m_Events:
|
||||||
|
- time: 0
|
||||||
|
functionName: EnableCancellation
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
- time: 0
|
||||||
|
functionName: ReturnToMaxSpeed
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
- time: 0
|
||||||
|
functionName: DisableHurtbox
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
|||||||
@@ -2798,3 +2798,10 @@ AnimationClip:
|
|||||||
floatParameter: 0
|
floatParameter: 0
|
||||||
intParameter: 0
|
intParameter: 0
|
||||||
messageOptions: 0
|
messageOptions: 0
|
||||||
|
- time: 0.43333334
|
||||||
|
functionName: ReturnToMaxSpeed
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
|||||||
@@ -1850,4 +1850,25 @@ AnimationClip:
|
|||||||
flags: 0
|
flags: 0
|
||||||
m_HasGenericRootTransform: 0
|
m_HasGenericRootTransform: 0
|
||||||
m_HasMotionFloatCurves: 0
|
m_HasMotionFloatCurves: 0
|
||||||
m_Events: []
|
m_Events:
|
||||||
|
- time: 0
|
||||||
|
functionName: ReturnToMaxSpeed
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
- time: 0
|
||||||
|
functionName: EnableCancellation
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
- time: 0
|
||||||
|
functionName: DisableHurtbox
|
||||||
|
data:
|
||||||
|
objectReferenceParameter: {fileID: 0}
|
||||||
|
floatParameter: 0
|
||||||
|
intParameter: 0
|
||||||
|
messageOptions: 0
|
||||||
|
|||||||
@@ -186,6 +186,61 @@
|
|||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": true
|
"isPartOfComposite": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "2D Vector",
|
||||||
|
"id": "fd2c8128-7e2a-414f-8b2c-42e74788f84e",
|
||||||
|
"path": "2DVector",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "",
|
||||||
|
"action": "Move",
|
||||||
|
"isComposite": true,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "up",
|
||||||
|
"id": "fd2977dc-8070-47c4-a878-4f4b6cafb23d",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/hat/up",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
|
"action": "Move",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "down",
|
||||||
|
"id": "2a7d8f86-0de3-4e61-b72d-3c36ba40d44a",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/hat/down",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
|
"action": "Move",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "left",
|
||||||
|
"id": "b2300d9f-d1c6-44b9-8c30-7044d061ada2",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/hat/left",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
|
"action": "Move",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "right",
|
||||||
|
"id": "e69e9186-0bac-4133-801d-0b9604123d3f",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/hat/right",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
|
"action": "Move",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "",
|
"name": "",
|
||||||
"id": "6f8632d2-312f-4559-8fdd-d17a3c226436",
|
"id": "6f8632d2-312f-4559-8fdd-d17a3c226436",
|
||||||
@@ -208,6 +263,17 @@
|
|||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "5d590d5e-b1ea-451c-9b14-abb7d586244d",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/trigger",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
|
"action": "Action",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "",
|
"name": "",
|
||||||
"id": "2a504570-c560-4eaf-a3f0-49971e1b475a",
|
"id": "2a504570-c560-4eaf-a3f0-49971e1b475a",
|
||||||
@@ -225,7 +291,18 @@
|
|||||||
"path": "<Gamepad>/start",
|
"path": "<Gamepad>/start",
|
||||||
"interactions": "",
|
"interactions": "",
|
||||||
"processors": "",
|
"processors": "",
|
||||||
"groups": "",
|
"groups": ";Gamepad",
|
||||||
|
"action": "Join",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "92e31e25-40f4-43ba-be0a-1b4fac05936a",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/button8",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
"action": "Join",
|
"action": "Join",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
@@ -236,7 +313,7 @@
|
|||||||
"path": "<Keyboard>/e",
|
"path": "<Keyboard>/e",
|
||||||
"interactions": "",
|
"interactions": "",
|
||||||
"processors": "",
|
"processors": "",
|
||||||
"groups": "",
|
"groups": ";Keyboard&Mouse",
|
||||||
"action": "Punch",
|
"action": "Punch",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
@@ -247,7 +324,18 @@
|
|||||||
"path": "<Gamepad>/buttonWest",
|
"path": "<Gamepad>/buttonWest",
|
||||||
"interactions": "",
|
"interactions": "",
|
||||||
"processors": "",
|
"processors": "",
|
||||||
"groups": "",
|
"groups": ";Gamepad",
|
||||||
|
"action": "Punch",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "b2508ee4-e0b6-4c99-a271-fc79e181ea51",
|
||||||
|
"path": "<HID::8Bitdo SN30 Pro>/button3",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": ";Gamepad",
|
||||||
"action": "Punch",
|
"action": "Punch",
|
||||||
"isComposite": false,
|
"isComposite": false,
|
||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ MonoBehaviour:
|
|||||||
playerText: {fileID: 7508327662230183655}
|
playerText: {fileID: 7508327662230183655}
|
||||||
walkSpeed: 5
|
walkSpeed: 5
|
||||||
walkSpeedFactor: 30
|
walkSpeedFactor: 30
|
||||||
maxSpeed: 5
|
maxSpeed: 7
|
||||||
|
maxSpeedOverride: 7
|
||||||
slowdownMultiplier: 40
|
slowdownMultiplier: 40
|
||||||
virtualAxisX: 0
|
virtualAxisX: 0
|
||||||
virtualButtonJump: 0
|
virtualButtonJump: 0
|
||||||
@@ -133,6 +134,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
force: 200
|
force: 200
|
||||||
damage: 0
|
damage: 0
|
||||||
|
maxDamage: 800
|
||||||
--- !u!114 &5200627265685207284
|
--- !u!114 &5200627265685207284
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -270,7 +272,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 36267595aa66046ac9e2e140190bbc16, type: 3}
|
m_Script: {fileID: 11500000, guid: 36267595aa66046ac9e2e140190bbc16, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
terminalVelocity: -15
|
terminalVelocity: -25
|
||||||
--- !u!1 &1648017802882051395
|
--- !u!1 &1648017802882051395
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -1960,7 +1962,7 @@ BoxCollider2D:
|
|||||||
m_UsedByEffector: 0
|
m_UsedByEffector: 0
|
||||||
m_CompositeOperation: 0
|
m_CompositeOperation: 0
|
||||||
m_CompositeOrder: 0
|
m_CompositeOrder: 0
|
||||||
m_Offset: {x: 0.38033098, y: 0}
|
m_Offset: {x: 0.38033104, y: -0.47152424}
|
||||||
m_SpriteTilingProperty:
|
m_SpriteTilingProperty:
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
pivot: {x: 0, y: 0}
|
pivot: {x: 0, y: 0}
|
||||||
@@ -1970,5 +1972,5 @@ BoxCollider2D:
|
|||||||
drawMode: 0
|
drawMode: 0
|
||||||
adaptiveTiling: 0
|
adaptiveTiling: 0
|
||||||
m_AutoTiling: 0
|
m_AutoTiling: 0
|
||||||
m_Size: {x: 2.750043, y: 1.2534463}
|
m_Size: {x: 2.750043, y: 2.196495}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
|
|||||||
@@ -197,6 +197,11 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
players: []
|
players: []
|
||||||
playerActions: {fileID: -944628639613478452, guid: 6cbaae0ad99590d468c8b501c0452c36, type: 3}
|
playerActions: {fileID: -944628639613478452, guid: 6cbaae0ad99590d468c8b501c0452c36, type: 3}
|
||||||
|
playerColors:
|
||||||
|
- {r: 0, g: 0.37328386, b: 1, a: 1}
|
||||||
|
- {r: 1, g: 0.15532212, b: 0, a: 1}
|
||||||
|
- {r: 1, g: 0.75347257, b: 0, a: 1}
|
||||||
|
- {r: 0.37995827, g: 1, b: 0, a: 1}
|
||||||
--- !u!114 &804358386
|
--- !u!114 &804358386
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ public class Damageable : MonoBehaviour
|
|||||||
{
|
{
|
||||||
public float force = 50f;
|
public float force = 50f;
|
||||||
public float damage = 0f;
|
public float damage = 0f;
|
||||||
|
public float maxDamage = 1000f;
|
||||||
|
|
||||||
private void OnTriggerEnter2D(Collider2D collision)
|
private void OnTriggerEnter2D(Collider2D collision)
|
||||||
{
|
{
|
||||||
@@ -20,13 +21,14 @@ public class Damageable : MonoBehaviour
|
|||||||
|
|
||||||
private void Recoil(GameObject damageSource)
|
private void Recoil(GameObject damageSource)
|
||||||
{
|
{
|
||||||
GetComponent<Rigidbody2D>().AddForce(((transform.position - damageSource.transform.position).normalized + Vector3.up) * damage, ForceMode2D.Force);
|
GetComponent<Rigidbody2D>().AddForce(((transform.position - damageSource.transform.position).normalized + Vector3.up * 2) * damage, ForceMode2D.Force);
|
||||||
//damageSource.transform.localScale *= 1.1f;
|
//damageSource.transform.localScale *= 1.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Damage()
|
private void Damage()
|
||||||
{
|
{
|
||||||
damage += force;
|
damage += force;
|
||||||
|
damage = Mathf.Clamp(damage, 0f, maxDamage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetDamage()
|
public void ResetDamage()
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public class PlayerManager : MonoBehaviour
|
|||||||
public List<GameObject> players;
|
public List<GameObject> players;
|
||||||
[SerializeField] private InputActionAsset playerActions;
|
[SerializeField] private InputActionAsset playerActions;
|
||||||
|
|
||||||
|
public List<Color> playerColors;
|
||||||
|
|
||||||
private Vector2 spawnPosition;
|
private Vector2 spawnPosition;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
@@ -27,6 +29,7 @@ public class PlayerManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
playerInput.transform.position = spawnPosition;
|
playerInput.transform.position = spawnPosition;
|
||||||
players.Add(playerInput.gameObject);
|
players.Add(playerInput.gameObject);
|
||||||
|
Colorize(playerInput.gameObject);
|
||||||
print("Player joined");
|
print("Player joined");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,4 +54,23 @@ public class PlayerManager : MonoBehaviour
|
|||||||
|
|
||||||
spawnPosition = transform.position;
|
spawnPosition = transform.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Colorize(GameObject player)
|
||||||
|
{
|
||||||
|
Color color = playerColors[(players.Count - 1) % playerColors.Count];
|
||||||
|
float tint = Mathf.Floor((players.Count - 1) / playerColors.Count);
|
||||||
|
color = (color + color + Color.white * tint) / (tint + 2);
|
||||||
|
|
||||||
|
if (player.TryGetComponent<SpriteRenderer>(out _))
|
||||||
|
{
|
||||||
|
player.GetComponent<SpriteRenderer>().color = color;
|
||||||
|
}
|
||||||
|
foreach (Transform child in player.transform)
|
||||||
|
{
|
||||||
|
if (child.TryGetComponent<SpriteRenderer>(out _))
|
||||||
|
{
|
||||||
|
Colorize(child.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
using Unity.VisualScripting;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
using UnityEngine.Tilemaps;
|
using UnityEngine.Tilemaps;
|
||||||
@@ -20,6 +21,7 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
public float walkSpeed;
|
public float walkSpeed;
|
||||||
public float walkSpeedFactor = 1f;
|
public float walkSpeedFactor = 1f;
|
||||||
public float maxSpeed = 5f;
|
public float maxSpeed = 5f;
|
||||||
|
public float maxSpeedOverride;
|
||||||
public float slowdownMultiplier = 10f;
|
public float slowdownMultiplier = 10f;
|
||||||
public float virtualAxisX;
|
public float virtualAxisX;
|
||||||
public float virtualButtonJump;
|
public float virtualButtonJump;
|
||||||
@@ -54,6 +56,7 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
maxSpeedOverride = maxSpeed;
|
||||||
GetComponent<RespawnOnTriggerEnter>().spawnPoint = transform.position;
|
GetComponent<RespawnOnTriggerEnter>().spawnPoint = transform.position;
|
||||||
|
|
||||||
body = GetComponent<Rigidbody2D>();
|
body = GetComponent<Rigidbody2D>();
|
||||||
@@ -119,7 +122,7 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
|
|
||||||
private void Jump()
|
private void Jump()
|
||||||
{
|
{
|
||||||
if (!punch.cancelable) return;
|
//if (!punch.cancelable) return;
|
||||||
|
|
||||||
if (virtualButtonJumpLastFrame == 1f)
|
if (virtualButtonJumpLastFrame == 1f)
|
||||||
{
|
{
|
||||||
@@ -144,6 +147,10 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (body.linearVelocity.y < 0 || !IsPhysicallyGrounded()) body.linearVelocity = new Vector2(body.linearVelocity.x, 0);
|
if (body.linearVelocity.y < 0 || !IsPhysicallyGrounded()) body.linearVelocity = new Vector2(body.linearVelocity.x, 0);
|
||||||
body.AddForce(Vector2.up * jumpSpeed, ForceMode2D.Impulse);
|
body.AddForce(Vector2.up * jumpSpeed, ForceMode2D.Impulse);
|
||||||
|
if (Mathf.Abs(body.linearVelocityX) > maxSpeed)
|
||||||
|
{
|
||||||
|
body.linearVelocity = new Vector2(Mathf.Sign(body.linearVelocityX) * maxSpeed, body.linearVelocity.y);
|
||||||
|
}
|
||||||
jumpPhysics = false;
|
jumpPhysics = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,13 +167,18 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
|
|
||||||
private void HorizontalMovement()
|
private void HorizontalMovement()
|
||||||
{
|
{
|
||||||
if (!punch.cancelable) return;
|
float temporaryMax = IsPhysicallyGrounded() ? maxSpeedOverride : Mathf.Infinity;
|
||||||
|
float temporarySlowdown = IsPhysicallyGrounded() ? slowdownMultiplier : 1;
|
||||||
|
|
||||||
body.AddForce(new Vector2(virtualAxisX * walkSpeed * walkSpeedFactor, 0), ForceMode2D.Force);
|
if (Mathf.Abs(body.linearVelocityX) <= maxSpeed || Mathf.Sign(body.linearVelocityX) != Mathf.Sign(virtualAxisX))
|
||||||
|
|
||||||
if (Mathf.Abs(body.linearVelocityX) >= maxSpeed)
|
|
||||||
{
|
{
|
||||||
body.AddForce(new Vector2(-Mathf.Sign(body.linearVelocityX) * (Mathf.Abs(body.linearVelocityX) - maxSpeed) * slowdownMultiplier, 0));
|
body.AddForce(new Vector2(virtualAxisX * walkSpeed * walkSpeedFactor, 0), ForceMode2D.Force);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Mathf.Abs(body.linearVelocityX) >= temporaryMax)
|
||||||
|
{
|
||||||
|
//body.linearVelocity = new Vector2(Mathf.Sign(body.linearVelocityX) * temporaryMax, body.linearVelocity.y);
|
||||||
|
body.AddForce(new Vector2(-Mathf.Sign(body.linearVelocityX) * (Mathf.Abs(body.linearVelocityX) - temporaryMax) * temporarySlowdown, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transform.position == positionLastFrame && (input.actions.FindAction("Move").ReadValue<Vector2>().x == 0))
|
if (transform.position == positionLastFrame && (input.actions.FindAction("Move").ReadValue<Vector2>().x == 0))
|
||||||
|
|||||||
@@ -19,14 +19,21 @@ public class Punch : MonoBehaviour
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (actions.FindAction("Punch").ReadValue<float>() == 1f)
|
if (actions.FindAction("Punch").WasPressedThisFrame())
|
||||||
{
|
{
|
||||||
if (!cancelable) return;
|
if (!cancelable) return;
|
||||||
GetComponent<AnimationPlayer>().Punch();
|
ExecutePunch();
|
||||||
DisableCancellation();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExecutePunch()
|
||||||
|
{
|
||||||
|
print("Execution");
|
||||||
|
GetComponent<AnimationPlayer>().Punch();
|
||||||
|
DisableCancellation();
|
||||||
|
GetComponent<PlayerMovement>().maxSpeedOverride = 1f;
|
||||||
|
}
|
||||||
|
|
||||||
public void EnableHurtbox()
|
public void EnableHurtbox()
|
||||||
{
|
{
|
||||||
hurtbox.enabled = true;
|
hurtbox.enabled = true;
|
||||||
@@ -46,4 +53,9 @@ public class Punch : MonoBehaviour
|
|||||||
{
|
{
|
||||||
cancelable = true;
|
cancelable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ReturnToMaxSpeed()
|
||||||
|
{
|
||||||
|
GetComponent<PlayerMovement>().maxSpeedOverride = GetComponent<PlayerMovement>().maxSpeed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user