예제 #1
0
        public BattleLine(PlayBoard ABoard, PlayBoard BBoard)
        {
            haveWinner = false;

            ABoard.mainLine = this;
            BBoard.mainLine = this;

            this.ABoard  = ABoard;
            this.BBoard  = BBoard;
            this.AEnergy = ABoard.energy;
            this.BEnergy = BBoard.energy;
            this.A       = ABoard.group;
            this.B       = BBoard.group;

            A.At(0).changeStatusTo((int)Status.move);
            B.At(0).changeStatusTo((int)Status.move);

            A.setEnemy(B);
            B.setEnemy(A);
        }
예제 #2
0
//
//Initation
//
        public BattleForm()
        {
            rand = new Random();

            this.DoubleBuffered = true; //圖形移動不閃爍
            this.Opacity        = 0.9;  //透明度

            InitializeComponent();
            battlePictureInit();
            this.Width        = Const.BStartPoint + 100;
            pictureBox1.Width = this.Width;

            A           = new Warriors(new Point(Const.AStartPoint), this);
            B           = new Warriors(new Point(Const.BStartPoint), this, true);
            myEnergyBar = new EnergyBar(10);
            aiEnergyBar = new EnergyBar(10);
            AI          = new PlayBoard(aiEnergyBar, B, Program.AI.level);
            Player      = new PlayBoard(myEnergyBar, A, Program.player.level, true);

            mainLine = new BattleLine(AI, Player);

            _warriorButtonList = new List <Button>();
        }