Compare commits

..

No commits in common. "36360d9dba767cc6b63659062e0c42594fbc8138" and "d9035be61b564a179661ee5c469eb0b3e129ebde" have entirely different histories.

2 changed files with 1 additions and 49 deletions

View File

@ -318,11 +318,6 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Player value: Player
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: dashTime
value: 0.2
objectReference: {fileID: 0}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8, - target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3} type: 3}
propertyPath: activeAbility.Array.size propertyPath: activeAbility.Array.size
@ -331,7 +326,7 @@ PrefabInstance:
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8, - target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3} type: 3}
propertyPath: activeAbility.Array.data[0] propertyPath: activeAbility.Array.data[0]
value: 0 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8, - target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3} type: 3}

View File

@ -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 public List<int> activeAbility = new List<int>(); //without ability=0 or null, dubleJump = 1, push/pull = 2, dash = 3
private bool dubleJump = true; private bool dubleJump = true;
private GameObject pushPullObject; private GameObject pushPullObject;
public float dashPower = 40f;
public float dashTime = 0.2f;
private float actualDashTime;
private int dashButton;
private bool startEating = false; 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() public GameObject GetPushPullObject()