Compare commits
5 Commits
Prototype
...
7f2c58f864
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f2c58f864 | ||
|
|
7a4f79ac6b | ||
|
|
14310f742f | ||
|
|
4a3f0ec740 | ||
|
|
2a5d8a0944 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -61,4 +61,6 @@ Thumbs.db.meta
|
||||
|
||||
# VS Code
|
||||
*.vscode
|
||||
.vsconfig
|
||||
.vsconfig
|
||||
|
||||
Assets/Level/Scenes/DevRoom/Perso/
|
||||
8
Assets/Code/Scripts/Enemies.meta
Normal file
8
Assets/Code/Scripts/Enemies.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d82ed499bde37d2bca7590ba5952894f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Code/Scripts/Enemies/LivingRoot.meta
Normal file
8
Assets/Code/Scripts/Enemies/LivingRoot.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91ac6bdb3a3fc30fa9e96966372092e3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
46
Assets/Code/Scripts/Enemies/LivingRoot/SlowdownArea.cs
Normal file
46
Assets/Code/Scripts/Enemies/LivingRoot/SlowdownArea.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SlowdownArea : MonoBehaviour
|
||||
{
|
||||
|
||||
[Header("References")]
|
||||
public float maxSlow;
|
||||
public float slowSpeed;
|
||||
public float timer;
|
||||
|
||||
private float baseSpeed;
|
||||
private bool isInZone = false;
|
||||
private PlayerMovement player;
|
||||
|
||||
private void OnTriggerEnter(Collider area)
|
||||
{
|
||||
if (area.CompareTag("Player")){
|
||||
player = area.GetComponent<PlayerMovement>();
|
||||
baseSpeed = player.WalkSpeed;
|
||||
isInZone = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider area)
|
||||
{
|
||||
if (area.CompareTag("Player"))
|
||||
{
|
||||
isInZone = false;
|
||||
timer = 0f;
|
||||
player.WalkSpeed = baseSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
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.WalkSpeed = baseSpeed * multiplicator;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbfa6ebdeb68bf2f6a5c4d25311b5811
|
||||
8
Assets/Level/Scenes/DevRoom.meta
Normal file
8
Assets/Level/Scenes/DevRoom.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a969c937a6e399209adc938b2591a18e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -36814,67 +36814,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1994839082}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!1001 &616194330
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 7.143099
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.5499998
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -11.581879
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8295937476714018201, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ThrowableCube
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8295937476714018201, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
--- !u!43 &696562523
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -108275,67 +108214,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1021798998}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!1001 &1679253409
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 6.8145223
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1.5500001
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -11.941306
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1945301683602458784, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8295937476714018201, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: ThrowableCube (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8295937476714018201, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: c786dcd5f720bb47dbf843bd97137452, type: 3}
|
||||
--- !u!43 &1713424934
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -144558,7 +144436,5 @@ SceneRoots:
|
||||
- {fileID: 2145812611}
|
||||
- {fileID: 153565765}
|
||||
- {fileID: 581107447}
|
||||
- {fileID: 616194330}
|
||||
- {fileID: 1679253409}
|
||||
- {fileID: 525042218}
|
||||
- {fileID: 1004343558}
|
||||
8
Assets/Level/Scenes/DevRoom/Perso.meta
Normal file
8
Assets/Level/Scenes/DevRoom/Perso.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ade185cbfcac340bb27b3e5084f5c32
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1168
Assets/Level/Scenes/DevRoom/Perso/PersoDevRoom.unity
Normal file
1168
Assets/Level/Scenes/DevRoom/Perso/PersoDevRoom.unity
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c90dca5ef1151259988c87df6c73a142
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user