I’ve written these codes D How do I go back to pressing forward or how can I go back to press space
using UnityEngine;
using System.Collections;
public class PlayerManager : MonoBehaviour
{
Animator anim;
// Use this for initialization
void Start()
{
anim = GetComponent();
}
// Update is called once per frame
void Update()
{
// handling the idle - running - idle state change
if (Input.GetKeyDown(KeyCode.D))
{
anim.SetInteger(“State”, 1);
}
if (Input.GetKeyUp(KeyCode.D))
{
anim.SetInteger(“State”, 0);
}
//
}
}