// Update is called once per frame
void FixedUpdate()
{
if (Input.GetKey(“d”))
{
Rb.AddForce(30 * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
}
if (Input.GetKey(“a”))
{
Rb.AddForce(-30 * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
}
if (Input.GetKey(“w”))
{
Rb.AddForce(0, 0, 30 * Time.deltaTime, ForceMode.VelocityChange);
}
if (Input.GetKey("s"))
{
Rb.AddForce(0, 0, -30 * Time.deltaTime, ForceMode.VelocityChange);
}
if (Input.GetKey("left shift"))
{
Rb.AddForce(0, -30 * Time.deltaTime, 0, ForceMode.VelocityChange);
}
if (Input.GetKey("space"))
{
if (jumpsingle == true)
{
jumpsingle = false;
Rb.AddForce(0,ghgh, 0);
Instantiate(JUMPP,Rb.position + new Vector3(0,qp,0), Quaternion.identity);
}
}
if (Input.GetKey("y"))
{
FindObjectOfType<SCRmanager>().VFgameover();
}
if (Input.GetKey("v"))
{
if (YB == true)
{
YB = false;
Rb.AddForce(0, 2500, 0);
Debug.Log("l");
}
}
if (Input.GetKey("r"))
{
if (ZB == true)
{
ZB = false;
Rb.AddForce(0, 0, 2500);
Debug.Log("kkkj");
}
}
if (Rb.position.y < -17)
{
FindObjectOfType<SCRmanager>().VFgameover();
}
if (Rb.position.y < -14)
{
Debug.Log("poop");
if (isend == true)
{
pop.SetActive(true);
}
}
}