예제 #1
0
        public Stadium()
        {
            P1.Show(); //the form for player1.
            P1.Name = "P1";
            P2.Show(); //the form for player2.
            P2.Name = "P2";

            //own AlphaMon Data
            Alphamon     ownAlphaMon     = DB.GetAlphamon("04d0611a4c5880");//5 is a random number, this should be changed based on the arduino input.
            UsedAlphamon OwnUsedAlphaMon = new UsedAlphamon(ownAlphaMon);


            //opponent AlphaMon Data
            Alphamon     OpponentAlphamon     = DB.GetAlphamon("04d5621a4c5880");//8 is a random number, this should be changed based on the arduino input.
            UsedAlphamon OpponentUsedAlphaMon = new UsedAlphamon(OpponentAlphamon);

            //get data from alphamon
            P1.setAlphamonData(this, OwnUsedAlphaMon, OpponentUsedAlphaMon);
            P2.setAlphamonData(this, OpponentUsedAlphaMon, OwnUsedAlphaMon);
        }
예제 #2
0
        public void setAlphamonData(Stadium Stadium, UsedAlphamon AlphamonData, UsedAlphamon OpponentAlphamonData)
        {
            this.AlphamonData         = AlphamonData;
            this.OpponentAlphamonData = OpponentAlphamonData;
            this.Stadium = Stadium;

            //own alphamon
            lblHPBar.Text     = AlphamonData.currentHP.ToString() + "/" + AlphamonData.AlphamonData.HP.ToString();
            lblOwnName.Text   = AlphamonData.AlphamonData.name;
            lblOwnStatus.Text = AlphamonData.statusID.ToString();
            lbxMoves.Items.Clear();
            lbxMoves.Items.AddRange(AlphamonData.AlphamonData.moves.Select(item => item.name).ToArray());

            if (AlphamonData.statusID == 4)
            {
                OwnSpeed = AlphamonData.AlphamonData.Speed / 2;
            }
            else
            {
                OwnSpeed = AlphamonData.AlphamonData.Speed;
            }



            //opponent alphamon
            lblOpponentHPBar.Text  = OpponentAlphamonData.currentHP.ToString() + "/" + OpponentAlphamonData.AlphamonData.HP.ToString();
            lblOpponentName.Text   = OpponentAlphamonData.AlphamonData.name;
            lblOpponentStatus.Text = OpponentAlphamonData.statusID.ToString();

            if (OpponentAlphamonData.statusID == 4)
            {
                OpponentSpeed = OpponentAlphamonData.AlphamonData.Speed / 2;
            }
            else
            {
                OpponentSpeed = OpponentAlphamonData.AlphamonData.Speed;
            }
        }
예제 #3
0
 public CalcDamage(UsedAlphamon AlphamonData, UsedAlphamon OpponentAlphamonData)
 {
     this.alphamonData         = AlphamonData;
     this.OpponentAlphamonData = OpponentAlphamonData;
 }