feat: Water shader contact

This commit is contained in:
2026-06-09 16:53:45 +02:00
parent ff2ab17a50
commit 296c2bf68a
14 changed files with 4434 additions and 737 deletions

File diff suppressed because one or more lines are too long

View File

@@ -52,7 +52,7 @@ AnimatorState:
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 1827226128182048838, guid: 73d62a0e73492fa4882bcd58f6d3fb5c, type: 3}
m_Motion: {fileID: 7400000, guid: 9366d7b277567e94da3055474d57e36c, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
@@ -305,6 +305,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: -6381344988828740851}
m_Position: {x: 310, y: -280, z: 0}
- serializedVersion: 1
m_State: {fileID: 6482329360424829150}
m_Position: {x: 110, y: -220, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions:
- {fileID: 3102003643764817722}
@@ -315,6 +318,7 @@ AnimatorStateMachine:
- {fileID: 6118380436746846840}
- {fileID: -1393746875540931567}
- {fileID: 787173314633410819}
- {fileID: 2819468993935665014}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
@@ -377,6 +381,12 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: trigger_jumpRoll
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: trigger_fall
m_Type: 9
m_DefaultFloat: 0
@@ -502,6 +512,31 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &2819468993935665014
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: trigger_jumpRoll
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6482329360424829150}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.064502954
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &3102003643764817722
AnimatorStateTransition:
m_ObjectHideFlags: 1
@@ -566,6 +601,28 @@ BlendTree:
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 0
--- !u!1101 &4492810750458755865
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: 2666831125099755100}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.23042506
m_TransitionOffset: 0.02936235
m_ExitTime: 0.5391499
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &5056364956027464035
AnimatorState:
serializedVersion: 6
@@ -617,6 +674,33 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &6482329360424829150
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: jumpRoll
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 4492810750458755865}
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: b27fd29dea1321a4b868268a3ebabb5a, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!206 &7664462660922354015
BlendTree:
m_ObjectHideFlags: 1

View File

@@ -1,110 +0,0 @@
fileFormatVersion: 2
guid: 73d62a0e73492fa4882bcd58f6d3fb5c
ModelImporter:
serializedVersion: 24200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9366d7b277567e94da3055474d57e36c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b27fd29dea1321a4b868268a3ebabb5a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -3720,15 +3720,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.x
value: -9.93
value: -8.95
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.y
value: 7.57
value: 10.57
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.z
value: 22.31
value: 24.44
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalRotation.w
@@ -6225,11 +6225,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.x
value: -4.57
value: -3.06
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.y
value: 6.18
value: 7.5
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.z
@@ -12697,11 +12697,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.x
value: -8.93
value: -12.33
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.y
value: 5.13
value: 6.85
objectReference: {fileID: 0}
- target: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
propertyPath: m_LocalPosition.z
@@ -14832,6 +14832,75 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1997368252}
m_Mesh: {fileID: 89712945287117100, guid: 3d620c9bb0ffa294392346026c6ab8cf, type: 3}
--- !u!1001 &2001095125
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1460354215582670400, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_Name
value: PlayerDie
objectReference: {fileID: 0}
- target: {fileID: 1460354215582670400, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalPosition.x
value: -0.11212
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalPosition.y
value: 1.8465
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalPosition.z
value: 4.03828
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4881990645007621289, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5622814903896473750, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5622814903896473750, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d34206fa24da9c845a1ae3390884da1f, type: 3}
--- !u!4 &2060852412 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2819500458535056574, guid: d300926439843ef41a17d1d5a9504679, type: 3}
@@ -15328,3 +15397,4 @@ SceneRoots:
- {fileID: 278774735}
- {fileID: 879316445}
- {fileID: 19566490}
- {fileID: 2001095125}

View File

@@ -16,6 +16,7 @@ public class Player : MonoBehaviour
Idle,
Moving,
Jumping,
JumpingDouble,
Falling,
Dashing,
Stunned,
@@ -666,7 +667,10 @@ public class Player : MonoBehaviour
{
if (State.VerticalVelocity > 0)
{
State.CurrentState = PlayerState.Jumping;
if (!_doubleJump)
State.CurrentState = PlayerState.Jumping;
else
State.CurrentState = PlayerState.JumpingDouble;
}
else
{

View File

@@ -16,6 +16,7 @@ public class PlayerAnimation : MonoBehaviour
[System.Serializable]
private class PlayerAnimationStateMapper
{
[HideInInspector] public string Name;
public Player.PlayerState PlayerState;
public string AnimatorState;
public string BlockingState;
@@ -45,11 +46,12 @@ public class PlayerAnimation : MonoBehaviour
private void Init()
{
_stateMapper = new PlayerAnimationStateMapper[9];
_stateMapper = new PlayerAnimationStateMapper[10];
int i = 0;
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Idle.ToString(),
PlayerState = Player.PlayerState.Idle,
AnimatorState = "move",
BlockingState = "",
@@ -58,6 +60,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Moving.ToString(),
PlayerState = Player.PlayerState.Moving,
AnimatorState = "move",
BlockingState = "",
@@ -66,6 +69,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Jumping.ToString(),
PlayerState = Player.PlayerState.Jumping,
AnimatorState = "jump",
BlockingState = "fall",
@@ -74,6 +78,16 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.JumpingDouble.ToString(),
PlayerState = Player.PlayerState.JumpingDouble,
AnimatorState = "jumpRoll",
BlockingState = "fall",
Trigger = "trigger_jumpRoll",
};
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Dashing.ToString(),
PlayerState = Player.PlayerState.Dashing,
AnimatorState = "dash",
BlockingState = "",
@@ -82,6 +96,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Falling.ToString(),
PlayerState = Player.PlayerState.Falling,
AnimatorState = "fall",
BlockingState = "jump",
@@ -90,6 +105,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Stunned.ToString(),
PlayerState = Player.PlayerState.Stunned,
AnimatorState = "stun",
BlockingState = "",
@@ -98,6 +114,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Dead.ToString(),
PlayerState = Player.PlayerState.Dead,
AnimatorState = "eliminate",
BlockingState = "",
@@ -106,6 +123,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Loser.ToString(),
PlayerState = Player.PlayerState.Loser,
AnimatorState = "lose",
BlockingState = "",
@@ -114,6 +132,7 @@ public class PlayerAnimation : MonoBehaviour
_stateMapper[i++] = new PlayerAnimationStateMapper()
{
Name = Player.PlayerState.Winner.ToString(),
PlayerState = Player.PlayerState.Winner,
AnimatorState = "win",
BlockingState = "",

View File

@@ -88,6 +88,7 @@ public class PlayerDie : MonoBehaviour
Player.Instance.Pause();
Player.Instance.SetState(Player.PlayerState.Loser);
transform.position = Player.Instance.transform.position;
transform.rotation = Player.Instance.transform.rotation;
_references.UI.gameObject.SetActive(true);
_respawned = true;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff