コード例 #1
0
        protected AttackMechanics.RuntimeAttackData[] GetAllAttackMoves()
        {
            var playerTeam = Player.Team.Members;
            var enemyTeam  = Enemy.Team.Members;
            var allAttacks = new List <AttackMechanics.RuntimeAttackData>();

            foreach (var agressor in playerTeam)
            {
                var possibilities = new List <AttackMechanics.RuntimeAttackData>();

                foreach (var defender in enemyTeam)
                {
                    var attack = new AttackMechanics.RuntimeAttackData
                    {
                        Agressor = agressor,
                        Blocker  = defender
                    };

                    possibilities.Add(attack);
                }

                allAttacks.Add(possibilities.ToList().RandomItem());
            }

            return(allAttacks.ToArray());
        }
コード例 #2
0
 public void Attack(AttackMechanics.RuntimeAttackData data) => ProcessAttack.Execute(data);