Esempio n. 1
0
 private void OnMouseDown()
 {
     if (InputSystem.Get().bWorldInputEnabled)
     {
         OnNodePressed?.Invoke(this);
     }
 }
Esempio n. 2
0
 private void TrySendPlayerToNode(MapNodeVisual SelectedNode)
 {
     if (MapUtils.AreNeighbourNodes(CurrentNode, SelectedNode))
     {
         Player.SendPlayerToNode(SelectedNode).onComplete += OnNodeReached;
         CurrentNode = SelectedNode;
         InputSystem.Get().bWorldInputEnabled = false;
     }
     else
     {
         print("Node " + SelectedNode.name + " is not reachable");
     }
 }
        private void LateUpdate()
        {
            if (!InputSystem.Get().bWorldInputEnabled)
            {
                return;
            }

            if (verticalTranslation.isActivated())
            {
                float translateY = Input.GetAxis(mouseVerticalAxisName) * verticalTranslation.sensitivity;
                transform.Translate(0, -translateY, 0);
            }

            if (horizontalTranslation.isActivated())
            {
                float translateX = Input.GetAxis(mouseHorizontalAxisName) * horizontalTranslation.sensitivity;
                transform.Translate(-translateX, 0, 0);
            }
        }
Esempio n. 4
0
        private void Start()
        {
            InputSystem.Get().bWorldInputEnabled = false;

            if (AddBackground)
            {
                Background = Instantiate(CorePrefabsConfig.Get().BackgroundWidgetPrefab);

                if (Background)
                {
                    Background.SetParent(transform);
                    Background.transform.SetSiblingIndex(0);
                    Background.Show();
                }
            }

            StartOpenWindowEvent();
            OnStartOpenWindow?.Invoke();
        }
Esempio n. 5
0
 private void OnDestroy()
 {
     // TODO: Add counter for opened windows
     InputSystem.Get().bWorldInputEnabled = true;
 }
Esempio n. 6
0
 private void OnNodeReached()
 {
     InputSystem.Get().bWorldInputEnabled = true;
     DOTween.Sequence().AppendInterval(GameInstance.Get().EnterNodeDelay).OnComplete(() => EnterNode(CurrentNode));
 }