Example #1
0
        /// <summary>
        /// 随机向团队发射,命中取决于闪避
        /// </summary>
        /// <param name="s"></param>
        /// <param name="game"></param>
        private static void CastToTeamRandom2(Skill s, GameMode game)
        {
            List <Character> list = new List <Character>();

            foreach (Character c in game.TeamCharacters)
            {
                if (c.IsAlive)
                {
                    list.Add(c);
                }
            }
            //取随机两次
            List <Character> re = new List <Character>();
            int index           = UnityEngine.Random.Range(0, list.Count - 1);

            re.Add(list[index]);

            list.RemoveAt(index);
            index = UnityEngine.Random.Range(0, list.Count - 1);
            re.Add(list[index]);

            SkillCaster.CastMultiSkill(s, re);
        }
Example #2
0
 private static void CastToTeam(Skill s, GameMode game)
 {
     SkillCaster.CastMultiSkill(s, game.TeamAlive);
 }