public void GetResources(List<GameObjectManager> _resources)
        {
            _mainFrame = (GameFrame)_resources[0].CreateObject(7);
            _backGround = (GameFrame)_resources[0].CreateObject(8);
            _currentChild = 0;

            _btOnButton = (Button)_resources[1].CreateObject(40);
            _btOnButton.IsPressButton = true;
            _btOnButton.Mouse_Down += new Button.OnMouseDownHandler(OnButton_Down);

            _btOffButton = (Button)_resources[1].CreateObject(41);
            _btOffButton.IsPressButton = true;
            _btOffButton.Mouse_Down += new Button.OnMouseDownHandler(OffButton_Down);

            _btHelp = (Button)_resources[1].CreateObject(42);
            _btHelp.Mouse_Click += new Button.OnMouseClickHandler(HelpButton_Click);
            _btHelp.Mouse_Hover += new Button.OnMouseHoverHandler(HelpButton_Hover);
            _btHelp.Mouse_Released += new Button.OnMouseReleasedHandler(HelpButton_Release);

            _btQuit = (Button)_resources[1].CreateObject(43);
            _btQuit.Mouse_Click += new Button.OnMouseClickHandler(QuitButton_Click);
            _btQuit.Mouse_Hover += new Button.OnMouseHoverHandler(QuitButton_Hover);
            _btQuit.Mouse_Released += new Button.OnMouseReleasedHandler(QuitButton_Release);

            _btResume = (Button)_resources[1].CreateObject(44);
            _btResume.Mouse_Click += new Button.OnMouseClickHandler(ResumeButton_Click);
            _btResume.Mouse_Hover += new Button.OnMouseHoverHandler(ResumeButton_Hover);
            _btResume.Mouse_Released += new Button.OnMouseReleasedHandler(ResumeButton_Release);

            _mainFrame.AddChild(_btOnButton);
            _mainFrame.AddChild(_btOffButton);
            _mainFrame.AddChild(_btHelp);
            _mainFrame.AddChild(_btQuit);
            _mainFrame.AddChild(_btResume);

            _backGround.AddChild(_mainFrame);

            _btOK = (Button)_resources[1].CreateObject(45);
            _btOK.Mouse_Click += new Button.OnMouseClickHandler(OKButton_Click);
            _btOK.Mouse_Hover += new Button.OnMouseHoverHandler(OKButton_Hover);
            _btOK.Mouse_Released += new Button.OnMouseReleasedHandler(OKButton_Release);

            _btCancel = (Button)_resources[1].CreateObject(46);
            _btCancel.Mouse_Click += new Button.OnMouseClickHandler(CancelButton_Click);
            _btCancel.Mouse_Hover += new Button.OnMouseHoverHandler(CancelButton_Hover);
            _btCancel.Mouse_Released += new Button.OnMouseReleasedHandler(CancelButton_Release);

            _messageBox = (GameFrame)_resources[0].CreateObject(9);
            _messageBox.AddChild(_btOK);
            _messageBox.AddChild(_btCancel);

            _backGround.AddChild(_messageBox);
        }
        public override bool InitPrototypes(ContentManager content, string fileName)
        {
            try
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(fileName);
                XmlNodeList list = doc.SelectNodes(@"//Button");
                _nprototype = list.Count;
                _prototype = new Button[_nprototype];

                //Vi button nao cũng xài chung 1 mảng FireSprite chung nên load trước lun
                XmlNode fire = doc.SelectSingleNode(@"//Fire");
                int _numofframe = int.Parse(fire.SelectSingleNode(@"NumOfFrames").InnerText);
                string contentname = fire.SelectSingleNode(@"ContentName").InnerText;
                Texture2D[] _textures = new Texture2D[_numofframe];
                for (int i = 0; i < _numofframe; ++i)
                {
                    _textures[i] = content.Load<Texture2D>(contentname + i.ToString("00"));
                }
                float fireX = float.Parse (fire.SelectSingleNode(@"X").InnerText);

                for (int i = 0; i < _nprototype; ++i)
                {
                    _prototype[i] = new Button();
                    _prototype[i]._nsprite = 3;
                    _prototype[i]._sprite = new GameSprite[3];

                    _prototype[i]._sprite[0] = new GameSprite(content.Load<Texture2D>(list[i].SelectSingleNode(@"Idle/ContentName").InnerText),
                        0,
                        0);

                    _prototype[i]._sprite[1] = new GameSprite(content.Load<Texture2D>(list[i].SelectSingleNode(@"MouseHover/ContentName").InnerText),
                        0,
                        0);

                    _prototype[i]._sprite[2] = new GameSprite (_textures,
                        fireX,
                        0);

                    _prototype[i].Height = int.Parse(list[i].SelectSingleNode(@"Height").InnerText);
                    _prototype[i].Width = int.Parse(list[i].SelectSingleNode(@"Width").InnerText);
                }
                return true;
            }
            catch
            {
                return false;
            }
        }
 public void HideDetailSkill(Button _button)
 {
     ((Skill)_button.Owner).ToShowDetails = false;
     ((Skill)_button.Owner).CurrentButton = null;
 }
 //Hàm dùng chung-----------------------------------------------------
 public Vector2 GetSkillDetailLocation(Button _button, int _picWid, int _picHei)
 {
     Vector2 _result = new Vector2(_button.X + _button.Width, _button.Y + _button.Height);
     if (_result.X + _picWid > GlobalVariables.ScreenWidth)
     {
         int temp = (int)(_result.X + _picWid - GlobalVariables.ScreenWidth) + 5;
         _result.X -= temp;
     }
     if (_result.Y + _picHei > GlobalVariables.ScreenHeight)
     {
         int temp = (int)(_result.Y + _picHei - GlobalVariables.ScreenHeight) + 5;
         _result.Y -= temp;
     }
     return _result;
 }
        //---------------------------------------------------------------------------------------------------
        public void GetResources(List<GameObjectManager> _resources)
        {
            //Khoi tao cac bien Addition
            _lhAddition = 50;
            _rhAddition = 50;
            _passiveAddition = 50;
            _preLevelOfChar = _character.Level;

            _boardFrame = (GameFrame)_resources[0].CreateObject(1);
            _boardFrame.IsVisible = false;

            //Press Button sử dụng chung trên 3 tab.
            _btLeftSkillControl = (Button)_resources[1].CreateObject(2);
            _btLeftSkillControl._sprite[0].Itexture2D = 1; //Được click trước tiên
            _btLeftSkillControl.Mouse_Down += new Button.OnMouseDownHandler(SkillBoard_MouseDown_LeftButtonControl);
            _btLeftSkillControl.IsPressButton = true;

            _btRightSkillControl = (Button)_resources[1].CreateObject(3);
            _btRightSkillControl.Mouse_Down += new Button.OnMouseDownHandler(SkillBoard_MouseDown_RightButtonControl);
            _btRightSkillControl.IsPressButton = true;

            _btPassiveSkillControl = (Button)_resources[1].CreateObject(4);
            _btPassiveSkillControl.Mouse_Down += new Button.OnMouseDownHandler(SkillBoard_MouseDown_PassiveButtonControl);
            _btPassiveSkillControl.IsPressButton = true;

            //LeftHand tab
            #region
            _btLefthandExit = (Button)_resources[1].CreateObject(11);
            _btLefthandExit.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_LeftExit);
            //Cleaving
            _btSkillCleaving = (Button)_resources[1].CreateObject(5);
            _btSkillCleaving.Owner = _character.ListLeftHandSkill[1];
            _btSkillCleaving.GetNewIdleTexture(_character.ListLeftHandSkill[1].IdleIcon);
            _btSkillCleaving.GetNewClickedTexture(_character.ListLeftHandSkill[1].ClickedIcon);
            _btSkillCleaving.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_CleavingAttack);
            _btSkillCleaving.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_CleavingAttack);
            _btSkillCleaving.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_CleavingAttack);

            _lbSkillCleaving = (Label)_resources[2].CreateObject(0);
            _lbSkillCleaving.Owner = _character.ListLeftHandSkill[1];
            //Critical
            _btSkillCritical = (Button)_resources[1].CreateObject(6);
            _btSkillCritical.Owner = _character.ListLeftHandSkill[2];
            _btSkillCritical.GetNewIdleTexture(_character.ListLeftHandSkill[2].IdleIcon);
            _btSkillCritical.GetNewClickedTexture(_character.ListLeftHandSkill[2].ClickedIcon);
            _btSkillCritical.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_CriticalAttack);
            _btSkillCritical.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_CriticalAttack);
            _btSkillCritical.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_CriticalAttack);

            _lbSkillCritical = (Label)_resources[2].CreateObject(1);
            _lbSkillCritical.Owner = _character.ListLeftHandSkill[2];
            //Curse
            _btSkillCurse = (Button)_resources[1].CreateObject(7);
            _btSkillCurse.Owner = _character.ListLeftHandSkill[3];
            _btSkillCurse.GetNewIdleTexture(_character.ListLeftHandSkill[3].IdleIcon);
            _btSkillCurse.GetNewClickedTexture(_character.ListLeftHandSkill[3].ClickedIcon);
            _btSkillCurse.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_CurseAttack);
            _btSkillCurse.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_CurseAttack);
            _btSkillCurse.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_CurseAttack);

            _lbSkillCurse = (Label)_resources[2].CreateObject(2);
            _lbSkillCurse.Owner = _character.ListLeftHandSkill[3];
            //Overspeed
            _btSkillOverSpeed = (Button)_resources[1].CreateObject(8);
            _btSkillOverSpeed.Owner = _character.ListLeftHandSkill[4];
            _btSkillOverSpeed.GetNewIdleTexture(_character.ListLeftHandSkill[4].IdleIcon);
            _btSkillOverSpeed.GetNewClickedTexture(_character.ListLeftHandSkill[4].ClickedIcon);
            _btSkillOverSpeed.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_OverSpeedAttack);
            _btSkillOverSpeed.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_OverSpeedAttack);
            _btSkillOverSpeed.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_OverSpeedAttack);

            _lbSkillOverspeed = (Label)_resources[2].CreateObject(3);
            _lbSkillOverspeed.Owner = _character.ListLeftHandSkill[4];
            //Lifesteal
            _btSkillLifeSteal = (Button)_resources[1].CreateObject(9);
            _btSkillLifeSteal.Owner = _character.ListLeftHandSkill[5];
            _btSkillLifeSteal.GetNewIdleTexture(_character.ListLeftHandSkill[5].IdleIcon);
            _btSkillLifeSteal.GetNewClickedTexture(_character.ListLeftHandSkill[5].ClickedIcon);
            _btSkillLifeSteal.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_LifeStealAttack);
            _btSkillLifeSteal.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_LifeStealAttack);
            _btSkillLifeSteal.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_LifeStealAttack);

            _lbSkillLifeSteal = (Label)_resources[2].CreateObject(4);
            _lbSkillLifeSteal.Owner = _character.ListLeftHandSkill[5];
            //Bash
            _btSkillBash = (Button)_resources[1].CreateObject(10);
            _btSkillBash.Owner = _character.ListLeftHandSkill[6];
            _btSkillBash.GetNewIdleTexture(_character.ListLeftHandSkill[6].IdleIcon);
            _btSkillBash.GetNewClickedTexture(_character.ListLeftHandSkill[6].ClickedIcon);
            _btSkillBash.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_BashAttack);
            _btSkillBash.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_BashAttack);
            _btSkillBash.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_BashAttack);

            _lbSkillBash = (Label)_resources[2].CreateObject(5);
            _lbSkillBash.Owner = _character.ListLeftHandSkill[6];

            //Label diem cong
            _lbLHAddition = (Label)_resources[2].CreateObject(15);
            _lbLHAddition.StringInfo = _lhAddition.ToString();

            _lefthandFrame = (GameFrame)_resources[0].CreateObject(2);

            //4 vị trí đầu là các control trên tab
            _lefthandFrame.AddChild(_btLeftSkillControl);
            _lefthandFrame.AddChild(_btRightSkillControl);
            _lefthandFrame.AddChild(_btPassiveSkillControl);
            _lefthandFrame.AddChild(_btLefthandExit);
            //Các vị trí còn lại là các button Skill
            _lefthandFrame.AddChild(_btSkillCleaving);
            _lefthandFrame.AddChild(_lbSkillCleaving);

            _lefthandFrame.AddChild(_btSkillCritical);
            _lefthandFrame.AddChild(_lbSkillCritical);

            _lefthandFrame.AddChild(_btSkillCurse);
            _lefthandFrame.AddChild(_lbSkillCurse);

            _lefthandFrame.AddChild(_btSkillOverSpeed);
            _lefthandFrame.AddChild(_lbSkillOverspeed);

            _lefthandFrame.AddChild(_btSkillLifeSteal);
            _lefthandFrame.AddChild(_lbSkillLifeSteal);

            _lefthandFrame.AddChild(_btSkillBash);
            _lefthandFrame.AddChild(_lbSkillBash);

            _lefthandFrame.AddChild(_lbLHAddition);

            //Add vào tab control (Frame mẹ)
            _boardFrame.AddChild(_lefthandFrame);
            #endregion
            //RightHand tab
            #region
            _btRighthandExit = (Button)_resources[1].CreateObject(12);
            _btRighthandExit.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_RightExit);
            //Deadly bees
            _btDeadlyBeesSkill = (Button)_resources[1].CreateObject(23);
            _btDeadlyBeesSkill.Owner = (Skill)_character.ListRightHandSkill[1];
            _btDeadlyBeesSkill.GetNewIdleTexture(_character.ListRightHandSkill[1].IdleIcon);
            _btDeadlyBeesSkill.GetNewClickedTexture(_character.ListRightHandSkill[1].ClickedIcon);
            _btDeadlyBeesSkill.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_DeadlyBees);
            _btDeadlyBeesSkill.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_DeadlyBees);
            _btDeadlyBeesSkill.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_DeadlyBees);

            _lbDeadlyBeesSkill = (Label)_resources[2].CreateObject(6);
            _lbDeadlyBeesSkill.Owner = _character.ListRightHandSkill[1];
            //SoulRelease
            _btSoulRelease = (Button)_resources[1].CreateObject(24);
            _btSoulRelease.Owner = _character.ListRightHandSkill[2];
            _btSoulRelease.GetNewIdleTexture(_character.ListRightHandSkill[2].IdleIcon);
            _btSoulRelease.GetNewClickedTexture(_character.ListRightHandSkill[2].ClickedIcon);
            _btSoulRelease.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_SoulRelease);
            _btSoulRelease.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_SoulRelease);
            _btSoulRelease.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_SoulRelease);

            _lbSoulRelease = (Label)_resources[2].CreateObject(7);
            _lbSoulRelease.Owner = _character.ListRightHandSkill[2];
            //Earth shake
            _btEathShakeSkill = (Button)_resources[1].CreateObject(25);
            _btEathShakeSkill.Owner = _character.ListRightHandSkill[3];
            _btEathShakeSkill.GetNewIdleTexture(_character.ListRightHandSkill[3].IdleIcon);
            _btEathShakeSkill.GetNewClickedTexture(_character.ListRightHandSkill[3].ClickedIcon);
            _btEathShakeSkill.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_EarthShake);
            _btEathShakeSkill.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_EarthShake);
            _btEathShakeSkill.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_EarthShake);

            _lbEathShakeSkill = (Label)_resources[2].CreateObject(8);
            _lbEathShakeSkill.Owner = _character.ListRightHandSkill[3];
            //Wave form
            _btWaveFormSkill = (Button)_resources[1].CreateObject(26);
            _btWaveFormSkill.Owner = _character.ListRightHandSkill[4];
            _btWaveFormSkill.GetNewIdleTexture(_character.ListRightHandSkill[4].IdleIcon);
            _btWaveFormSkill.GetNewClickedTexture(_character.ListRightHandSkill[4].ClickedIcon);
            _btWaveFormSkill.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_WaveForm);
            _btWaveFormSkill.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_WaveForm);
            _btWaveFormSkill.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_WaveForm);

            _lbWaveFormSkill = (Label)_resources[2].CreateObject(9);
            _lbWaveFormSkill.Owner = _character.ListRightHandSkill[4];

            //Lighting Field
            _btLightingField = (Button)_resources[1].CreateObject(27);
            _btLightingField.Owner = _character.ListRightHandSkill[5];
            _btLightingField.GetNewIdleTexture(_character.ListRightHandSkill[5].IdleIcon);
            _btLightingField.GetNewClickedTexture(_character.ListRightHandSkill[5].ClickedIcon);
            _btLightingField.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_LightingField);
            _btLightingField.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_LightingField);
            _btLightingField.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_LightingField);

            _lbLightingField = (Label)_resources[2].CreateObject(10);
            _lbLightingField.Owner = _character.ListRightHandSkill[5];
            //Invisible
            _btInvisible = (Button)_resources[1].CreateObject(28);
            _btInvisible.Owner = _character.ListRightHandSkill[6];
            _btInvisible.GetNewIdleTexture(_character.ListRightHandSkill[6].IdleIcon);
            _btInvisible.GetNewClickedTexture(_character.ListRightHandSkill[6].ClickedIcon);
            _btInvisible.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_Invisible);
            _btInvisible.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_Invisible);
            _btInvisible.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_Invisible);

            _lbInvisible = (Label)_resources[2].CreateObject(11);
            _lbInvisible.Owner = _character.ListRightHandSkill[6];

            //Label diem cong
            _lbRHAddition = (Label)_resources[2].CreateObject(15);
            _lbRHAddition.StringInfo = _rhAddition.ToString();

            //RightthandFrame-hand frame
            _rightthandFrame = (GameFrame)_resources[0].CreateObject(3);
            _rightthandFrame.AddChild(_btLeftSkillControl);
            _rightthandFrame.AddChild(_btRightSkillControl);
            _rightthandFrame.AddChild(_btPassiveSkillControl);
            _rightthandFrame.AddChild(_btRighthandExit);

            _rightthandFrame.AddChild(_btDeadlyBeesSkill);
            _rightthandFrame.AddChild(_lbDeadlyBeesSkill);

            _rightthandFrame.AddChild(_btSoulRelease);
            _rightthandFrame.AddChild(_lbSoulRelease);

            _rightthandFrame.AddChild(_btEathShakeSkill);
            _rightthandFrame.AddChild(_lbEathShakeSkill);

            _rightthandFrame.AddChild(_btWaveFormSkill);
            _rightthandFrame.AddChild(_lbWaveFormSkill);

            _rightthandFrame.AddChild(_btLightingField);
            _rightthandFrame.AddChild(_lbLightingField);

            _rightthandFrame.AddChild(_btInvisible);
            _rightthandFrame.AddChild(_lbInvisible);

            _rightthandFrame.AddChild(_lbRHAddition);

            _boardFrame.AddChild(_rightthandFrame);
            #endregion
            //Passive tab
            #region
            _btPassiveExit = (Button)_resources[1].CreateObject(13);
            _btPassiveExit.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_PassiveExit);

            //Great Fortitude
            _btGreatFortitude = (Button)_resources[1].CreateObject(37);
            _btGreatFortitude.Owner = _character.ListPassiveSkill[0];
            _btGreatFortitude.GetNewIdleTexture(_character.ListPassiveSkill[0].IdleIcon);
            _btGreatFortitude.GetNewClickedTexture(_character.ListPassiveSkill[0].ClickedIcon);
            _btGreatFortitude.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_GreatFortitude);
            _btGreatFortitude.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_GreatFortitude);
            _btGreatFortitude.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_GreatFortitude);

            _lbbtGreatFortitude = (Label)_resources[2].CreateObject(12);
            _lbbtGreatFortitude.Owner = _character.ListPassiveSkill[0];

            //God Strenght
            _btGodStrength = (Button)_resources[1].CreateObject(38);
            _btGodStrength.Owner = _character.ListPassiveSkill[1];
            _btGodStrength.GetNewIdleTexture(_character.ListPassiveSkill[1].IdleIcon);
            _btGodStrength.GetNewClickedTexture(_character.ListPassiveSkill[1].ClickedIcon);
            _btGodStrength.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_GodStrenght);
            _btGodStrength.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_GodStrenght);
            _btGodStrength.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_GodStrenght);

            _lbGodStrength = (Label)_resources[2].CreateObject(13);
            _lbGodStrength.Owner = _character.ListPassiveSkill[1];

            //BLur
            _btBlur = (Button)_resources[1].CreateObject(39);
            _btBlur.Owner = _character.ListPassiveSkill[2];
            _btBlur.GetNewIdleTexture(_character.ListPassiveSkill[2].IdleIcon);
            _btBlur.GetNewClickedTexture(_character.ListPassiveSkill[2].ClickedIcon);
            _btBlur.Mouse_Click += new Button.OnMouseClickHandler(SkillBoard_MouseClick_Blur);
            _btBlur.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBoard_MouseHover_Blur);
            _btBlur.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBoard_MouseRelease_Blur);

            _lbBlur = (Label)_resources[2].CreateObject(14);
            _lbBlur.Owner = _character.ListPassiveSkill[2];

            //label diem cong
            _lbPassiveAddtion = (Label)_resources[2].CreateObject(15);
            _lbPassiveAddtion.StringInfo = _passiveAddition.ToString();

            //Passive frame
            _passiveFrame = (GameFrame)_resources[0].CreateObject(4);
            _passiveFrame.AddChild(_btLeftSkillControl);
            _passiveFrame.AddChild(_btRightSkillControl);
            _passiveFrame.AddChild(_btPassiveSkillControl);
            _passiveFrame.AddChild(_btPassiveExit);

            _passiveFrame.AddChild(_btGreatFortitude);
            _passiveFrame.AddChild(_lbbtGreatFortitude);

            _passiveFrame.AddChild(_btGodStrength);
            _passiveFrame.AddChild(_lbGodStrength);

            _passiveFrame.AddChild(_btBlur);
            _passiveFrame.AddChild(_lbBlur);

            _passiveFrame.AddChild(_lbPassiveAddtion);

            _boardFrame.AddChild(_passiveFrame);
            #endregion
            _iCurrentBoard = 0;
            _currentBoard = (GameFrame)_boardFrame.Child[_iCurrentBoard];
            _rect = new Rectangle((int)_boardFrame.X, (int)_boardFrame.Y, (int)_boardFrame.Width, (int)_boardFrame.Height);

            //Khởi tạo 1 số giá trị mặt định về skill của nhân vật
            //Left hand
            //_btSkillCurse.Endalbe = false;
            //_btSkillOverSpeed.Endalbe = false;
            //_btSkillLifeSteal.Endalbe = false;
            //_btSkillBash.Endalbe = false;
            //Right
            //_btEathShakeSkill.Endalbe = false;
            //_btWaveFormSkill.Endalbe = false;
            //_btLightingField.Endalbe = false;
            //_btInvisible.Endalbe = false;
            //Passive
            //_btGodStrength.Endalbe = false;
            //_btBlur.Endalbe = false;
        }
 //----Hàm dùng chung--------------
 public Vector2 GetSkillDetailLocation(Button _button, int _picWid, int _picHei)
 {
     Vector2 _result = new Vector2(_button.X + _button.Width, _button.Y - _picHei - 2);
     return _result;
 }
        public void GetResources(List<GameObjectManager> _resouces)
        {
            HealbarFrame = (GameFrame)_resouces[0].CreateObject(0);
            BloodPro = (ProcessBar)_resouces[1].CreateObject(0);
            ManaPro = (ProcessBar)_resouces[1].CreateObject(1);

            //Button left
            _btLeftCommand = (Button)_resouces[2].CreateObject(0);
            _btLeftCommand.Mouse_Click += new Button.OnMouseClickHandler(LeftCommandButon_Clicked);
            HealbarFrame.AddChild(_btLeftCommand);

            _btRightCommand = (Button)_resouces[2].CreateObject(1);
            _btRightCommand.Mouse_Click += new Button.OnMouseClickHandler(RightCommandButon_Clicked);
            HealbarFrame.AddChild(_btRightCommand);

            _btLefthandSkill = (Button)_resouces[2].CreateObject(14);
            _btLefthandSkill.Owner = _character.ListLeftHandSkill[0];
            _btLefthandSkill.GetNewIdleTexture(_character.ListLeftHandSkill[0].IdleIcon);
            _btLefthandSkill.GetNewClickedTexture(_character.ListLeftHandSkill[0].ClickedIcon);
            _btLefthandSkill.Mouse_Click += new Button.OnMouseClickHandler(LeftSkillButon_Clicked);
            _btLefthandSkill.Mouse_Hover += new Button.OnMouseHoverHandler(LeftSkillButon_Hover);
            _btLefthandSkill.Mouse_Released += new Button.OnMouseReleasedHandler(LeftSkillButon_Release);
            HealbarFrame.AddChild(_btLefthandSkill);

            //Button right
            _btRighthandSkill = (Button)_resouces[2].CreateObject(22);
            _btRighthandSkill.Owner = _character.ListRightHandSkill[0];
            _btRighthandSkill.GetNewIdleTexture(_character.ListRightHandSkill[0].IdleIcon);
            _btRighthandSkill.GetNewClickedTexture(_character.ListRightHandSkill[0].ClickedIcon);
            _btRighthandSkill.Mouse_Click += new Button.OnMouseClickHandler(RightSkillButon_Clicked);
            _btRighthandSkill.Mouse_Hover += new Button.OnMouseHoverHandler(RightSkillButon_Hover);
            _btRighthandSkill.Mouse_Released += new Button.OnMouseReleasedHandler(RightSkillButon_Release);
            HealbarFrame.AddChild(_btRighthandSkill);

            _coolDownRightSkill = (ProcessBar)_resouces[1].CreateObject(2);
            _healbarFrame.AddChild(_coolDownRightSkill);

            _coolDownLeftSkill = (ProcessBar)_resouces[1].CreateObject(3);
            _healbarFrame.AddChild(_coolDownLeftSkill);

            _levelProcess = (ProcessBar)_resouces[1].CreateObject(4);
            _healbarFrame.AddChild(_levelProcess);

            _btCMUpButton = (Button)_resouces[2].CreateObject(35);
            _btCMUpButton.Mouse_Click += new Button.OnMouseClickHandler(UpCommandbutton_Clicked);
            _healbarFrame.AddChild (_btCMUpButton);

            //item blood, mana, both
            _itemFrame = (GameFrame)_resouces[0].CreateObject(10);
            _itemFrame.X += _healbarFrame.X;
            _itemFrame.Y += _healbarFrame.Y;

            _btBlood = (Button)_resouces[2].CreateObject(47);
            _btBlood.Mouse_Click += new Button.OnMouseClickHandler(BloodButton_Clicked);

            _lbBlood = (Label)_resouces[3].CreateObject(16);
            _lbBlood.StringInfo = _character.HPPortion.Count.ToString();

            _itemFrame.AddChild(_btBlood);
            _itemFrame.AddChild(_lbBlood);
            //mana
            _btMana = (Button)_resouces[2].CreateObject(48);
            _btMana.Mouse_Click += new Button.OnMouseClickHandler(ManaButton_Clicked);

            _lbMana = (Label)_resouces[3].CreateObject(17);
            _lbMana.StringInfo = _character.MPPortion.Count.ToString();

            _itemFrame.AddChild(_btMana);
            _itemFrame.AddChild(_lbMana);

            //both
            _btBloodNMana = (Button)_resouces[2].CreateObject(49);
            _btBloodNMana.Mouse_Click += new Button.OnMouseClickHandler(BloodNManaButton_Clicked);

            _lbBloodNMana = (Label)_resouces[3].CreateObject(18);
            _lbBloodNMana.StringInfo = _character.RestorePortion.Count.ToString();

            _itemFrame.AddChild(_btBloodNMana);
            _itemFrame.AddChild(_lbBloodNMana);

            _rect = new Rectangle((int)_healbarFrame.X, (int)_healbarFrame.Y, (int)_healbarFrame.Width, (int)_healbarFrame.Height);
        }
 public Vector2 GetSkillDetailLocation(Button _button, int _picWid, int _picHei)
 {
     float _temp = _button.X + _button.Width;
     if (_temp + _picWid> GlobalVariables.ScreenWidth)
     {
         float _tempOffset = _temp + _picWid - GlobalVariables.ScreenWidth + 2;
         _temp -= _tempOffset;
     }
     Vector2 _result = new Vector2(_temp, _button.Y - _picHei - 2);
     return _result;
 }
        public override void InitState(GameObjectManager[] objectManagerArray, MainGame owner)
        {
            base.InitState(objectManagerArray, owner);

            //_introFrame = (GameFrame)objectManagerArray[1].CreateObject(7);
            //_introMotion = _introFrame.Motion.Clone();
            //_introDelayTime = _introFrame.DelayTime;
            _introFrames = (GameFrame)objectManagerArray[1].CreateObject(7);
            _introFrameMotion = _introFrames.Motion.Clone();
            _introFrameDelayTime = _introFrames.DelayTime;

            _dacPhuFrame = (GameFrame)objectManagerArray[1].CreateObject(13);
            _minhQuanFrame = (GameFrame)objectManagerArray[1].CreateObject(14);
            _introGameFrame = (GameFrame)objectManagerArray[1].CreateObject(15);
            _introFrames.AddChild(_introGameFrame);
            _introFrames.AddChild(_dacPhuFrame);
            _introFrames.AddChild(_minhQuanFrame);
            _currentIntroFrame = 0;

            _selectMode = (GameFrame)objectManagerArray[1].CreateObject(8);
            _selectMode.Move_Complete += new GameFrame.OnMoveCompletedHandler(Move_Complete_SelectFrame);
            _selectMotion = _selectMode.Motion.Clone();
            _selectDelayTime = _selectMode.DelayTime;

            _aboutGameButtonFrame = (GameFrame)objectManagerArray[1].CreateObject(9);
            _aboutGameButton = (Button)objectManagerArray[2].CreateObject(6);
            _aboutGameButton.IsPressButton = true;
            _aboutGameButtonFrame.AddChild(_aboutGameButton);
            _aboutGameButton.Mouse_Down += new Button.OnMouseDownHandler(AboutGame_Down);
            _aboutGameButton.Mouse_Hover += new Button.OnMouseHoverHandler(AboutGame_Hover);
            _aboutMotion = _aboutGameButtonFrame.Motion.Clone();
            _aboutDelayTime = _aboutGameButtonFrame.DelayTime;
            //Set Button này được Click trước
            _aboutGameButton._sprite[0].Itexture2D = 1;

            _programer1ButtonFrame = (GameFrame)objectManagerArray[1].CreateObject(10);
            _programer1Button = (Button)objectManagerArray[2].CreateObject(7);
            _programer1Button.IsPressButton = true;
            _programer1ButtonFrame.AddChild(_programer1Button);
            _programer1Button.Mouse_Down += new Button.OnMouseDownHandler(Programer1_Down);
            _programer1Button.Mouse_Hover += new Button.OnMouseHoverHandler(Programer1_Hover);
            _programer1Motion = _programer1ButtonFrame.Motion.Clone();
            _programer1DelayTime = _programer1ButtonFrame.DelayTime;

            _programer2ButtonFrame = (GameFrame)objectManagerArray[1].CreateObject(11);
            _programer2Button = (Button)objectManagerArray[2].CreateObject(8);
            _programer2Button.IsPressButton = true;
            _programer2ButtonFrame.AddChild(_programer2Button);
            _programer2Button.Mouse_Down += new Button.OnMouseDownHandler(Programer2_Down);
            _programer2Button.Mouse_Hover += new Button.OnMouseHoverHandler(Programer2_Hover);
            _programer2Motion = _programer2ButtonFrame.Motion.Clone();
            _programer2DelayTime = _programer2ButtonFrame.DelayTime;

            _exitButtonFrame = (GameFrame)objectManagerArray[1].CreateObject(12);
            _exitButtonFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(Move_Complete_ExitFrame);
            _exitButton = (Button)objectManagerArray[2].CreateObject(5);
            _exitButtonFrame.AddChild(_exitButton);
            _exitButton.Mouse_Click += new Button.OnMouseClickHandler(Exit_Clicked);
            _exitButton.Mouse_Hover += new Button.OnMouseHoverHandler(Exit_Hover);
            _exitMotion = _exitButtonFrame.Motion.Clone();
            _exitDelayTime = _exitButtonFrame.DelayTime;
        }
 void ButtonHoverEffect(Button _button)
 {
     _button._sprite[0].Itexture2D = 1;
     GlobalVariables.GameCursor.IsHover = true;
 }
 void ButtonClickEffect(Button _button)
 {
     //if (((GameFrame)_button.Owner).Motion.IsStanding)
     SetGameFrameGoOut((GameFrame)_button.Owner, 0);
 }
        public override void InitState(GameObjectManager[] objectManagerArray, MainGame owner)
        {
            //Trong innit tao
            base.InitState(objectManagerArray, owner);

            _newgameFrame = (GameFrame)objectManagerArray[1].CreateObject(0);
            _newgameFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_NewGame);
            _newgameButton = (Button)objectManagerArray[2].CreateObject(0);
            _newgameFrame.AddChild(_newgameButton);
            _newgameButton.Owner = _newgameFrame;
            _newgameButton.Mouse_Click += new Button.OnMouseClickHandler(StateMenu_Mouse_Click_NewGame);
            _newgameButton.Mouse_Hover += new Button.OnMouseHoverHandler(StateMenu_Mouse_Hover_NewGame);
            _newgameFrameMotion = _newgameFrame.Motion.Clone();
            _newgameDelayTimeGoIn = _newgameFrame.DelayTime;

            _loadgameFrame = (GameFrame)objectManagerArray[1].CreateObject(1);
            _loadgameFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_Load);
            _loadgameButton = (Button)objectManagerArray[2].CreateObject(1);
            _loadgameFrame.AddChild(_loadgameButton);
            _loadgameButton.Owner = _loadgameFrame;
            _loadgameButton.Mouse_Click += new Button.OnMouseClickHandler(StateMenu_Mouse_Click_Load);
            _loadgameButton.Mouse_Hover += new Button.OnMouseHoverHandler(StateMenu_Mouse_Hover_Load);
            _loadgameFrameMotion = _loadgameFrame.Motion.Clone();
            _loadgameDelayTimeGoIn = _loadgameFrame.DelayTime;

            _optionFrame = (GameFrame)objectManagerArray[1].CreateObject(2);
            _optionFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_Option);
            _optionButton = (Button)objectManagerArray[2].CreateObject(2);
            _optionFrame.AddChild(_optionButton);
            _optionButton.Owner = _optionFrame;
            _optionButton.Mouse_Click += new Button.OnMouseClickHandler(StateMenu_Mouse_Click_Option);
            _optionButton.Mouse_Hover += new Button.OnMouseHoverHandler(StateMenu_Mouse_Hover_Option);
            _optionFrameMotion = _optionFrame.Motion.Clone();
            _optionDelayTimeGoIn = _optionFrame.DelayTime;

            _helpFrame = (GameFrame)objectManagerArray[1].CreateObject(3);
            _helpFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_Help);
            _helpButton = (Button)objectManagerArray[2].CreateObject(3);
            _helpFrame.AddChild(_helpButton);
            _helpButton.Owner = _helpFrame;
            _helpButton.Mouse_Click += new Button.OnMouseClickHandler(StateMenu_Mouse_Click_Help);
            _helpButton.Mouse_Hover += new Button.OnMouseHoverHandler(StateMenu_Mouse_Hover_Help);
            _helpFrameMotion = _helpFrame.Motion.Clone();
            _helpDelayTimeGoIn = _helpFrame.DelayTime;

            _aboutFrame = (GameFrame)objectManagerArray[1].CreateObject(4);
            _aboutFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_About);
            _aboutButton = (Button)objectManagerArray[2].CreateObject(4);
            _aboutFrame.AddChild(_aboutButton);
            _aboutButton.Owner = _aboutFrame;
            _aboutButton.Mouse_Click += new Button.OnMouseClickHandler(StateMenu_Mouse_Click_About);
            _aboutButton.Mouse_Hover += new Button.OnMouseHoverHandler(StateMenu_Mouse_Hover_About);
            _aboutFrameMotion = _aboutFrame.Motion.Clone();
            _aboutDelayTimeGoIn = _aboutFrame.DelayTime;

            _quitFrame = (GameFrame)objectManagerArray[1].CreateObject(5);
            _quitFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_Quit);
            _quitButton = (Button)objectManagerArray[2].CreateObject(5);
            _quitFrame.AddChild(_quitButton);
            _quitButton.Owner = _quitFrame;
            _quitButton.Mouse_Click += new Button.OnMouseClickHandler(StateMenu_Mouse_Click_Quit);
            _quitButton.Mouse_Hover += new Button.OnMouseHoverHandler(StateMenu_Mouse_Hover_Quit);
            _quitFrameMotion = _quitFrame.Motion.Clone();
            _quitDelayTimeGoIn = _quitFrame.DelayTime;

            _menuFrame = (GameFrame)objectManagerArray[1].CreateObject(6);
            _menuFrame.Move_Complete += new GameFrame.OnMoveCompletedHandler(StateMenu_Move_Complete_MenuFrame);
            _menuFrameMotion = _menuFrame.Motion.Clone();
            _menuFrameDelayTimeGoIn = _menuFrame.DelayTime;
        }
 public void ReleaseEffect(Button _button)
 {
     _button._sprite[0].Itexture2D = 0;
     GlobalVariables.GameCursor.IsIdle = true;
 }
        public void LevelUpRightHand(Button _button)
        {
            if (_rhAddition < 1)
                return;
            if (((Skill)_button.Owner).Level < ((Skill)_button.Owner).ListLevel.Count - 1)
            {
                ((Skill)_button.Owner).Level++;
                _rhAddition--;
                _lbRHAddition.StringInfo = _rhAddition.ToString();
                if (_rhAddition == 0)
                {
                    _lbRHAddition.StringColor = Color.Red;
                }

                if (((Skill)_button.Owner).Level == ((Skill)_button.Owner).ListLevel.Count - 1)
                {
                    _button.Endalbe = false;
                    _button.ColorToDraw = Color.White;
                }
            }
        }
        public void GetResources(List<GameObjectManager> _resources)
        {
            _mainFrame = (GameFrame)_resources[0].CreateObject(5);
            _mainFrame.IsVisible = false;

            _btNormalAttack = (Button)_resources[1].CreateObject(15);
            _btNormalAttack.Owner = Character.ListLeftHandSkill[0];
            _btNormalAttack.GetNewIdleTexture(Character.ListLeftHandSkill[0].IdleIcon);
            _btNormalAttack.GetNewClickedTexture(Character.ListLeftHandSkill[0].ClickedIcon);
            _btNormalAttack.Mouse_Click += new Button.OnMouseClickHandler(NormalAttack_MouseClicked);
            _btNormalAttack.Mouse_Hover += new Button.OnMouseHoverHandler(NormalAttack_MouseHover);
            _btNormalAttack.Mouse_Released += new Button.OnMouseReleasedHandler(NormalAttack_MouseRelease);

            _btSkillCleaving = (Button)_resources[1].CreateObject(16);
            _btSkillCleaving.Owner = Character.ListLeftHandSkill[1];
            _btSkillCleaving.GetNewIdleTexture(Character.ListLeftHandSkill[1].IdleIcon);
            _btSkillCleaving.GetNewClickedTexture(Character.ListLeftHandSkill[1].ClickedIcon);
            _btSkillCleaving.Mouse_Click += new Button.OnMouseClickHandler(SkillCleaving_MouseClicked);
            _btSkillCleaving.Mouse_Hover += new Button.OnMouseHoverHandler(SkillCleaving_MouseHover);
            _btSkillCleaving.Mouse_Released += new Button.OnMouseReleasedHandler(SkillCleaving_MouseRelease);

            _btSkillCritical = (Button)_resources[1].CreateObject(17);
            _btSkillCritical.Owner = Character.ListLeftHandSkill[2];
            _btSkillCritical.GetNewIdleTexture(Character.ListLeftHandSkill[2].IdleIcon);
            _btSkillCritical.GetNewClickedTexture(Character.ListLeftHandSkill[2].ClickedIcon);
            _btSkillCritical.Mouse_Click += new Button.OnMouseClickHandler(SkillCritical_MouseClicked);
            _btSkillCritical.Mouse_Hover += new Button.OnMouseHoverHandler(SkillCritical_MouseHover);
            _btSkillCritical.Mouse_Released += new Button.OnMouseReleasedHandler(SkillCritical_MouseRelease);

            _btSkillCurse = (Button)_resources[1].CreateObject(18);
            _btSkillCurse.Owner = Character.ListLeftHandSkill[3];
            _btSkillCurse.GetNewIdleTexture(Character.ListLeftHandSkill[3].IdleIcon);
            _btSkillCurse.GetNewClickedTexture(Character.ListLeftHandSkill[3].ClickedIcon);
            _btSkillCurse.Mouse_Click += new Button.OnMouseClickHandler(SkillCurse_MouseClicked);
            _btSkillCurse.Mouse_Hover += new Button.OnMouseHoverHandler(SkillCurse_MouseHover);
            _btSkillCurse.Mouse_Released += new Button.OnMouseReleasedHandler(SkillCurse_MouseRelease);

            _btSkillOverspeed = (Button)_resources[1].CreateObject(19);
            _btSkillOverspeed.Owner = Character.ListLeftHandSkill[4];
            _btSkillOverspeed.GetNewIdleTexture(Character.ListLeftHandSkill[4].IdleIcon);
            _btSkillOverspeed.GetNewClickedTexture(Character.ListLeftHandSkill[4].ClickedIcon);
            _btSkillOverspeed.Mouse_Click += new Button.OnMouseClickHandler(SkillOverspeed_MouseClicked);
            _btSkillOverspeed.Mouse_Hover += new Button.OnMouseHoverHandler(SkillOverSpeed_MouseHover);
            _btSkillOverspeed.Mouse_Released += new Button.OnMouseReleasedHandler(SkillOverSpeed_MouseRelease);

            _btSkillLifeSteal = (Button)_resources[1].CreateObject(20);
            _btSkillLifeSteal.Owner = Character.ListLeftHandSkill[5];
            _btSkillLifeSteal.GetNewIdleTexture(Character.ListLeftHandSkill[5].IdleIcon);
            _btSkillLifeSteal.GetNewClickedTexture(Character.ListLeftHandSkill[5].ClickedIcon);
            _btSkillLifeSteal.Mouse_Click += new Button.OnMouseClickHandler(SkillLifeSteal_MouseClicked);
            _btSkillLifeSteal.Mouse_Hover += new Button.OnMouseHoverHandler(SkillLifeSteal_MouseHover);
            _btSkillLifeSteal.Mouse_Released += new Button.OnMouseReleasedHandler(SkillLifeSteal_MouseRelease);

            _btSkillBash = (Button)_resources[1].CreateObject(21);
            _btSkillBash.Owner = Character.ListLeftHandSkill[6];
            _btSkillBash.GetNewIdleTexture(Character.ListLeftHandSkill[6].IdleIcon);
            _btSkillBash.GetNewClickedTexture(Character.ListLeftHandSkill[6].ClickedIcon);
            _btSkillBash.Mouse_Click += new Button.OnMouseClickHandler(SkillBash_MouseClicked);
            _btSkillBash.Mouse_Hover += new Button.OnMouseHoverHandler(SkillBash_MouseHover);
            _btSkillBash.Mouse_Released += new Button.OnMouseReleasedHandler(SkillBash_MouseRelease);

            _mainFrame.AddChild(_btNormalAttack);
            _mainFrame.AddChild(_btSkillCleaving);
            _mainFrame.AddChild(_btSkillCritical);
            _mainFrame.AddChild(_btSkillCurse);
            _mainFrame.AddChild(_btSkillOverspeed);
            _mainFrame.AddChild(_btSkillLifeSteal);
            _mainFrame.AddChild(_btSkillBash);
        }
 public void ShowDetailSkill(Button _button)
 {
     ((Skill)_button.Owner).ToShowDetails = true;
     ((Skill)_button.Owner).CurrentButton = _button;
     Vector2 _location = GetSkillDetailLocation(_button, ((Skill)_button.Owner).LargeIcon.Width, ((Skill)_button.Owner).LargeIcon.Height);
     ((Skill)_button.Owner).X = _location.X;
     ((Skill)_button.Owner).Y = _location.Y;
 }
        public void GetResources(List<GameObjectManager> _resources)
        {
            _mainFrame = (GameFrame)_resources[0].CreateObject(6);
            _mainFrame.IsVisible = false;

            _btLightingStrike = (Button)_resources[1].CreateObject(29);
            _btLightingStrike.Owner = _character.ListRightHandSkill[0];
            _btLightingStrike.GetNewIdleTexture(_character.ListRightHandSkill[0].IdleIcon);
            _btLightingStrike.GetNewClickedTexture(_character.ListRightHandSkill[0].ClickedIcon);
            _btLightingStrike.Mouse_Click += new Button.OnMouseClickHandler(LightingStrike_Clicked);
            _btLightingStrike.Mouse_Hover += new Button.OnMouseHoverHandler(LightingStrike_Hover);
            _btLightingStrike.Mouse_Released += new Button.OnMouseReleasedHandler(LightingStrike_Release);

            _btDeadlyBees = (Button)_resources[1].CreateObject(30);
            _btDeadlyBees.Owner = _character.ListRightHandSkill[1];
            _btDeadlyBees.GetNewIdleTexture(_character.ListRightHandSkill[1].IdleIcon);
            _btDeadlyBees.GetNewClickedTexture(_character.ListRightHandSkill[1].ClickedIcon);
            _btDeadlyBees.Mouse_Click += new Button.OnMouseClickHandler(DeadlyBees_Clicked);
            _btDeadlyBees.Mouse_Hover += new Button.OnMouseHoverHandler(DeadlyBees_Hover);
            _btDeadlyBees.Mouse_Released += new Button.OnMouseReleasedHandler(DeadlyBees_Release);

            _btSoulsRelease = (Button)_resources[1].CreateObject(31);
            _btSoulsRelease.Owner = _character.ListRightHandSkill[2];
            _btSoulsRelease.GetNewIdleTexture(_character.ListRightHandSkill[2].IdleIcon);
            _btSoulsRelease.GetNewClickedTexture(_character.ListRightHandSkill[2].ClickedIcon);
            _btSoulsRelease.Mouse_Click += new Button.OnMouseClickHandler(SouldRelease_Clicked);
            _btSoulsRelease.Mouse_Hover += new Button.OnMouseHoverHandler(SouldRelease_Hover);
            _btSoulsRelease.Mouse_Released += new Button.OnMouseReleasedHandler(SouldRelease_Release);

            _btEathShake = (Button)_resources[1].CreateObject(32);
            _btEathShake.Owner = _character.ListRightHandSkill[3];
            _btEathShake.GetNewIdleTexture(_character.ListRightHandSkill[3].IdleIcon);
            _btEathShake.GetNewClickedTexture(_character.ListRightHandSkill[3].ClickedIcon);
            _btEathShake.Mouse_Click += new Button.OnMouseClickHandler(EarthShake_Clicked);
            _btEathShake.Mouse_Hover += new Button.OnMouseHoverHandler(EarthShake_Hover);
            _btEathShake.Mouse_Released += new Button.OnMouseReleasedHandler(EarthShake_Release);

            _btWaveForm = (Button)_resources[1].CreateObject(33);
            _btWaveForm.Owner = _character.ListRightHandSkill[4];
            _btWaveForm.GetNewIdleTexture(_character.ListRightHandSkill[4].IdleIcon);
            _btWaveForm.GetNewClickedTexture(_character.ListRightHandSkill[4].ClickedIcon);
            _btWaveForm.Mouse_Click += new Button.OnMouseClickHandler(WaveForm_Clicked);
            _btWaveForm.Mouse_Hover += new Button.OnMouseHoverHandler(WaveForm_Hover);
            _btWaveForm.Mouse_Released += new Button.OnMouseReleasedHandler(WaveForm_Release);

            _btLightingField = (Button)_resources[1].CreateObject(34);
            _btLightingField.Owner = _character.ListRightHandSkill[5];
            _btLightingField.GetNewIdleTexture(_character.ListRightHandSkill[5].IdleIcon);
            _btLightingField.GetNewClickedTexture(_character.ListRightHandSkill[5].ClickedIcon);
            _btLightingField.Mouse_Click += new Button.OnMouseClickHandler(LightingField_Clicked);
            _btLightingField.Mouse_Hover += new Button.OnMouseHoverHandler(LightingField_Hover);
            _btLightingField.Mouse_Released += new Button.OnMouseReleasedHandler(LightingField_Release);

            //Vì sửa lai XML nen thang cuối cùng bi nhảy lên 36
            _btInvisible = (Button)_resources[1].CreateObject(36);
            _btInvisible.Owner = _character.ListRightHandSkill[6];
            _btInvisible.GetNewIdleTexture(_character.ListRightHandSkill[6].IdleIcon);
            _btInvisible.GetNewClickedTexture(_character.ListRightHandSkill[6].ClickedIcon);
            _btInvisible.Mouse_Click += new Button.OnMouseClickHandler(InvisiblePoison_Clicked);
            _btInvisible.Mouse_Hover += new Button.OnMouseHoverHandler(InvisiblePoison_Hover);
            _btInvisible.Mouse_Released += new Button.OnMouseReleasedHandler(InvisiblePoison_Release);

            _mainFrame.AddChild(_btLightingStrike);
            _mainFrame.AddChild(_btDeadlyBees);
            _mainFrame.AddChild(_btSoulsRelease);
            _mainFrame.AddChild(_btEathShake);
            _mainFrame.AddChild(_btWaveForm);
            _mainFrame.AddChild(_btLightingField);
            _mainFrame.AddChild(_btInvisible);
        }