public VM() { game.renderCard(); this.ShuffledDeck = game.ShuffledDeck; this.startGame(); this.YourHand.CollectionChanged += (s, args) => { if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) { CommandManager.InvalidateRequerySuggested(); } }; this.DealerHand.CollectionChanged += (s, args) => { if (args.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) { CommandManager.InvalidateRequerySuggested(); } }; this.AddCardCommand = new SimpleCommand((obj) => true, (obj) => { YourHand.Add(ShuffledDeck[currentCount]); this.currentCount++; HandCheck(this.currentCount); } ); this.StandCommand = new SimpleCommand((obj) => true, (obj) => { didStand = true; Stand(); } ); }
public void Dispose() { YourHand.Dispose(); OpponentsHand.Dispose(); YourGraveyard.Dispose(); OpponentsGraveyard.Dispose(); YourLibrary.Dispose(); OpponentsLibrary.Dispose(); }
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 }; } }