Skip to content

Commit

Permalink
feat: 상호작용 코드 Creature, Crew로 이전 & 협동 작업 추가 (#33)
Browse files Browse the repository at this point in the history
* 상호작용 코드 Creature & Crew로 이전 & 협동 작업 추가

* bugfix: 오타 수정
  • Loading branch information
scarleter99 authored Mar 27, 2024
1 parent 0110ef8 commit 701fbe1
Show file tree
Hide file tree
Showing 20 changed files with 361 additions and 201 deletions.
126 changes: 105 additions & 21 deletions Client/Assets/Resources/Animators/Crew 1.controller
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AnimatorStateTransition:
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.875
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 3
Expand Down Expand Up @@ -157,7 +157,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.87644154
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 3
m_OrderedInterruption: 1
Expand Down Expand Up @@ -330,6 +330,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: 2875190249702602150}
m_Position: {x: -230, y: 360, z: 0}
- serializedVersion: 1
m_State: {fileID: 8639461085045882373}
m_Position: {x: 650, y: 360, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: -5117124462139058949}
Expand Down Expand Up @@ -392,8 +395,8 @@ AnimatorStateTransition:
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.90625
m_HasExitTime: 1
m_ExitTime: 0
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 3
m_OrderedInterruption: 1
Expand Down Expand Up @@ -440,7 +443,7 @@ AnimatorStateTransition:
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.89285713
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 3
Expand All @@ -460,61 +463,67 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: Damaged
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: SitParameter
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: Speed
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: X
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: Z
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: KeypadUse
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: PickUp
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: ButtonPush
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: PullLever
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: OpenDoor
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
Expand Down Expand Up @@ -567,6 +576,31 @@ BlendTree:
m_UseAutomaticThresholds: 0
m_NormalizedBlendValues: 0
m_BlendType: 0
--- !u!1101 &986018815045940253
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: OpenDoor
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 8639461085045882373}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.86966825
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!206 &1020237014835941706
BlendTree:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -661,8 +695,8 @@ AnimatorStateTransition:
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.000000004709941
m_HasExitTime: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 3
m_OrderedInterruption: 1
Expand Down Expand Up @@ -762,7 +796,7 @@ AnimatorState:
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400148, guid: 6844dcb6a866ab34fa96c67e39eab693, type: 3}
m_Motion: {fileID: -7329502530131931017, guid: 6844dcb6a866ab34fa96c67e39eab693, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
Expand Down Expand Up @@ -799,6 +833,28 @@ BlendTree:
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 0
--- !u!1101 &4129926344738580761
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: 4300114749108503531}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.1
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &4300114749108503531
AnimatorState:
serializedVersion: 6
Expand All @@ -814,9 +870,10 @@ AnimatorState:
- {fileID: -6396440929825834499}
- {fileID: 6624013179081625662}
- {fileID: 6524021641468062145}
- {fileID: 986018815045940253}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_IKOnFeet: 1
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
Expand Down Expand Up @@ -971,7 +1028,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.87644154
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 3
m_OrderedInterruption: 1
Expand All @@ -996,7 +1053,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.87644154
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 3
m_OrderedInterruption: 1
Expand Down Expand Up @@ -1059,6 +1116,33 @@ BlendTree:
m_UseAutomaticThresholds: 0
m_NormalizedBlendValues: 0
m_BlendType: 0
--- !u!1102 &8639461085045882373
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: WalkThroughDoor_RH
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 4129926344738580761}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 1
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400178, guid: 6844dcb6a866ab34fa96c67e39eab693, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!206 &8850675264801211515
BlendTree:
m_ObjectHideFlags: 1
Expand Down
6 changes: 3 additions & 3 deletions Client/Assets/Resources/Prefabs/Creatures/CrewA.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -5111,7 +5111,7 @@ Animator:
m_GameObject: {fileID: 7920281149799720858}
m_Enabled: 1
m_Avatar: {fileID: 9000000, guid: ee95e2ea9cb941d40955eac8c1ab3d05, type: 3}
m_Controller: {fileID: 9100000, guid: 6299dcf05aadb544fb750557a40c76ff, type: 2}
m_Controller: {fileID: 9100000, guid: c4d44f5e0d6c4a640b08771bfb2d3d6b, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
Expand Down Expand Up @@ -5212,8 +5212,8 @@ MonoBehaviour:
TotalWords: 5
ApplyTiming: 2
SyncSettings: 79
StateHashes: 000000005775fad1d53ab6546918b6d32ab685d02afa8626a8b5caa326c31e36e4b1df9473a11ec450111d6242f0ae2fcfc2d1012cd143fb0f61405d
TriggerHashes: 000000001e59b44b779675136918b6d3c64020f2f50acd2449905c91
StateHashes: 000000005775fad1d53ab6546918b6d32ab685d02afa8626a8b5caa326c31e36e4b1df9473a11ec450111d6242f0ae2fcfc2d1012cd143fb0f61405d461a4faaf6ebf0f4
TriggerHashes: 00000000779675136918b6d3c64020f2f50acd24c9ac5f0c
--- !u!114 &5850708474315694979
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ MonoBehaviour:
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 0
m_FillAmount: 0.421
m_FillAmount: 0
m_FillClockwise: 0
m_FillOrigin: 0
m_UseSpriteMesh: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public void PlayKeypadUse()
SetBool("KeypadUse", true);
}

public void PlayOpenDoor()
{
SetTrigger("OpenDoor");
}

public void PlayUseItem()
{
if (!IsAction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

public abstract class BaseInteractable : NetworkBehaviour
{
public abstract void CheckAndInteract(Creature creature);
public abstract bool CheckAndInteract(Creature creature);

public abstract void PlayInteract();
}
Loading

0 comments on commit 701fbe1

Please sign in to comment.