mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-25 02:50:58 +00:00
déasctivé R pour le dash, se fait maintenant par un double jump.
This commit is contained in:
parent
6c11a27e46
commit
7082931f3a
@ -197,13 +197,25 @@ public class Astronaut : MonoBehaviour {
|
|||||||
|
|
||||||
theta = newTheta;
|
theta = newTheta;
|
||||||
}
|
}
|
||||||
|
if (State == AstronautState.Dashing && grounded)
|
||||||
|
{
|
||||||
|
//TODO arreter mouvelement lateral
|
||||||
|
State=AstronautState.Idle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Jump()
|
public void Jump()
|
||||||
{
|
{
|
||||||
if (State >= AstronautState.Ejecting || State == AstronautState.Jumping)
|
if (State >= AstronautState.Ejecting)
|
||||||
return;
|
return;
|
||||||
if (!grounded) return;
|
if (State == AstronautState.Jumping)
|
||||||
|
{
|
||||||
|
Dash();
|
||||||
|
State=AstronautState.Dashing; //TODO relacher l'état Dashing
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!grounded) return;
|
||||||
vSpeed = JumpSpeed;
|
vSpeed = JumpSpeed;
|
||||||
grounded = false;
|
grounded = false;
|
||||||
State = AstronautState.Jumping;
|
State = AstronautState.Jumping;
|
||||||
|
|||||||
@ -49,14 +49,17 @@ public class AstronautController : MonoBehaviour {
|
|||||||
|
|
||||||
_astronaut.Move(xValue, yValue);
|
_astronaut.Move(xValue, yValue);
|
||||||
|
|
||||||
if (input.Ranges.ContainsKey("Dash"))
|
|
||||||
{
|
|
||||||
if (input.Ranges["Dash"] > 0.8f)
|
|
||||||
{
|
|
||||||
_astronaut.Dash();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
// le dash se fait par double jump avec un state change.
|
||||||
|
|
||||||
|
//if (input.Ranges.ContainsKey("Dash"))
|
||||||
|
//{
|
||||||
|
// if (input.Ranges["Dash"] > 0.8f)
|
||||||
|
// {
|
||||||
|
// _astronaut.Dash();
|
||||||
|
// }
|
||||||
|
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandlePlayerButtons(MappedInput input)
|
private void HandlePlayerButtons(MappedInput input)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user