added chopping and mining, added particles for trees

This commit is contained in:
TAASONI3
2024-06-22 20:22:17 +02:00
parent 7b9683bb49
commit cbd086d658
15 changed files with 22023 additions and 589 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: dfe6f42559279b9f2a43256075839781
guid: b6f5bfd53f502aa33a1066fae2506e7f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000

View File

@@ -81,16 +81,16 @@ AnimatorStateMachine:
m_Position: {x: 260, y: -50, z: 0}
- serializedVersion: 1
m_State: {fileID: -2600215542219053945}
m_Position: {x: 490, y: -290, z: 0}
m_Position: {x: 780, y: -250, z: 0}
- serializedVersion: 1
m_State: {fileID: 2517434392923035321}
m_Position: {x: 570, y: 180, z: 0}
m_Position: {x: 210, y: 60, z: 0}
- serializedVersion: 1
m_State: {fileID: -2961105820709773878}
m_Position: {x: 790, y: -310, z: 0}
- serializedVersion: 1
m_State: {fileID: 7708062428621576211}
m_Position: {x: 410, y: 80, z: 0}
m_Position: {x: 450, y: 60, z: 0}
- serializedVersion: 1
m_State: {fileID: -8563349213657961902}
m_Position: {x: 520, y: -50, z: 0}
@@ -107,6 +107,50 @@ AnimatorStateMachine:
m_ExitPosition: {x: 860, y: -30, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 4026934837641483164}
--- !u!1101 &-4201526255213873428
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: 4026934837641483164}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6590909
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-3900587270583262934
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: 4026934837641483164}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-2961105820709773878
AnimatorState:
serializedVersion: 6
@@ -275,9 +319,10 @@ AnimatorState:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Chopping
m_Speed: 1
m_Speed: 0.5
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: -4201526255213873428}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -391,9 +436,10 @@ AnimatorState:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Mining
m_Speed: 1
m_Speed: 0.5
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: -3900587270583262934}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -403,7 +449,7 @@ AnimatorState:
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
m_Motion: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:

View File

@@ -147,4 +147,5 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4fc88a9ab15a9238baf100c2fd070aa7, type: 3}
m_Name:
m_EditorClassIdentifier:
clip: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
clip: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
keepAlive: 0

View File

@@ -147,4 +147,5 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4fc88a9ab15a9238baf100c2fd070aa7, type: 3}
m_Name:
m_EditorClassIdentifier:
clip: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
clip: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
keepAlive: 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -180,7 +180,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab6955d1e578ef1b88f1ee3b6fa83051, type: 3}
m_Name:
m_EditorClassIdentifier:
clip: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
clip: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
keepAlive: 0
--- !u!1 &8310517336631356992
GameObject:
m_ObjectHideFlags: 0

View File

@@ -180,7 +180,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab6955d1e578ef1b88f1ee3b6fa83051, type: 3}
m_Name:
m_EditorClassIdentifier:
clip: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
clip: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
keepAlive: 0
--- !u!1 &8774396427657433139
GameObject:
m_ObjectHideFlags: 0

View File

@@ -180,7 +180,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab6955d1e578ef1b88f1ee3b6fa83051, type: 3}
m_Name:
m_EditorClassIdentifier:
clip: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
clip: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
keepAlive: 0
--- !u!1 &7892395422436754689
GameObject:
m_ObjectHideFlags: 0

View File

@@ -180,7 +180,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ab6955d1e578ef1b88f1ee3b6fa83051, type: 3}
m_Name:
m_EditorClassIdentifier:
clip: {fileID: 7400000, guid: dfe6f42559279b9f2a43256075839781, type: 2}
clip: {fileID: 7400000, guid: b6f5bfd53f502aa33a1066fae2506e7f, type: 2}
keepAlive: 0
--- !u!1 &7170566803458479965
GameObject:
m_ObjectHideFlags: 0

View File

@@ -18611,8 +18611,8 @@ MeshRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 927922402}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
@@ -27708,8 +27708,8 @@ MeshRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1438812379}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1

View File

@@ -27,9 +27,8 @@ namespace Assets.Scripts.InteractableObjects
public void OnInteraction(GameObject player)
{
//StartCoroutine(playParticle(player));
//StartCoroutine(playAnimation(player));
StartCoroutine(playParticle(player));
StartCoroutine(playAnimation(player));
handleInteraction(player);
}
@@ -55,30 +54,8 @@ namespace Assets.Scripts.InteractableObjects
{
if (clip != null)
{
Animator animator = player.GetComponent<Animator>();
AnimationClip[] clips = animator.runtimeAnimatorController.animationClips;
float length = 0;
foreach (AnimationClip clip in clips)
{
if (clip.name.ToLower() == "disarming")
{
length = clip.length;
break;
}
}
if (player.GetComponent<PlayerGameObject>().isArmed)
{
player.GetComponent<Animator>().Play("Disarming");
yield return new WaitForSeconds(length);
}
player.GetComponent<Animator>().Play(clip.name);
yield return new WaitForSeconds(clip.length);
if (player.GetComponent<PlayerGameObject>().isArmed)
{
player.GetComponent<Animator>().Play("Arming");
yield return new WaitForSeconds(length);
}
}
animationPlayed = true;
}