Ejemplo n.º 1
0
        /// <summary>
        /// Opens a new CardWindow Agility
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void OpenCardWindow_Agility_Click(Object sender, RoutedEventArgs e)
        {
            if (sender == null)
            {
                return;
            }

            var listBox = sender as ListBox;

            if (listBox == null || listBox.Items.Count == 0)
            {
                return;
            }

            // get selected index
            var item = listBox.SelectedIndex;


            var currentPlayer = game.GetPlayerByID(currentPlayerID);

            if (currentPlayer.Agility[item] != null)
            {
                // get player's card by index of SelectedItem -> Item
                var cardWindow = new CardWindow(currentPlayer.Agility[item]);
                cardWindow.Show();
            }
        }
Ejemplo n.º 2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Ejemplo n.º 3
0
    public void OnTbtCardPressButtonEvent(object o, EventArgs e)
    {
        Console.WriteLine("TbtCard");
        CardWindow cw = new CardWindow();

        this.ChangeMainLabel(cw.Title);
        this.ChangeEveChild(cw.hbCard);
    }
Ejemplo n.º 4
0
        private void otherToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dir = CardWindow.ShowCardFolderBrowseDialog(this);

            if (dir != null)
            {
                var w = new CardWindow();
                w.Show(dockPanel, DockState.Document);
                w.TryOpenCardDirectory(dir);
            }
        }
Ejemplo n.º 5
0
    bool isAbleToPass = false;       //パスの許可

    private void Awake()
    {
        //ゲームオブジェクトの設定
        {
            yh = yh_.GetComponent <YourHand>();
            oh = oh_.GetComponent <OpponentHand>();
            mf = mf_.GetComponent <FieldBase>();
            of = of_.GetComponent <FieldBase>();
            sf = sf_.GetComponent <FieldBase>();
            mc = mc_.GetComponent <CharacterBase>();
            oc = oc_.GetComponent <CharacterBase>();
            cw = cw_.GetComponent <CardWindow>();
            pw = pw_.GetComponent <PlayerWindow>();
            sv = sv_.GetComponent <SubView>();

            log = log_.GetComponent <LogView>();

            isReady = false;
        }

        //デッキを作る
        {
            var g = new List <int> {
                2, 2, 2, 2,
                3, 3,
                4, 4, 4, 4,
                5, 5, 5,
                6, 6,
                7, 7, 7, 7,
                8, 8, 8,
                9, 9,
                10, 10,
                11, 11, 11, 11,
                12, 12, 12,
                13, 13, 13,
                14, 14, 14,
                15
            };
            var b = new List <int> {
                3, 3,
                15, 15, 15,
            };
            deck = new Deck()
            {
                //自機の設定
                character = 0000001,
                grimoir   = g,
                bookmark  = b
            };
        }
    }
Ejemplo n.º 6
0
        private static IDockContent DeserializeTab(string persistString)
        {
            var cw = CardWindow.TryLoadFromPersistString(persistString);

            if (cw != null)
            {
                return(cw);
            }

            var t = Type.GetType(persistString, false, true);

            if (t == null || !typeof(IDockContent).IsAssignableFrom(t))
            {
                throw new InvalidDataException(persistString + " points to an invalid type");
            }

            return((IDockContent)Activator.CreateInstance(t));
        }
Ejemplo n.º 7
0
        private CardWindow OpenOrGetCardWindow(string targetDir)
        {
            var existing = GetWindows <CardWindow>()
                           .FirstOrDefault(x => string.Equals(
                                               targetDir, x.CurrentDirectory?.FullName, StringComparison.InvariantCultureIgnoreCase));

            if (existing != null)
            {
                existing.Focus();
                return(existing);
            }

            var cardWindow = new CardWindow();

            cardWindow.Show(dockPanel, DockState.Document);
            cardWindow.TryOpenCardDirectory(targetDir);
            return(cardWindow);
        }
Ejemplo n.º 8
0
 void Awake()
 {
     cardWindow = GetComponent <CardWindow>();
     RemoveButton.onClick.AddListener(this.RemoveCard);
     UpgradeButton.onClick.AddListener(this.UpgradeCard);
 }