示例#1
0
文件: Player.cs 项目: r15h1/heyteam
 public Player(Guid squadId, Guid?playerId = null) : base(playerId)
 {
     if (squadId.IsEmpty())
     {
         throw new ArgumentNullException();
     }
     SquadId = squadId;
     Squads.Add(squadId);
 }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Fraction"/> class.
        /// </summary>
        /// <param name="name">Name Fraction.</param>
        /// <param name="numberSquads">Number Squads.</param>
        /// <param name="numberWarriors">Number Warriors.</param>
        public Fraction(string name, int numberSquads, int numberWarriors)
        {
            NameFraction = name;

            for (int i = 0; i < numberSquads; i++)
            {
                Console.WriteLine("Please enter Name Squad");
                string nameSquad = Console.ReadLine();
                Squads.Add(new Squad(nameSquad, numberWarriors));
            }
        }
示例#3
0
        private Squad Create(string name, ulong id)
        {
            var s = new Squad()
            {
                Id   = id,
                Name = name
            };

            Squads.Add(s);
            return(s);
        }
示例#4
0
        public Squad AddSquad(SquadSign sign)
        {
            Squad sq = new Squad(sign, IdealFireteamSize);

            Squads.Add(sq);

            if (Squads.Count > 1)
            {
                SupportingRoles = TroopDistributionCalculator.FullLeadership;
            }

            return(sq);
        }
示例#5
0
        // Squad Addition And Removal
        public RTSSquad AddSquad()
        {
            RTSSquad squad = new RTSSquad(this);

            squad.ActionController    = Race.SCAction.CreateInstance <ACSquadActionController>();
            squad.MovementController  = Race.SCMovement.CreateInstance <ACSquadMovementController>();
            squad.TargetingController = Race.SCTargeting.CreateInstance <ACSquadTargetingController>();
            Squads.Add(squad);
            if (OnSquadCreation != null)
            {
                OnSquadCreation(squad);
            }
            return(squad);
        }