コード例 #1
0
    protected override void OnInitialize()
    {
        var tr = new FakeTransporter();
        //var seed = this.world.id;
        //UnityEngine.Random.InitState(seed);
        //tr.randomState = UnityEngine.Random.Range(0, 1000);

        var instance = this as ME.ECS.Network.INetworkModule <State>;

        instance.SetTransporter(tr);
        instance.SetSerializer(new FakeSerializer());
    }
コード例 #2
0
ファイル: NetworkModule.cs プロジェクト: cleancoindev/ecs
        protected override void OnInitialize()
        {
            var tr   = new FakeTransporter(this.GetNetworkType());
            var seed = this.world.id;

            UnityEngine.Random.InitState(seed);
            tr.randomState = UnityEngine.Random.Range(0, 1000);

            var instance = (ME.ECS.Network.INetworkModuleBase) this;

            instance.SetTransporter(tr);
            instance.SetSerializer(new FakeSerializer());

            this.transporter = tr;
        }