Created
September 21, 2017 14:24
-
-
Save tsubaki/17d5590a10449eb2333e24f369c0591c to your computer and use it in GitHub Desktop.
ITimeControlの例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Timeline; | |
public class Rotation : MonoBehaviour, ITimeControl { | |
[SerializeField] Vector3 axis = Vector3.up; | |
[SerializeField] float speed = 1; | |
// 何度も呼ばれる | |
public void SetTime (double time) | |
{ | |
transform.localRotation = Quaternion.AngleAxis (((float) time) * speed, axis); | |
} | |
// クリップ開始時に呼ばれる | |
public void OnControlTimeStart () | |
{ | |
} | |
// クリップから抜ける時に呼ばれる | |
public void OnControlTimeStop () | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment