2 Commits

Author SHA1 Message Date
Antoine2507
22da6f75e1 feat: adding personel devroom 2026-05-04 20:40:11 +02:00
Antoine Papillon
79dad388a1 refactor: resize scale player from 4 to 1 2026-05-01 22:12:29 +02:00
17 changed files with 143541 additions and 2092 deletions

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cd6d6893cb79bcda4bd1aebc58cdc64e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,56 +0,0 @@
using UnityEngine;
public class RootCrawler : MonoBehaviour
{
public Transform target;
public float maxHeight = 2f;
public float crawlingSpeed = 0.4f;
public float radius = 0.5f;
public float rotationSpeed = 5f;
public float noiseStrength = 0.06f;
public float noiseFrequency = 1.5f;
public int resolution = 80;
private float currentHeight = 0f;
private float noiseOffset;
private LineRenderer line;
private float angleOffset = 0f;
void Start()
{
line = GetComponent<LineRenderer>();
noiseOffset = Random.Range(0f, 100f);
}
void Update()
{
if (target == null)
return;
currentHeight += Time.deltaTime * crawlingSpeed;
currentHeight = Mathf.Clamp(currentHeight, 0f, maxHeight);
angleOffset += Time.deltaTime * 2f;
int currentResolution = Mathf.Max(2, Mathf.RoundToInt((currentHeight / maxHeight) * resolution));
line.positionCount = currentResolution;
for (int i = 0; i < currentResolution; i++) {
float t = (float)i / (currentResolution - 1);
float h = t * currentHeight;
float angle = t * rotationSpeed * maxHeight / crawlingSpeed + angleOffset;
float r = Mathf.Lerp(radius, radius * 0.5f, t);
float noiseX = (Mathf.PerlinNoise(noiseOffset + h * noiseFrequency, 0f) - 0.5f) * noiseStrength;
float noiseZ = (Mathf.PerlinNoise(0f, noiseOffset + h * noiseFrequency) - 0.5f) * noiseStrength;
float x = Mathf.Cos(angle) * r + noiseX;
float z = Mathf.Sin(angle) * r + noiseZ;
line.SetPosition(i, target.position + new Vector3(x, h - 0.8f, z));
}
float rotationMultiplier = 1f - (currentHeight / maxHeight);
angleOffset += Time.deltaTime * 2f * (rotationMultiplier + 0.1f);
}
}

View File

@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 32b713897b19bfd9fbc1d58800761b20

View File

@@ -2,62 +2,15 @@ using UnityEngine;
public class SlowdownArea : MonoBehaviour public class SlowdownArea : MonoBehaviour
{ {
// Start is called once before the first execution of Update after the MonoBehaviour is created
[Header("References")] void Start()
public float maxSlow;
public float slowSpeed;
public float timer;
public GameObject playerBody;
[Header("Root Crawler")]
public GameObject rootCrawlerPrefab;
private float baseJump;
private bool isInZone = false;
private PlayerMovement player;
private PlayerJump jump;
private GameObject currentCrawler;
private void OnTriggerEnter(Collider area)
{ {
if (area.CompareTag("Player")){
player = area.GetComponent<PlayerMovement>();
jump = area.GetComponent<PlayerJump>();
baseJump = 5.0f;
jump.JumpForce = 1.5f;
isInZone = true;
if (currentCrawler == null) {
currentCrawler = Instantiate(rootCrawlerPrefab, player.transform);
RootCrawler crawler = currentCrawler.GetComponent<RootCrawler>();
crawler.target = playerBody.transform;
}
}
}
private void OnTriggerExit(Collider area)
{
if (area.CompareTag("Player")) {
isInZone = false;
timer = 0f;
player.ApplySlow(1f);
player.ApplyAnimationSlow(1f);
jump.JumpForce = baseJump;
if (currentCrawler != null) {
Destroy(currentCrawler);
} }
}
}
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if (!isInZone || player == null)
return;
timer += Time.deltaTime;
float t = Mathf.Clamp(timer * slowSpeed, 0f, 1f);
float multiplicator = Mathf.Lerp(1f, maxSlow, t);
player.ApplySlow(multiplicator);
player.ApplyAnimationSlow(multiplicator);
} }
} }

View File

