예제 #1
0
 public SummonCard(Game core)
     : base(core)
 {
     GameCore = core;
     unitAttribute = new Unit.Attribute();
     SetAttribute();
 }
 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;
 }
예제 #3
0
 public Team(Game core)
 {
     GameCore = core;
     GameCore.IDP.TID.ApplyID(this);
     playerList = new List<Player>();
     OwnRegion = new List<ChessboardCell>();
     blood = 4;
 }
예제 #4
0
 //
 /// <summary>
 /// 自动生成一张地图 第一个参数为其所在核心,会自动分配地区ID并将区块注册至区域表
 /// </summary>
 /// <param name="core"></param>
 public Chessboard(Game core)
 {
     GameCore = core;
     CellList = MakeMap();
     for (int x = 0; x < CellList.GetLength(0); x++)//注册区块
     {
         for (int y = 0; y < CellList.GetLength(1); y++)
         {
             GameCore.IDP.RID.SetID(CellList[x, y]);
         }
     }
 }
예제 #5
0
 /// <summary>
 /// 自动读取一张地图,并将区块注册至区域表
 /// </summary>
 /// <param name="core"></param>
 /// <param name="map"></param>
 public Chessboard(Game core, ChessboardCell[,] map)
 {
     GameCore = core;
     CellList = map;
     for (int x = 0; x < map.GetLength(0); x++)//注册区块
     {
         for (int y = 0; y < map.GetLength(1); y++)
         {
             GameCore.IDP.RID.SetID(CellList[x, y]);
         }
     }
 }
예제 #6
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);
            }
        }
예제 #7
0
 public HeroCard(Game core)
     : base(core)
 {
 }
예제 #8
0
 //未完成
 public Chessboard ToMap(Game core)
 {
     return new Chessboard(core);
 }
예제 #9
0
 public UnitPool(Game game, int MaxUnitNumber = 6)
 {
     this._game = game;
     this.MaxUnit = MaxUnitNumber;
     InitUnitPool();
 }