public override void InitState(GameObjectManager[] objectManagerArray, MainGame owner)
        {
            base.InitState(objectManagerArray, owner);
            _map = (Map)objectManagerArray[1].CreateObject(0);
            GlobalVariables.MapCollisionDim = _map.CollisionDim;
            _char = (PlayerCharacter)objectManagerArray[0].CreateObject(0);
            _char.SetMap(_map);
            _char.StateOwner = this;

            _map.Owner = this;
            _listMonsters = _map.InitMonsterList((MonsterManager)objectManagerArray[2],@"Data\Map\map01\map01_monster.xml");

            _frog = new Fog();
            _frog.Init(owner.Content);
            _frog.SetCharacter(_char);

            _displayMessageLayer = new DisplayMessageLayer();

            //Phần ???---------------------------------------------------------------------------
            _listPortral = _map.InitPortralList((PortralManager)objectManagerArray[4], @"Data\Map\map01\map01_portral.xml");
            _listObstacle = _map.InitObstacle((MapObstacleManager)objectManagerArray[5], @"Data\Map\map01\map01_obstacle.xml");
            _objectManagerArray = objectManagerArray;
            _listToDraw = new List<VisibleGameEntity>();

            _char.InitSkill();

            //Phần healthbar--------------------------------------------------------------------
            _healthBar = new HealthBar();
            _healthBar.SetCharacter(_char);

            List<GameObjectManager> _resourcesForHealthbar = new List<GameObjectManager>();
            _resourcesForHealthbar.Add(objectManagerArray[8]);
            _resourcesForHealthbar.Add(objectManagerArray[9]);
            _resourcesForHealthbar.Add(objectManagerArray[10]);
            _resourcesForHealthbar.Add(objectManagerArray[11]);
            _healthBar.GetResources(_resourcesForHealthbar);

            //Phần SkillBoard------------------------------------------------------------------
            _skillBoard = new SkillBoard();
            _skillBoard.SetCharacter(_char);

            List<GameObjectManager> _resourcesForSkillBoard = new List<GameObjectManager>();
            _resourcesForSkillBoard.Add(objectManagerArray[8]);
            _resourcesForSkillBoard.Add(objectManagerArray[10]);
            _resourcesForSkillBoard.Add(objectManagerArray[11]);
            _skillBoard.GetResources(_resourcesForSkillBoard);

            //Phần Left-hand selection frame
            _lhSkillSelectionFrame = new LHSkillSelectionFrame();
            _lhSkillSelectionFrame.SetCharacter(_char);

            List<GameObjectManager> _resourceForLHSSelectionFrame = new List<GameObjectManager>();
            _resourceForLHSSelectionFrame.Add(_objectManagerArray[8]);
            _resourceForLHSSelectionFrame.Add(_objectManagerArray[10]);
            _lhSkillSelectionFrame.GetResources(_resourceForLHSSelectionFrame);

            //Phần Right-hand selection frame
            _rhSkillSelectionFrame = new RHSkillSelectionFrame();
            _rhSkillSelectionFrame.SetCharacter(_char);
            _rhSkillSelectionFrame.GetResources(_resourceForLHSSelectionFrame);

            //Phần subMenu
            _subMenu = new SubMenu();
            List<GameObjectManager> _resourceForSubMenu = new List<GameObjectManager>();
            _resourceForSubMenu.Add(_objectManagerArray[8]);
            _resourceForSubMenu.Add(_objectManagerArray[10]);
            _subMenu.GetResources(_resourceForSubMenu);
            _subMenu.GetStateOwner(this);

            //Phần infoBoard
            _infoBoard = new InfoBoard();
            _infoBoard.SetCharacter(_char);
            List<GameObjectManager> _resourceForInfo = new List<GameObjectManager>();
            _resourceForInfo.Add(_objectManagerArray[8]);
            _resourceForInfo.Add(_objectManagerArray[10]);
            _resourceForInfo.Add(_objectManagerArray[11]);
            _infoBoard.GetResources(_resourceForInfo);
        }
        public override void InitState(GameObjectManager[] objectManagerArray, MainGame owner)
        {
            base.InitState(objectManagerArray, owner);
            _map = (Map)objectManagerArray[1].CreateObject(0);
            GlobalVariables.MapCollisionDim = _map.CollisionDim;
            _char = (PlayerCharacter)objectManagerArray[0].CreateObject(0);
            _char.SetMap(_map);
            _char.StateOwner = this;

            _map.Owner    = this;
            _listMonsters = _map.InitMonsterList((MonsterManager)objectManagerArray[2], @"Data\Map\map01\map01_monster.xml");

            _frog = new Fog();
            _frog.Init(owner.Content);
            _frog.SetCharacter(_char);

            _displayMessageLayer = new DisplayMessageLayer();

            //Phần ???---------------------------------------------------------------------------
            _listPortral        = _map.InitPortralList((PortralManager)objectManagerArray[4], @"Data\Map\map01\map01_portral.xml");
            _listObstacle       = _map.InitObstacle((MapObstacleManager)objectManagerArray[5], @"Data\Map\map01\map01_obstacle.xml");
            _objectManagerArray = objectManagerArray;
            _listToDraw         = new List <VisibleGameEntity>();

            _char.InitSkill();

            //Phần healthbar--------------------------------------------------------------------
            _healthBar = new HealthBar();
            _healthBar.SetCharacter(_char);

            List <GameObjectManager> _resourcesForHealthbar = new List <GameObjectManager>();

            _resourcesForHealthbar.Add(objectManagerArray[8]);
            _resourcesForHealthbar.Add(objectManagerArray[9]);
            _resourcesForHealthbar.Add(objectManagerArray[10]);
            _resourcesForHealthbar.Add(objectManagerArray[11]);
            _healthBar.GetResources(_resourcesForHealthbar);

            //Phần SkillBoard------------------------------------------------------------------
            _skillBoard = new SkillBoard();
            _skillBoard.SetCharacter(_char);

            List <GameObjectManager> _resourcesForSkillBoard = new List <GameObjectManager>();

            _resourcesForSkillBoard.Add(objectManagerArray[8]);
            _resourcesForSkillBoard.Add(objectManagerArray[10]);
            _resourcesForSkillBoard.Add(objectManagerArray[11]);
            _skillBoard.GetResources(_resourcesForSkillBoard);

            //Phần Left-hand selection frame
            _lhSkillSelectionFrame = new LHSkillSelectionFrame();
            _lhSkillSelectionFrame.SetCharacter(_char);

            List <GameObjectManager> _resourceForLHSSelectionFrame = new List <GameObjectManager>();

            _resourceForLHSSelectionFrame.Add(_objectManagerArray[8]);
            _resourceForLHSSelectionFrame.Add(_objectManagerArray[10]);
            _lhSkillSelectionFrame.GetResources(_resourceForLHSSelectionFrame);

            //Phần Right-hand selection frame
            _rhSkillSelectionFrame = new RHSkillSelectionFrame();
            _rhSkillSelectionFrame.SetCharacter(_char);
            _rhSkillSelectionFrame.GetResources(_resourceForLHSSelectionFrame);

            //Phần subMenu
            _subMenu = new SubMenu();
            List <GameObjectManager> _resourceForSubMenu = new List <GameObjectManager>();

            _resourceForSubMenu.Add(_objectManagerArray[8]);
            _resourceForSubMenu.Add(_objectManagerArray[10]);
            _subMenu.GetResources(_resourceForSubMenu);
            _subMenu.GetStateOwner(this);

            //Phần infoBoard
            _infoBoard = new InfoBoard();
            _infoBoard.SetCharacter(_char);
            List <GameObjectManager> _resourceForInfo = new List <GameObjectManager>();

            _resourceForInfo.Add(_objectManagerArray[8]);
            _resourceForInfo.Add(_objectManagerArray[10]);
            _resourceForInfo.Add(_objectManagerArray[11]);
            _infoBoard.GetResources(_resourceForInfo);
        }