Beispiel #1
0
 void Awake()
 {
     Instance         = this;
     actionsToSync    = new Queue <IAction>();
     pendingActions   = new PendingActions(this);
     confirmedActions = new ConfirmedActions(this);
 }
Beispiel #2
0
    public PendingActions(LockStepMgr lsm)
    {
        this.lsm = lsm;

//		CurrentActions = new IAction[lsm.numberOfPlayers];
//		NextActions = new IAction[lsm.numberOfPlayers];
//		NextNextActions = new IAction[lsm.numberOfPlayers];
//		NextNextNextActions = new IAction[lsm.numberOfPlayers];


        CurrentActions      = new Dictionary <int, IAction>();
        NextActions         = new Dictionary <int, IAction>();
        NextNextActions     = new Dictionary <int, IAction>();
        NextNextNextActions = new Dictionary <int, IAction>();

        currentActionsCount      = 0;
        nextActionsCount         = 0;
        nextNextActionsCount     = 0;
        nextNextNextActionsCount = 0;
    }
Beispiel #3
0
 public ConfirmedActions(LockStepMgr lsm)
 {
     this.lsm = lsm;
     playersConfirmedCurrentAction = new List <int>(lsm.numberOfPlayers);
     playersConfirmedPriorAction   = new List <int>(lsm.numberOfPlayers);
 }