watch 01:36
We're Getting Mutants in the MCU - The Loop
Do you like this video?
Play Sound
- using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class player : MonoBehaviour {
public float moveSpeed;
public float jumpHeight;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Imput.GetKey(KeyCode))
{
GetComponent<Rigidbody2d> ().velocity = new Vestor2 (0, jumpHeight);
}
}
}