Guest User

AC Pause Resume problem

a guest
Oct 18th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System.Collections;
  2. using AC;
  3. using JetBrains.Annotations;
  4. using UnityEngine;
  5.  
  6. namespace Assets.Scripts.ACExtensions
  7. {
  8.     public class PauseResume : MonoBehaviour
  9.     {
  10.         [SerializeField] private ActionList _interaction;
  11.  
  12.         [UsedImplicitly]
  13.         private void Start()
  14.         {
  15.             StartCoroutine(PauseAndResume());
  16.         }
  17.  
  18.         private IEnumerator PauseAndResume()
  19.         {
  20.             yield return new WaitForSeconds(1.0f);
  21.             _interaction.Interact();
  22.             yield return new WaitForSeconds(2.0f);
  23.             _interaction.Pause();
  24.             KickStarter.actionListManager.Resume(_interaction);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment