Newer
Older
Dreamsturbia-Project-IADE-Unity3D / Assets / Scripts / TimeControl.cs
@Rackday Rackday on 21 Aug 409 bytes Project Added
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class TimeControl : MonoBehaviour
  5. {
  6. // Update is called once per frame
  7. void Update()
  8. {
  9. if (Input.GetKeyDown(KeyCode.RightArrow)) Time.timeScale +=1;
  10. if (Input.GetKeyDown(KeyCode.LeftArrow)) Time.timeScale -= 1;
  11. if (Input.GetKeyDown(KeyCode.DownArrow)) Time.timeScale = 1;
  12. }
  13. }