示例#1
0
文件: Unit.cs 项目: mathbum/WarChess
 //public Unit(string Name, int BasePoints, int Width, int Length, Config.Allegiance Allegiance, int Fighting, int ShootingSkill, int Strength, int BaseDefense, int Attacks, int Wounds, int Might, int Will, int Fate) {
 public Unit(string Name, int BasePoints, int Width, int Length, Config.Allegiance Allegiance, int Fighting, int ShootingSkill, int Strength, int BaseDefense, int Attacks, int TotalHealth, int Dexterity)
 {
     this.Name          = Name;
     this.BasePoints    = BasePoints;
     this.Width         = Width;
     this.Length        = Length;
     this.Allegiance    = Allegiance;
     this.Fighting      = Fighting;
     this.ShootingSkill = ShootingSkill;
     this.Strength      = Strength;
     this.BaseDefense   = BaseDefense;
     this.Attacks       = Attacks;
     this.TotalHealth   = TotalHealth;
     this.Dexterity     = Dexterity;
     this.Health        = TotalHealth;
     //this.Wounds = Wounds;
     //this.Might = Might;
     //this.Will = Will;
     //this.Fate = Fate;
 }
示例#2
0
        public Unit CreateUnit(string unitName)
        {
            Unit   tempUnit   = Config.Units[unitName].unit;
            string Name       = unitName;
            int    BasePoints = tempUnit.BasePoints;
            int    Width      = tempUnit.Width;
            int    Length     = tempUnit.Length;

            Config.Allegiance Allegiance = tempUnit.Allegiance;
            int Fighting      = tempUnit.Fighting;
            int ShootingSkill = tempUnit.ShootingSkill;
            int Strength      = tempUnit.Strength;
            int Defense       = tempUnit.BaseDefense;
            int Attack        = tempUnit.Attacks;
            //int Wounds = tempUnit.Wounds;
            //int Might = tempUnit.Might;
            //int Will = tempUnit.Will;
            //int Fate = tempUnit.Fate;
            //return new Unit(Name, BasePoints, Width, Length, Allegiance, Fighting, ShootingSkill, Strength, Defense, Attack, Wounds, Might, Will, Fate);
            int TotalHealth = tempUnit.TotalHealth;
            int Dexterity   = tempUnit.Dexterity;

            return(new Unit(Name, BasePoints, Width, Length, Allegiance, Fighting, ShootingSkill, Strength, Defense, Attack, TotalHealth, Dexterity));
        }