// Use this for initialization void Start() { //Get network view _lockStepManager = GetComponent <LockStepManager>(); _networkInterface = GetComponent <NetworkInterface>(); _buttonOfPlayersSelected = _numberOfPlayers - 1; }
void Start() { test = GameObject.Find("LockstepManager").GetComponent <LockStepManager>(); List <byte> data = SerializationCtrl.Serialize(new byte[10000]); testArr = data.ToArray(); }
//Initialize all the arrays public PendingActions(LockStepManager lsm) { this._lockStepManager = lsm; currentActions = new Dictionary <int, Action>(); _nextActions = new Dictionary <int, Action>(); _nextNextActions = new Dictionary <int, Action>(); _nextNextNextActions = new Dictionary <int, Action>(); }
public void Init(int clientId, GameObject clientAssets) { this.ID = clientId; this.m_clientAssets = clientAssets; LoadClientAssets(); InitReadyBtn(); this.m_lockStepManager = new LockStepManager(); }
public ConfirmedActions(LockStepManager lsm) { this._lockStepManager = lsm; _confirmedCurrent = new Dictionary <int, bool>(); _confirmedPrior = new Dictionary <int, bool>(); _currentSW = new Stopwatch(); _priorSW = new Stopwatch(); }
// Use this for initialization void Start() { enabled = false; Instance = this; nv = GetComponent <NetworkView>(); networkManager = FindObjectOfType(typeof(NetworkManager)) as NetworkManager; networkManager.OnGameStart += PrepGameStart; }
void Start() { MessageReceived += ServiceLocator.GetService <NetworkingManager>().DecodeServerMessage; clients = new List <ServerClient>(); ClientAccepted += SendMessage; _lockStepManager = gameObject.AddComponent <LockStepManager>(); //OnAllPlayersConnected += SendTestMsg; AllPlayersConnected += _lockStepManager.StartGame; LockStepManager.NextTurn += incTurns; RunServer(); }
public PendingActions(LockStepManager lsm) { this.lsm = lsm; CurrentActions = new IAction[lsm.numberOfPlayers]; NextActions = new IAction[lsm.numberOfPlayers]; NextNextActions = new IAction[lsm.numberOfPlayers]; NextNextNextActions = new IAction[lsm.numberOfPlayers]; currentActionsCount = 0; nextActionsCount = 0; nextNextActionsCount = 0; nextNextNextActionsCount = 0; }
public PendingActions(LockStepManager lsm) { this.lsm = lsm; CurrentActions = new Action[lsm.numberOfPlayers]; NextActions = new Action[lsm.numberOfPlayers]; NextNextActions = new Action[lsm.numberOfPlayers]; NextNextNextActions = new Action[lsm.numberOfPlayers]; currentActionsCount = 0; nextActionsCount = 0; nextNextActionsCount = 0; nextNextNextActionsCount = 0; }
public ConfirmedActions(LockStepManager lsm) { this.lsm = lsm; confirmedCurrent = new bool[lsm.numberOfPlayers]; confirmedPrior = new bool[lsm.numberOfPlayers]; ResetArray(confirmedCurrent); ResetArray(confirmedPrior); confirmedCurrentCount = 0; confirmedPriorCount = 0; currentSW = new Stopwatch(); priorSW = new Stopwatch(); }
public PendingCommnads() { _lockStepManager = LockStepManager.Instance; CurrentCommands = new Command[_lockStepManager.NumberOfPlayers]; _nextCommands = new Command[_lockStepManager.NumberOfPlayers]; _nextNextCommands = new Command[_lockStepManager.NumberOfPlayers]; _nextNextNextCommands = new Command[_lockStepManager.NumberOfPlayers]; _currentCommandsCount = 0; _nextCommandsCount = 0; _nextNextCommandsCount = 0; _nextNextNextCommandsCount = 0; }
public ConfirmedActions(LockStepManager lsm) { this.lsm = lsm; confirmedCurrent = new bool[lsm.numberOfPlayers]; confirmedPrior = new bool[lsm.numberOfPlayers]; ResetArray(confirmedCurrent); ResetArray (confirmedPrior); confirmedCurrentCount = 0; confirmedPriorCount = 0; currentSW = new Stopwatch(); priorSW = new Stopwatch(); }
public void OnReceive(LockStepManager mngr) { mngr.PrintDebug(DebugLevel.DATA_ONLY, "RpcNetworkData msgObj={0}", msgObj); try { string nameObject = msgObj.gameObjName; string nameComponent = msgObj.componentName; string nameMethod = msgObj.methodName; GameObject obj = GameObject.Find(nameObject); Component component = obj.GetComponent(nameComponent); System.Reflection.MethodInfo method = component.GetType().GetMethod(nameMethod); method.Invoke(component, msgObj.parameters); } catch (System.Exception e) { mngr.ReactToError("Caught Exception during RPC invocation. Exception={0}", e); } }
// Use this for initialization void Start() { _networkViewComponent = GetComponent <NetworkView>(); if (_networkViewComponent == null) { Debug.Log("Fatal error : didn't find NetworkView"); } _lockStepManager = GetComponent <LockStepManager>(); if (_lockStepManager == null) { Debug.Log("Fatal error : didn't find LockStepManager"); } _connectionManager = GetComponent <ConnectionManager>(); if (_connectionManager == null) { Debug.Log("Fatal error : didn't find ConnectionManager"); } }
// Use this for initialization void Start() { enabled = false; Instance = this; nv = GetComponent<NetworkView>(); gameSetup = FindObjectOfType(typeof(NetworkManager)) as NetworkManager; gameSetup.OnGameStart += PrepGameStart; }
void Start() { enabled = false; Instance = this; }
public ConfirmedActions(LockStepManager lsm) { this.lsm = lsm; playersConfirmedCurrentAction = new List<NetworkPlayer>(lsm.numberOfPlayers); playersConfirmedPriorAction = new List<NetworkPlayer>(lsm.numberOfPlayers); }
public void OnReceive(LockStepManager mngr) { mngr.PrintDebug(DebugLevel.DATA_ONLY, "RawNetworkData rawArr={0}", rawArr); mngr.TriggerRawDataCallbacks(rawArr); }
public void Init() { m_lockStepManager = new LockStepManager(this); VirtualManager.Instance.ConnectToServer(ID); }
public ConfirmedActions(LockStepManager lsm) { this.lsm = lsm; playersConfirmedCurrentAction = new List <NetworkPlayer>(lsm.numberOfPlayers); playersConfirmedPriorAction = new List <NetworkPlayer>(lsm.numberOfPlayers); }
public ConfirmedActions(LockStepManager lsm) { this.lsm = lsm; }
public void OnReceive(LockStepManager mngr) { mngr.PrintDebug(DebugLevel.DATA_ONLY, "EventNetworkData eventObj={0}", eventObj); CustomEventSystem.EventManager.Instance.HandleEvent(eventObj); }