@@ -14,19 +14,12 @@ public class PlayerMovement : MonoBehaviour
private Vector3 moveDirection; private Vector3 moveDirection;
// used by root enemies (area tell -> player do)
private float baseWalkSpeed;
private float slowMultiplier = 1.0f;
private float animMultiplier = 1.0f;
private void Awake() private void Awake()
{ {
m_rigidbody = GetComponent<Rigidbody>(); m_rigidbody = GetComponent<Rigidbody>();
input = GetComponent<PlayerInputController>(); input = GetComponent<PlayerInputController>();
animator = GetComponent<Animator>(); animator = GetComponent<Animator>();
headController = GetComponent<PlayerHeadController>(); headController = GetComponent<PlayerHeadController>();
baseWalkSpeed = WalkSpeed;
animator.speed = 1.0f;
if (m_rigidbody != null) if (m_rigidbody != null)
{ {
@@ -34,17 +27,6 @@ public class PlayerMovement : MonoBehaviour
} }
} }
public void ApplySlow(float multiplier)
{
slowMultiplier = multiplier;
}
public void ApplyAnimationSlow(float multiplier)
{
animMultiplier = multiplier;
animator.speed = animMultiplier;
}
private void FixedUpdate() private void FixedUpdate()
{ {
Vector2 m_moveAmt = input.MoveAmount; Vector2 m_moveAmt = input.MoveAmount;
@@ -66,7 +48,7 @@ public class PlayerMovement : MonoBehaviour
if (headController.isHoldingHead) if (headController.isHoldingHead)
{ {
m_rigidbody.MovePosition( m_rigidbody.MovePosition(
m_rigidbody.position + Time.deltaTime * baseWalkSpeed * slowMultiplier * moveDirection m_rigidbody.position + Time.deltaTime * WalkSpeed * moveDirection
); );
} }
else else
@@ -74,7 +56,7 @@ public class PlayerMovement : MonoBehaviour
if (moveDirection.magnitude >= 0.1f) if (moveDirection.magnitude >= 0.1f)
{ {
m_rigidbody.MovePosition( m_rigidbody.MovePosition(
m_rigidbody.position + Time.deltaTime * baseWalkSpeed * slowMultiplier * moveDirection m_rigidbody.position + Time.deltaTime * WalkSpeed * moveDirection
); );
Quaternion targetRotation = Quaternion.LookRotation(moveDirection); Quaternion targetRotation = Quaternion.LookRotation(moveDirection);

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 7c55dd8d2533a9affb8abf17f934af76
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f50a662a00513985cabe01d57e553530
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,137 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RootMaterial
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.51
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.26895663, g: 0.2830189, b: 0.05473478, a: 1}
- _Color: {r: 0.2689566, g: 0.28301886, b: 0.05473476, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5536473030482320004
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 38c7fa1e1e8754643bb95c6529687ffc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,165 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1843330507631451878
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7919538883693841265}
- component: {fileID: 4811596309560135411}
- component: {fileID: 2561893503613331935}
m_Layer: 0
m_Name: rootCrawler
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7919538883693841265
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1843330507631451878}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.2, y: 9.29, z: -1.74}
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4811596309560135411
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1843330507631451878}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 32b713897b19bfd9fbc1d58800761b20, type: 3}
m_Name:
m_EditorClassIdentifier: '::'
target: {fileID: 0}
maxHeight: 2
crawlingSpeed: 0.5
radius: 0.5
rotationSpeed: 5
noiseStrength: 0.06
noiseFrequency: 1.5
resolution: 80
--- !u!120 &2561893503613331935
LineRenderer:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1843330507631451878}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 0
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 38c7fa1e1e8754643bb95c6529687ffc, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Positions:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 1}
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.1379261
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 0
textureScale: {x: 1, y: 1}
shadowBias: 0.5
generateLightingData: 0
m_UseWorldSpace: 1
m_Loop: 0
m_ApplyActiveColorSpace: 1

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 6b31f01266896d3bb88e98a31080bb65
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -631,15 +631,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3} - target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3}
propertyPath: m_LocalScale.x propertyPath: m_LocalScale.x
value: 4 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3} - target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3}
propertyPath: m_LocalScale.y propertyPath: m_LocalScale.y
value: 4 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3} - target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3}
propertyPath: m_LocalScale.z propertyPath: m_LocalScale.z
value: 4 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3} - target: {fileID: -4216859302048453862, guid: 82a2914d8f86c62488456950c8330e38, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@@ -1060,6 +1060,9 @@ MonoBehaviour:
ThrowForce: 20 ThrowForce: 20
PickupDistance: 10 PickupDistance: 10
isHoldingHead: 0 isHoldingHead: 0
HandTransform: {fileID: 0}
ItemThrowForce: 10
ItemPickupDistance: 5
--- !u!114 &2936940972087595065 --- !u!114 &2936940972087595065
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c90dca5ef1151259988c87df6c73a142 guid: 0d6592df1d7b185488bf479effca6aad
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: c5ad68f9e2725cafd8ef4cc7d7f118a1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -9,5 +9,6 @@ EditorBuildSettings:
path: Assets/Level/Scenes/Level/01/Level01.unity path: Assets/Level/Scenes/Level/01/Level01.unity
guid: 002c7c1365eb84470a077e39ac50a31c guid: 002c7c1365eb84470a077e39ac50a31c
m_configObjects: m_configObjects:
com.unity.input.settings: {fileID: 11400000, guid: 23cbff887a25b3802a937fef9deab3ec, type: 2}
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
m_UseUCBPForAssetBundles: 0 m_UseUCBPForAssetBundles: 0