public GameResultCard(CardColor color, CardPosition position) { this.color = color; this.position = position; this.Init(); }
public async void LoadDetails(string username, string userurl, CardPosition cardPosition) { tbName.Text = username; switch (cardPosition) { case CardPosition.Left: sbLeft.Begin(); break; case CardPosition.Center: sbNormal.Begin(); break; case CardPosition.Right: sbRight.Begin(); break; } if(userurl != string.Empty) imgMain.Source = new BitmapImage(new Uri(userurl)); //var folder = await Windows.Storage.KnownFolders.PicturesLibrary.GetFolderAsync("ModernCSApp"); //var file = await folder.GetFileAsync(photo.PhotoId + "_" + photo.Secret + ".jpg"); //using (var stream = await file.OpenReadAsync()) //{ // BitmapImage bi = new BitmapImage(); // bi.SetSource(stream); // imgMain.Source = bi; //} //imgMain.Source = bi; if (ChangeViewState != null) ChangeViewState("Normal", EventArgs.Empty); }
public void SelectPosition(CardPosition pos) { m_position = pos; }
public bool HasPosition(CardPosition position) { return ((Position & (int)position) != 0); }
/// <summary> /// Called when it's a new phase. /// </summary> public void OnNewPhase() { m_selector = null; m_nextSelector = null; m_option = -1; m_position = CardPosition.FaceUpAttack; if (Duel.Player == 0 && Duel.Phase == Phase.Draw) _dialogs.SendNewTurn(); }
/// <summary> /// Called when the AI has to select a card position. /// </summary> /// <param name="cardId">Id of the card to position on the field.</param> /// <param name="positions">List of available positions.</param> /// <returns>Selected position.</returns> public CardPosition OnSelectPosition(int cardId, IList<CardPosition> positions) { // Selects the selected position if available, the first available otherwise. if (positions.Contains(m_position)) { CardPosition old = m_position; m_position = CardPosition.FaceUpAttack; return old; } return positions[0]; }
public bool HasPosition(CardPosition position) { return((Position & (int)position) != 0); }
public void ChangePosition(CardPosition <Card> position) { positionMachine.ChangeState(position); }
public void SelectPosition(CardPosition pos) { m_position.Add(pos); }
public void DestroyCreatureUI(CardPosition position) { //Destroy the CreatureUI associated with position }