public SummonSpellEffect(Game gameCore, Player player, Skill skill, UnitBase unitBase, ChessboardCell cbCell)
 {
     this._gameCore = gameCore;
     this._player = player;
     this._skill = skill;
     this._unitBase = unitBase;
     this._cbCell = cbCell;
 }
Esempio n. 2
0
        protected Unit(UnitBase unitBase, Player owner)
        {
            InitAttribute(unitBase);
            this.GameCore = owner.GameCore;
            this.Team = owner.atTeam;
            this.Owner = owner;

            Owner.unit.Add(this); // TODO : Need change to Player's function

            this.GameCore.IDP.UID.ApplyID(this);
            ActionState = new UnitActionState();
            foreach (Skill s in skill)
            {
                s.Register(this);
            }
        }
Esempio n. 3
0
 public void InitAttribute(UnitBase unitBase)
 {
     this.UnitBase = unitBase;
     this.UnitBaseId = unitBase.Id;
     this.UnitType = unitBase.Type;
     this.HitPoint = new UnitHitPoint(unitBase.HitPoint);
     this.Mobility = new UnitMobility(unitBase.Mobility, unitBase.MoveMethod);
     this.AttackPower = new UnitAttackPower(unitBase.AttackPower);
     this.AttackRange = new UnitAttackRange(unitBase.AttackRange);
 }
Esempio n. 4
0
 public static Unit FromUnitBase(UnitBase unitBase, Player owner)
 {
     switch (unitBase.Type)
     {
         case UnitType.Girl:
             return new UnitGirl(unitBase, owner);
             break;
         case UnitType.Minion:
             return new UnitMinion(unitBase, owner);
             break;
         case UnitType.Servant:
             return new UnitServant(unitBase, owner);
             break;
         default:
             throw new Exception("Undefined Unit Type");
     }
 }
Esempio n. 5
0
 public UnitGirl(UnitBase unitBase, Player owner)
     : base(unitBase, owner)
 {
 }
 public UnitServant(UnitBase unitBase, Player owner)
     : base(unitBase, owner)
 {
 }
Esempio n. 7
0
 /// <summary>
 /// 将特定单位加入单位池
 /// </summary>
 /// <param name="unitBase">要加入的单位</param>
 public void AddUnit(UnitBase unitBase)
 {
     Unit aUnit = Unit.FromUnitBase(unitBase, _game.NeutralPlayer);
     _selectedUnits.Add(aUnit);
 }
 public UnitMinion(UnitBase unitBase, Player owner)
     : base(unitBase, owner)
 {
 }