Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public class Demo_Playback : MonoBehaviour {
  2.  
  3. GameObject CAT;
  4.  
  5. // Use this for initialization
  6. void Start ()
  7. {
  8. CAT = GameObject.Find("C.A.T");
  9. }
  10.  
  11. // Update is called once per frame
  12. void Update ()
  13. {
  14. if (CAT != null)
  15. {
  16. if (Input.GetKeyDown(KeyCode.Space))
  17. {
  18. CAT.transform.GetChild(0).GetComponent<CAT_LayerContents>( ).PlayAndStopAtIndex(0, 3, .8f);
  19. }
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement