private void Update() { if (NetworkController.IsServer()) { OnAdvanceScrollInput(); } }
void Update() { if (Environment == Environment.PC && Input.GetKeyDown(KeyCode.Delete)) { NetworkController.CloseClient(); Application.Quit(); } if (!NetworkController.IsServer()) { return; } binding.CheckForInput(); }
void Update() { if (!networkController.IsServer()) { return; } if (graphController.GraphMode.Value == GraphMode.NODE_TRAVERSE) { if (nodeController.SelectedNode != null) { Vector3 targetPosition = GraphController.Graph.NodeObjectMap[nodeController.SelectedNode].transform.position + new Vector3(0, 3, 0); Entity.transform.position = Vector3.SmoothDamp(Entity.transform.position, targetPosition, ref velocity, SmoothTime); } } }
private void Start() { Connections.Pool = new GameObjectPool(Connections.Prefab, Connections.PreloadNumber, Connections.PoolContainer); if (NetworkController.IsServer()) { NetworkController.BeforeConnectionModeSync += mode => LoadNewConnectedNodeSet(NodeController.SelectedNode, FilterSelectedNodeSet, true, mode); NetworkController.BeforeSelectedNodeSync += node => LoadNewConnectedNodeSet(node, FilterSelectedNodeSet, true); NetworkController.BeforeHighlightedNodeSync += node => LoadNewConnectedNodeSet(node, FilterHighlightedNodeSet); } NodeController.OnSelectedNodeChanged += (oldNode, newNode) => ReloadSelectedNodeConnections(newNode); GraphController.ConnectionMode.OnValueChanged += mode => ReloadSelectedNodeConnections(NodeController.SelectedNode); NodeController.OnHighlightedNodeChanged += OnHighlightedNodeChanged; ConnectionLoadManager = new ConnectionLoadManager(this); }
void Start() { if (Environment == Environment.Cave) { Flysticks[0].GetComponent <LineRenderer>().enabled = ShowFlystickRays; } if (!NetworkController.IsServer()) { return; } InputProcessor input = GetEnvDependent((InputProcessor) new PCInputProcessor(PCConfig, PCInputBinding, this), new CaveInputProcessor(CaveConfig, CaveInputBinding, this)); binding = GetEnvDependent((InputBinding)PCInputBinding, CaveInputBinding); CaveInputBinding.SetPrimaryFlystick(0); binding.Init(); SetBlockInput(true, InputBlockType.INFO_SPACE); }