|
|
|
|
|
|
void OnEnable() |
|
|
|
{ |
|
|
|
m_Director = GetComponent<PlayableDirector>(); |
|
|
|
m_Director.RebuildGraph(); |
|
|
|
m_Director.RebuildGraph(); |
|
|
|
if (Input.GetKeyDown(KeyCode.R)) |
|
|
|
{ |
|
|
|
m_Director.time = 0; |
|
|
|
m_Director.Play(); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else return; |
|
|
|
|
|
|
|
if(!m_Director.playableGraph.IsValid()) |
|
|
|
m_Director.RebuildGraph(); |
|
|
|
m_Director.playableGraph.GetRootPlayable(0).SetSpeed(m_Speed); |
|
|
|
} |
|
|
|
} |