So the scene picks a random image of four, at which point I want a count down to start that is waiting for user input, if the countdown hits 0 the user dies if the correct input is pressed then they move to the next scene - no other errors in compiler just invoke can't be called. This is one example of an image chosen. Hope i didn't copy this poorly or make a stupid letter error. please help
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Attack : MonoBehaviour {
public float timeRemaining = 2.0f;
float num;
void state_AttackUp () {
InvokeRepeating ("decreaseTimeRemaining", 1.0f, 1.0f);
if (Input.GetKeyDown (KeyCode.UpArrow)) {
CancelInvoke ("decreaseTimeRemaining");
Application.LoadLevel("Level6");
} else if (timeRemaining == 0) {
Application.LoadLevel("Level7");
}
}
↧