Exemple #1
0
 void Awake()
 {
     Instance         = this;
     actionsToSync    = new Queue <IAction>();
     pendingActions   = new PendingActions(this);
     confirmedActions = new ConfirmedActions(this);
 }
    public void PrepGameStart()
    {
        log.Debug("GameStart called. My PlayerID: " + Network.player.ToString());
        LockStepTurnID   = FirstLockStepTurnID;
        numberOfPlayers  = networkManager.NumberOfPlayers;
        pendingActions   = new PendingActions(this);
        confirmedActions = new ConfirmedActions(this);
        actionsToSend    = new Queue <IAction>();

        InitGameStartLists();

        nv.RPC("ReadyToStart", RPCMode.OthersBuffered, Network.player.ToString());
    }
Exemple #3
0
    // Use this for initialization
    void Start()
    {
        enabled           = false;
        _networkInterface = GetComponent <NetworkInterface>();

        _lockStepTurnID          = firstLockStepTurnID;
        _pendingActions          = new PendingActions(this);
        _confirmedActions        = new ConfirmedActions(this);
        _actionsToSend           = new Queue <Action>();
        _gameTurnSW              = new Stopwatch();
        _currentGameFrameRuntime = 0;
        allPlayers = new Dictionary <int, LockStepPlayer>();
    }
    public void PrepGameStart()
    {
        log.Debug("GameStart called. My PlayerID: " + Network.player.ToString());
        LockStepTurnID   = FirstLockStepTurnID;
        numberOfPlayers  = gameSetup.NumberOfPlayers;
        pendingActions   = new PendingActions(this);
        confirmedActions = new ConfirmedActions(this);
        actionsToSend    = new Queue <Action>();

        gameTurnSW = new Stopwatch();
        currentGameFrameRuntime = 0;
        networkAverage          = new RollingAverage(numberOfPlayers, initialLockStepTurnLength);
        runtimeAverage          = new RollingAverage(numberOfPlayers, initialGameFrameTurnLength);

        InitGameStartLists();

        nv.RPC("ReadyToStart", RPCMode.AllBuffered, Network.player.ToString());
    }
Exemple #5
0
    public void PrepGameStart()
    {
        log.Debug ("GameStart called. My PlayerID: " + Network.player.ToString());
        LockStepTurnID = FirstLockStepTurnID;
        numberOfPlayers = gameSetup.NumberOfPlayers;
        pendingActions = new PendingActions(this);
        confirmedActions = new ConfirmedActions(this);
        actionsToSend = new Queue<Action>();

        gameTurnSW = new Stopwatch();
        currentGameFrameRuntime = 0;
        networkAverage = new RollingAverage(numberOfPlayers, initialLockStepTurnLength);
        runtimeAverage = new RollingAverage(numberOfPlayers, initialGameFrameTurnLength);

        InitGameStartLists();

        nv.RPC ("ReadyToStart", RPCMode.AllBuffered, Network.player.ToString());
    }
    public void QuitClicked(){
		_pendingAction = ConfirmedActions.Quit;
		ScreenManager.Instance.ShowPopoup (ScreenManager.Popups.Confirmation);
	}
	public void BackClicked(){
		_pendingAction = ConfirmedActions.MainMenu;
		ScreenManager.Instance.ShowPopoup (ScreenManager.Popups.Confirmation);
	}