Quantcast
Channel: Latest Questions by Kenshen112
Viewing all articles
Browse latest Browse all 16

C# Capture Keypress

$
0
0
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?

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>