Пример #1
0
 private CameraYawPitchRoll ChangeNormalMode()
 {
     if (m_NormalMode != null)
     {
         CameraThirdPerson tp  = m_NormalMode as CameraThirdPerson;
         CameraFirstPerson fp  = m_NormalMode as CameraFirstPerson;
         Transform         tar = null;
         if (tp != null)
         {
             tar = tp.m_Character;
         }
         if (fp != null)
         {
             tar = fp.m_Character;
         }
         string name = "Normal Mode F" + m_ControlType.ToString();
         m_NormalMode = m_Controller.ReplaceMode(m_NormalMode, name) as CameraYawPitchRoll;
         if (m_NormalMode is CameraThirdPerson)
         {
             (m_NormalMode as CameraThirdPerson).m_Character = tar;
         }
         if (m_NormalMode is CameraFirstPerson)
         {
             (m_NormalMode as CameraFirstPerson).m_Character = tar;
         }
         if (m_Controller.currentMode == m_NormalMode)
         {
             m_NormalMode.ModeEnter();
         }
     }
     return(m_NormalMode);
 }