So I'm making an rpg random Battle system an i would love o have my char enter a battle after walking so much my code is
`using UnityEngine;
using System.Collections;
public class Battle : MonoBehaviour
{
void Start()
{
}
int Steps;
bool Go;
void Counter()
{
Steps = Steps + 10;
if (Steps == 100)
{
Go = true;
}
if (Go = true)
{
Application.LoadLevel("Battle1");
}
}
}`
How do i make it so when i press KeyCode.UpArrow Left Right Or down Steps adds 1?
↧