コード例 #1
0
        public void CreateOrderParams()
        {
            Order = new Order(orderType);

            UnsuscribeToDrag();
            transformAction.onClick.AddListener(ShowActionsMenu);
            orderValue.onValueChanged.AddListener(OnInputValueChanged);

            InstructionsManager.OnSequencePaletteUpdate += OnSequencePaletteUpdated;

            ShowActionsMenu();
        }
コード例 #2
0
        private void MakeMovement(Order order)
        {
            if (order.movement != look)
            {
                AlertBasic.Show("Debes estar mirando hacia la direccion a la que vas", () => { SceneManager.LoadScene(SceneManager.GetActiveScene().name); });
                return;
            }

            Vector2 movementDirection = (GetCurrentDirection(order.movement) * movementAmount) * order.amount;
            LeanTween.move(characterRectTransform, characterRectTransform.anchoredPosition + movementDirection, 1).setOnComplete(() =>
               {
               stepsCounter++;
               Play();
               });
        }
コード例 #3
0
 public override void ShowOptions(Order currentOrder)
 {
     this.currentOrder = currentOrder;
     gameObject.SetActive(true);
 }
コード例 #4
0
        private void MakeTurn(Order order)
        {
            for (int i = 0; i < order.amount; i++)
            {
                if (order.turn == Turn.Left)
                {
                    currentLookDirection++;

                    if (currentLookDirection == turnSprites.Count)
                        currentLookDirection = 0;
                }
                else
                {
                    currentLookDirection--;

                    if (currentLookDirection < 0)
                        currentLookDirection = turnSprites.Count - 1;
                }
            }
            image.sprite = turnSprites[currentLookDirection];
            look = (Direction)currentLookDirection;

            stepsCounter++;
            Play();
        }
コード例 #5
0
 public abstract void ShowOptions(Order currentOrder);