Esempio n. 1
0
        public float DashSpeed       = 0.9f;  // per ms

        public SimulatorBasic2d(
            SnapInputManager <InputBasic2d, InputPackerBasic2d> input,
            Snapper <NentBasic2d, NentStaticBasic2d, PackerBasic2d, PackInfoBasic2d> nents)
        {
            Input = input;
            Nents = nents;

            NentDatas    = new ReArrayIdPool <SnapHistory <NentBasic2d, NentStaticBasic2d> > [2];
            NentDatas[0] = nents.FirstData;
            NentDatas[1] = nents.SecondData;
        }
Esempio n. 2
0
        public SimulatorBasic2d(
            SnapInputManager <InputBasic2d, InputPackerBasic2d> input,
            Snapper <NentBasic2d, NentStaticBasic2d, PackerBasic2d, PackInfoBasic2d> nents,
            AdvancerConfigBasic2d config)
        {
            Input = input;
            Nents = nents;

            Logician = new SnapInLogician <NentBasic2d, NentStaticBasic2d, PackerBasic2d, PackInfoBasic2d,
                                           InputBasic2d, InputPackerBasic2d,
                                           InAdvancerBasic2d, AdvancerConfigBasic2d>
                           (input, nents, config);
        }
Esempio n. 3
0
        public SnapBasic2dEnvironment(int clientCount)
        {
            Tenv = TestEnvironment.AutoConnected(clientCount,
                                                 (serv) =>
            {
                NetExecutorSnapper netSnap = new NetExecutorSnapper();
                NetSnappers.Add(netSnap);
                serv.AddExecutor(netSnap);

                SnapInputManager <InputBasic2d, InputPackerBasic2d> input =
                    InputManagerBasic2d.Make();
                netSnap.AddInputManager(input);
                Inputs.Add(input);

                Snapper <NentBasic2d, NentStaticBasic2d, PackerBasic2d, PackInfoBasic2d> nent =
                    SnapperBasic2d.Make();
                netSnap.AddSnapper(nent);
                Nents.Add(nent);

                SimulatorBasic2d sim = new SimulatorBasic2d(input, nent, new AdvancerConfigBasic2d());
                netSnap.LoadSimulator(sim);
                Sims.Add(sim);
            });
        }