Пример #1
0
 // Record the gameobjects data
 public void RecordData()
 {
     // Check each component is going to be rewound then call that components
     // Record function as well as passing down the time interval float
     if (m_rewindable.GetRotBool())
     {
         m_rewindable.GetRotComp().SetTimeInterval(m_timeInterval);
         m_rewindable.GetRotComp().RecordRot();
     }
     if (m_rewindable.GetMatBool())
     {
         m_rewindable.GetRotComp().SetTimeInterval(m_timeInterval);
         m_rewindable.GetMatComp().RecordMat();
     }
     if (m_rewindable.GetPosBool())
     {
         m_rewindable.GetRotComp().SetTimeInterval(m_timeInterval);
         m_rewindable.GetPosComp().RecordPos();
     }
     if (m_rewindable.GetAnimBool())
     {
         m_rewindable.GetRotComp().SetTimeInterval(m_timeInterval);
         m_rewindable.GetAnimComp().RecordAnim();
     }
 }
Пример #2
0
 void PassRateOfChange()
 {
     if (m_rewindable.GetMatBool())
     {
         m_rewindable.GetMatComp().SetRateOfChange(m_rateOfChange);
     }
     if (m_rewindable.GetRotBool())
     {
         m_rewindable.GetRotComp().SetRateOfChange(m_rateOfChange);
     }
     if (m_rewindable.GetPosBool())
     {
         m_rewindable.GetPosComp().SetRateOfChange(m_rateOfChange);
     }
     if (m_rewindable.GetAnimBool())
     {
         m_rewindable.GetAnimComp().SetRateOfChange(m_rateOfChange);
     }
 }