Ejemplo n.º 1
0
        public void Init(string version)
        {
            instance          = this;
            serializer        = new BinaryFormatterSerializer();
            objectPool        = new ObjectPool();
            provider          = new PhotonNetworkProvider();
            messenger         = new HoloNetMessenger();
            players           = new PlayersManager();
            objectsManager    = new NetObjectsManager();
            stateSynchronizer = new StateSynchronizer();
            tickSynchronizer  = new TickSynchronizer();
            rooms             = new RoomsManager();

            provider.Init(version);
            objectsManager.Init();
            stateSynchronizer.Init();
            tickSynchronizer.Init();

            messenger.Pause();
            tickSynchronizer.Pause();

            serializer.RegisterSerializationRule <Vector3>(new Vector3SerializationRule());
            serializer.RegisterSerializationRule <Quaternion>(new QuaternionSerializationRule());
            serializer.RegisterSerializationRule <HoloNetPlayer>(new HoloNetPlayerSerializationRule());
        }
Ejemplo n.º 2
0
 //Инициализируем главный сервис навигации
 private async void SynchronizerInit(StateSynchronizer synchronizer)
 {
     await synchronizer.Init();
 }