Fix som things on dash
This commit is contained in:
		@@ -214,6 +214,75 @@ Transform:
 | 
				
			|||||||
  m_Father: {fileID: 0}
 | 
					  m_Father: {fileID: 0}
 | 
				
			||||||
  m_RootOrder: 0
 | 
					  m_RootOrder: 0
 | 
				
			||||||
  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
					  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 | 
				
			||||||
 | 
					--- !u!1001 &509978202
 | 
				
			||||||
 | 
					PrefabInstance:
 | 
				
			||||||
 | 
					  m_ObjectHideFlags: 0
 | 
				
			||||||
 | 
					  serializedVersion: 2
 | 
				
			||||||
 | 
					  m_Modification:
 | 
				
			||||||
 | 
					    m_TransformParent: {fileID: 0}
 | 
				
			||||||
 | 
					    m_Modifications:
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996497, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_Name
 | 
				
			||||||
 | 
					      value: PushPullCube
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_RootOrder
 | 
				
			||||||
 | 
					      value: 4
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalPosition.x
 | 
				
			||||||
 | 
					      value: 4.67
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalPosition.y
 | 
				
			||||||
 | 
					      value: 0.76
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalPosition.z
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalRotation.w
 | 
				
			||||||
 | 
					      value: 1
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalRotation.x
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalRotation.y
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalRotation.z
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalEulerAnglesHint.x
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalEulerAnglesHint.y
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    - target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
 | 
				
			||||||
 | 
					        type: 3}
 | 
				
			||||||
 | 
					      propertyPath: m_LocalEulerAnglesHint.z
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
 | 
					    m_RemovedComponents: []
 | 
				
			||||||
 | 
					  m_SourcePrefab: {fileID: 100100000, guid: 597897b562955934fae65d62e0a8e3cd, type: 3}
 | 
				
			||||||
--- !u!1 &964739489
 | 
					--- !u!1 &964739489
 | 
				
			||||||
GameObject:
 | 
					GameObject:
 | 
				
			||||||
  m_ObjectHideFlags: 0
 | 
					  m_ObjectHideFlags: 0
 | 
				
			||||||
@@ -318,6 +387,11 @@ 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: activeAbility.Array.data[0]
 | 
				
			||||||
 | 
					      value: 0
 | 
				
			||||||
 | 
					      objectReference: {fileID: 0}
 | 
				
			||||||
    - target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
 | 
					    - target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
 | 
				
			||||||
        type: 3}
 | 
					        type: 3}
 | 
				
			||||||
      propertyPath: m_RootOrder
 | 
					      propertyPath: m_RootOrder
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,7 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
    public float dashTime = 0.2f;
 | 
					    public float dashTime = 0.2f;
 | 
				
			||||||
    private float actualDashTime;
 | 
					    private float actualDashTime;
 | 
				
			||||||
    private int dashButton;
 | 
					    private int dashButton;
 | 
				
			||||||
 | 
					    private bool dash = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private bool startEating = false;
 | 
					    private bool startEating = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -92,7 +93,7 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (activeAbility.Count > 0 && activeAbility[0] == 3)
 | 
					        else if (activeAbility.Count > 0 && activeAbility[0] == 3)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (Input.GetKeyUp(KeyCode.D) || Input.GetKeyUp(KeyCode.A)) {
 | 
					            if (Input.GetKeyUp(KeyCode.D) || Input.GetKeyUp(KeyCode.A) && !dash) {
 | 
				
			||||||
                if (actualDashTime < Time.time)
 | 
					                if (actualDashTime < Time.time)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (Input.GetKeyUp(KeyCode.D))
 | 
					                    if (Input.GetKeyUp(KeyCode.D))
 | 
				
			||||||
@@ -113,6 +114,7 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
                            (transform.up * 1 * 10 * Time.deltaTime),
 | 
					                            (transform.up * 1 * 10 * Time.deltaTime),
 | 
				
			||||||
                            ForceMode.VelocityChange
 | 
					                            ForceMode.VelocityChange
 | 
				
			||||||
                        );
 | 
					                        );
 | 
				
			||||||
 | 
					                        dash = true;
 | 
				
			||||||
                        dashButton = 0;
 | 
					                        dashButton = 0;
 | 
				
			||||||
                        actualDashTime = Time.time - 1f;
 | 
					                        actualDashTime = Time.time - 1f;
 | 
				
			||||||
                    } 
 | 
					                    } 
 | 
				
			||||||
@@ -123,6 +125,7 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
                            (transform.up * 1 * 10 * Time.deltaTime),
 | 
					                            (transform.up * 1 * 10 * Time.deltaTime),
 | 
				
			||||||
                            ForceMode.VelocityChange
 | 
					                            ForceMode.VelocityChange
 | 
				
			||||||
                        );
 | 
					                        );
 | 
				
			||||||
 | 
					                        dash = true;
 | 
				
			||||||
                        dashButton = 0;
 | 
					                        dashButton = 0;
 | 
				
			||||||
                        actualDashTime = Time.time - 1f;
 | 
					                        actualDashTime = Time.time - 1f;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
@@ -300,6 +303,7 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
            rigidBody.MovePosition(transform.position);
 | 
					            rigidBody.MovePosition(transform.position);
 | 
				
			||||||
            onGround = true;
 | 
					            onGround = true;
 | 
				
			||||||
            dubleJump = true;
 | 
					            dubleJump = true;
 | 
				
			||||||
 | 
					            dash = false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -308,6 +312,7 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
        if (other.tag == "Ground" || other.tag == "Objects")
 | 
					        if (other.tag == "Ground" || other.tag == "Objects")
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            onGround = false;
 | 
					            onGround = false;
 | 
				
			||||||
 | 
					            dash = false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -320,6 +325,9 @@ public class PlayerManager : MonoBehaviour
 | 
				
			|||||||
                onGround = true;
 | 
					                onGround = true;
 | 
				
			||||||
                dubleJump = true;
 | 
					                dubleJump = true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            if (onGround) {
 | 
				
			||||||
 | 
					                dash = false;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user