Why doesn’t this code make it so time plays at 3x speed until I use horizontal input?
It simply returns a 3x speed effect constantly. I’ve tried about 10 different combinations for this so far and I can only get it to work perfectly in reverse. IE time speeds up on horizontal and then returns to normal when input is null.
using UnityEngine;
using System.Collections;
public class FastMo : MonoBehaviour {
void start()
{
Time.timeScale = 3f;
}
void Update()
{
if (Input.GetButtonDown ("Horizontal"))
{
if (Time.timeScale == 3f)
Time.timeScale = 1f;
}
else
{
Time.timeScale = 3f;}
}
}