Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Timeline;
  5.  
  6. public class Rotation : MonoBehaviour, ITimeControl {
  7.  
  8. [SerializeField] Vector3 axis = Vector3.up;
  9. [SerializeField] float speed = 1;
  10.  
  11. // 何度も呼ばれる
  12. public void SetTime (double time)
  13. {
  14. transform.localRotation = Quaternion.AngleAxis (((float) time) * speed, axis);
  15. }
  16.  
  17. // クリップ開始時に呼ばれる
  18. public void OnControlTimeStart ()
  19. {
  20. }
  21.  
  22. // クリップから抜ける時に呼ばれる
  23. public void OnControlTimeStop ()
  24. {
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement