Пример #1
0
        private void Register()
        {
            if (m_Instance == null && Controller == null)
            {
                m_Instance = m_Environment.GetMobilePartyByIndex(State.PartyId);
                if (m_Instance == null)
                {
                    throw new Exception($"Mobile party id {State.PartyId} not found.");
                }

                m_Environment.TargetPosition.SetSyncHandler(m_Instance, GoToPosition);
            }
        }
        private void Register()
        {
            if (m_Instance == null && Controller == null)
            {
                m_Instance = m_Environment.GetMobilePartyByIndex(State.PartyId);
                if (m_Instance == null)
                {
                    Logger.Error(
                        "Mobile party id {} not found in the local game state. Desync?",
                        State.PartyId);
                    return;
                }

                m_Environment.TargetPosition.SetHandler(m_Instance, GoToPosition);
            }
        }