I'm making an RPG random Battle system and I would love to have the player enter a battle after taking a certain number of steps.
My code is:
using UnityEngine;
using System.Collections;
public class Battle : MonoBehaviour
{
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 that when I press KeyCode.UpArrow, Left, Right Or Down Steps adds 1?
↧