private void Initiate(Meeple meeple) { this.meeple = meeple; this.start = meeple.standingOn; startCenter = start.Position.Center.ToVector2(); curArrow = new ArrowAnimatable(start.Position, "movementarrow", start.ZPosition + 1); CommandQueue.Queue(new AddToBoardCommand(curArrow)); // build direction vectors to each connected field directions = new Vector2[start.connectedFields.Count]; for (int i = 0; i < directions.Length; i++) { directions[i] = start.connectedFields[i].Position.Center.ToVector2() - startCenter; directions[i].Normalize(); } isActive = true; initiated = DateTime.Now; }
private async void RemoveArrowDelayed(ArrowAnimatable arrow) { await Task.Delay(500); CommandQueue.Queue(new RemoveFromBoardCommand(arrow)); }