Compare commits
No commits in common. "36360d9dba767cc6b63659062e0c42594fbc8138" and "d9035be61b564a179661ee5c469eb0b3e129ebde" have entirely different histories.
36360d9dba
...
d9035be61b
@ -318,11 +318,6 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
|
||||
type: 3}
|
||||
propertyPath: dashTime
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
|
||||
type: 3}
|
||||
propertyPath: activeAbility.Array.size
|
||||
@ -331,7 +326,7 @@ PrefabInstance:
|
||||
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
|
||||
type: 3}
|
||||
propertyPath: activeAbility.Array.data[0]
|
||||
value: 0
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
|
||||
type: 3}
|
||||
|
@ -20,10 +20,6 @@ public class PlayerManager : MonoBehaviour
|
||||
public List<int> activeAbility = new List<int>(); //without ability=0 or null, dubleJump = 1, push/pull = 2, dash = 3
|
||||
private bool dubleJump = true;
|
||||
private GameObject pushPullObject;
|
||||
public float dashPower = 40f;
|
||||
public float dashTime = 0.2f;
|
||||
private float actualDashTime;
|
||||
private int dashButton;
|
||||
|
||||
private bool startEating = false;
|
||||
|
||||
@ -90,45 +86,6 @@ public class PlayerManager : MonoBehaviour
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (activeAbility.Count > 0 && activeAbility[0] == 3)
|
||||
{
|
||||
if (Input.GetKeyUp(KeyCode.D) || Input.GetKeyUp(KeyCode.A)) {
|
||||
if (actualDashTime < Time.time)
|
||||
{
|
||||
if (Input.GetKeyUp(KeyCode.D))
|
||||
{
|
||||
dashButton = 1;
|
||||
}
|
||||
else if (Input.GetKeyUp(KeyCode.A))
|
||||
{
|
||||
dashButton = 2;
|
||||
}
|
||||
actualDashTime = Time.time + dashTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dashButton == 1 && Input.GetKeyUp(KeyCode.D)) {
|
||||
rigidBody.AddForce(
|
||||
(transform.right * dashPower * 10 * 5 * 1 * Time.deltaTime) +
|
||||
(transform.up * 1 * 10 * Time.deltaTime),
|
||||
ForceMode.VelocityChange
|
||||
);
|
||||
dashButton = 0;
|
||||
actualDashTime = Time.time - 1f;
|
||||
}
|
||||
else if (dashButton == 2 && Input.GetKeyUp(KeyCode.A))
|
||||
{
|
||||
rigidBody.AddForce(
|
||||
(transform.right * dashPower * 10 * 5 * -1 * Time.deltaTime) +
|
||||
(transform.up * 1 * 10 * Time.deltaTime),
|
||||
ForceMode.VelocityChange
|
||||
);
|
||||
dashButton = 0;
|
||||
actualDashTime = Time.time - 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject GetPushPullObject()
|
||||
|
Loading…
Reference in New Issue
Block a user