예제 #1
0
 private void TryChangeOffset(TransformOffset newOffset)
 {
     if (m_CurrentOffset != newOffset)
     {
         newOffset.ContinueFrom(m_CurrentOffset);
         m_CurrentOffset = newOffset;
     }
 }
예제 #2
0
        private void Awake()
        {
            m_Object = GetComponent <FPObject>();
            m_Weapon = m_Object as FPWeaponBase;
            m_Object.Draw.AddListener(On_Draw);
            m_Object.Holster.AddListener(On_Holster);

            SetupTransforms();

            Player.Land.AddListener(On_Land);
            m_CurrentOffset = m_IdleOffset;
        }
예제 #3
0
 public void ContinueFrom(TransformOffset state)
 {
     m_CurrentPosition = state.CurrentPosition;
     m_CurrentRotation = state.CurrentRotation;
 }
예제 #4
0
 private void On_Draw()
 {
     m_IdleOffset.Reset();
     m_CurrentOffset = m_IdleOffset;
     m_HolsterActive = false;
 }