From 25fba668c73038519e5441e23652efeba498494e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gervais?= Date: Fri, 8 Apr 2016 10:13:24 -0400 Subject: [PATCH] =?UTF-8?q?ajout=C3=A9=20variable=20stepSize,on=20a=20ajus?= =?UTF-8?q?tera?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/PlanetManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/PlanetManager.cs b/Assets/Scripts/PlanetManager.cs index f9df79b..325f791 100644 --- a/Assets/Scripts/PlanetManager.cs +++ b/Assets/Scripts/PlanetManager.cs @@ -12,6 +12,7 @@ public class PlanetManager : MonoBehaviour public bool CartierResetRatioSpeedRandomize = true; public float CartierMinRatio = 0.4f; public float CartierMaxRatio = 2.0f; + public float CartierStepSize = 0.25; public GameObject WedgePrefab = null; public List wedges = new List(); @@ -88,7 +89,7 @@ public class PlanetManager : MonoBehaviour var index = GetWedgeIndex(thetaPlayerX); var w = wedges[index]; - w.offset = w.offset - 0.25f; + w.offset = w.offset - CartierStepSize; if (w.offset < CartierMinRatio) w.offset = 0.5f; @@ -99,7 +100,7 @@ public class PlanetManager : MonoBehaviour var indexOppose = GetWedgeOpposé(index); var v = wedges[indexOppose]; - v.offset = v.offset + 0.25f; + v.offset = v.offset + CartierStepSize; if (v.offset > CartierMaxRatio) v.offset = 1.5f; @@ -224,7 +225,7 @@ public class PlanetManager : MonoBehaviour /// public class Wedge { - public float offset = 1.0f; //valeurs entre -1 et 1; -1 étant renfoncé, 0 position normale, et 1 vers l'extérieur + public float offset = 1.0f; //valeurs entre minRatio et maxRatio; < 1 étant renfoncé, 1 position normale, et > 1 vers l'extérieur public float tMin = 0; //theta min et theta max : angle thetat de début et fin du cartier; public float tMax = 0;