using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class object : MonoBehaviour
{
public int velocity = 1;
private Rigidbody2D rb;
void Awake()
{
rb = GetComponent<Rigidbody2D>();
}
void Update()
{
if (Input.GetKey("space"))
rb.velocity = Vector3.down* velocity;
if (Input.GetMouseButtonDown(0))
rb.velocity = Vector3.up * velocity;
}