Pause.cs 462 B

12345678910111213141516171819202122232425262728
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Pause : MonoBehaviour {
  5. public GameObject butPlay;
  6. Animator ani;
  7. // Use this for initialization
  8. void Start () {
  9. ani = butPlay.GetComponent<Animator> ();
  10. }
  11. // Update is called once per frame
  12. void Update () {
  13. if (Input.GetKeyDown(KeyCode.D)) {
  14. ani.speed = 0;
  15. PauseSign.sign = true;
  16. }
  17. }
  18. public void onClick(){
  19. PauseSign.sign = true;
  20. }
  21. }