Exemplo n.º 1
0
    // -------------------------------------------------------------------------------------------------------------------

    private void Awake()
    {
        m_instance = this;

        m_objectsToSimulate = new List <LockstepSimulation> ();
        m_commandQueueMine  = new Queue <Command> ();

        NetworkManager.instance.OnEnterMultiplayer += OnEnterMultiplayer;
        NetworkManager.instance.OnGameSetup        += OnGameSetup;

        m_initialized = false;

        m_state = State.RunningSinglePlayer;

        // Must be the same on all machines sharing a multiplayer game!
        m_simulationDeltaTime = 0.02f; // TODO: Should be Time.fixedDeltaTime, hard coded now to be able to simulate lag using fixedDeltaTime.
    }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     Lockstep lockstep = new Lockstep(NetworkManager.PType.Tcp, "127.0.0.1", 2551);
 }
Exemplo n.º 3
0
 public void Test1()
 {
     Lockstep lockstep = new Lockstep(NetworkManager.PType.Tcp, "127.0.0.1", 2551);
 }
Exemplo n.º 4
0
 protected override void OnExecute(Lockstep.Command com)
 {
     MovementGroupHandler.Execute (com);
 }