public void CreateOrderParams() { Order = new Order(orderType); UnsuscribeToDrag(); transformAction.onClick.AddListener(ShowActionsMenu); orderValue.onValueChanged.AddListener(OnInputValueChanged); InstructionsManager.OnSequencePaletteUpdate += OnSequencePaletteUpdated; ShowActionsMenu(); }
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(); }); }
public override void ShowOptions(Order currentOrder) { this.currentOrder = currentOrder; gameObject.SetActive(true); }
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(); }
public abstract void ShowOptions(Order currentOrder);