コード例 #1
0
ファイル: AiPlayer.cs プロジェクト: EnigmaDragons/Astrocell
        public void SelectAction(BattleCharacter src, BattleHand hand, BattleCharacters allCharacters, Action <CardAction> onCardSelected)
        {
            var card             = SelectCard(src, hand.Playable, allCharacters);
            var targettedEffects = card.Effects.Select(x => SelectTargets(x, src, allCharacters)).ToList();

            onCardSelected(new CardAction {
                Source = src, Card = card, TargettedEffects = targettedEffects
            });
        }
コード例 #2
0
        public void SelectAction(BattleCharacter src, BattleHand hand, BattleCharacters chars, Action <CardAction> onCardSelected)
        {
            _registerObj(Entity.Create("Player Card Select DropZone", new Transform2 {
                Size = new Size2(1920, 500)
            })
                         .Add(new MouseDropTarget {
                OnDrop = x => CompleteCardSelection(src, chars, x, onCardSelected)
            }));

            var margin = 20;
            var xLoc   = 100;

            hand.Cards.ForEachIndex((x, i) => _registerObj(
                                        CardDisplay.Create(x, new Vector2(xLoc + i * (CardDisplay.Width + margin), 600), hand.Playable.Contains(x))));
        }
コード例 #3
0
 public void SelectAction(BattleCharacter src, BattleHand hand, BattleCharacters characters, Action <CardAction> onSelected)
 {
     throw new NotImplementedException("I'm not alive. I will never pick a card. Not any card!");
 }