Exemple #1
0
    IEnumerator Record()
    {
        records         = new List <Pose> (recordCount);
        isRecording     = true;
        recordBeginTime = Time.time;
        Poser poser = currentShelf.CurrentPoser();

        UpdateInfoText(INFO_TEXT_NOW_RECORDING);

        for (int i = 0; i < recordCount; i++)
        {
            if (isRecording == false || records == null)
            {
                recordBeginTime = 0;
                yield break;
            }
            records.Add(poser.GetCurrentPose());
            yield return(new WaitForSeconds(recordInterval));
        }

        isRecording = false;

        poser.DisconnectFromRigidbody();
        poser.Highlighted = Highlightable.HighlightDegree.Pale;
        poser.EditEnabled = false;

        UpdateInfoText(INFO_TEXT_RECORDING_DONE);
        EnqueueCommentText(COMMENT_TEXT_RECORDING_DONE_BY_TIMER);
    }