From 2b2c52909a1df6682d6166a55df566eccbb242ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gervais?= Date: Sat, 9 Apr 2016 09:08:16 -0400 Subject: [PATCH] FEEDBACK : Pousser la plateforme avec le dash une fois qu'on touche au sol. (pas avant) --- Assets/Scripts/Astronaut.cs | 11 ++++--- Assets/_Scenes/Main.unity | 60 ++++++++++++++++++++++++++++++++----- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/Assets/Scripts/Astronaut.cs b/Assets/Scripts/Astronaut.cs index f087878..a688f50 100644 --- a/Assets/Scripts/Astronaut.cs +++ b/Assets/Scripts/Astronaut.cs @@ -146,12 +146,11 @@ public class Astronaut : MonoBehaviour { float radius = GetGroundRadius(); if (grounded = (height <= radius)) { - /*if (State == AstronautState.Dashing) + //Pousser la plateforme avec le dash une fois qu'on touche au sol. + if (State == AstronautState.Dashing) { - planet.PushWedge(Repeat(theta,360)); - State = AstronautState.Idle; - //TODO_SR Create dash impact here - }*/ + planet.PushWedge(this.theta); + } height = radius; if (State == AstronautState.Jumping) @@ -280,7 +279,7 @@ public class Astronaut : MonoBehaviour { lastDashTime = Time.time; - planet.PushWedge(this.theta); //TODO devrait se faire juste avant d'être groundé + //planet.PushWedge(this.theta); //TODO devrait se faire juste avant d'être groundé State = AstronautState.Dashing; _astronautAnimator.Dash(); //vSpeed = -DashSpeed; diff --git a/Assets/_Scenes/Main.unity b/Assets/_Scenes/Main.unity index c67181e..f7d6390 100644 --- a/Assets/_Scenes/Main.unity +++ b/Assets/_Scenes/Main.unity @@ -85,6 +85,56 @@ NavMeshSettings: cellSize: 0.16666667 manualCellSize: 0 m_NavMeshData: {fileID: 0} +--- !u!1001 &49842865 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalPosition.z + value: 0.11 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 494126, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 154602, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: m_Name + value: Astronaut_2 + objectReference: {fileID: 0} + - target: {fileID: 11434752, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: PlayerNumber + value: 2 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + m_IsPrefabParent: 0 --- !u!114 &1027139440 stripped MonoBehaviour: m_PrefabParentObject: {fileID: 11471614, guid: 198e988adacced646a19f757f6237ae1, @@ -273,13 +323,9 @@ Prefab: propertyPath: m_Name value: Astronaut_1 objectReference: {fileID: 0} - - target: {fileID: 11491252, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} - propertyPath: DustParticlesEmitter - value: - objectReference: {fileID: 138982, guid: 6233079c5a9a756458811f283fdca112, type: 2} - - target: {fileID: 11491252, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} - propertyPath: EjectSpinSpeed - value: -50 + - target: {fileID: 11434752, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2} + propertyPath: PlayerNumber + value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] m_ParentPrefab: {fileID: 100100000, guid: acd71c7b2f995984d9033c9dc4e257dc, type: 2}