Ejemplo n.º 1
0
        public void Init()
        {
            m_QuestionBrick = new QuestionBrick(new Vector2(100, 155), IDObject.ITEM_STARMAN);
            m_QuestionBrick2 = new QuestionBrick(new Vector2(84, 155), IDObject.ITEM_FIRE_FLOWER);
            for (int i = 0; i < 100; i++)
            {
                BaseList.Add(new BaseBrick(new Vector2(i * CResourceManager.GetInstance().GetResource(IDResource.MISC_BASE_BRICK).FrameWidht, 224-16)));
            }

            for (int i = 0; i < BaseList.Count; i++)
            {
                m_Tree.AddObject(BaseList[i]);
            }
            m_Tree.AddObject(new Goomba(new Vector2(300, 200), IDDir.RIGHT));
            m_Tree.AddObject(new SoftBrick(new Vector2(116, 155)));
            m_Tree.AddObject(new Koopa(new Vector2(50, 174)));
            m_Tree.AddObject(m_QuestionBrick);
            m_Tree.AddObject(m_QuestionBrick.Item);
            m_Tree.AddObject(m_QuestionBrick2);
            m_Tree.AddObject(m_QuestionBrick2.Item);
            m_Tree.AddObject(new StockPipe(new Vector2(200, 224 - 32)));
            m_Tree.AddObject(new GatePipe(new Vector2(200, 224 - 48), IDStatus.GATE_PIPE_DOWN, new Vector2(650, 0)));
            m_Tree.AddObject(new ItemCoin(new Vector2(200, 100), IDObject.ITEM_COIN_NORMAL));
            m_Tree.AddObject(new BigMountain(new Vector2(300, 173)));
            int a = 2;
            while (a <= 9)
            {
                for (int i = 0; i < a; i++)
                {
                    m_Tree.AddObject(new HardBrick(new Vector2(700 - 16 * i, GlobalValue.SCREEN_HEIGHT - 16 * (11 - a))));
                }
                ++a;
            }
            m_Tree.AddObject(new GoalPole(new Vector2(815, GlobalValue.SCREEN_HEIGHT - 16 * 2 - 136)));
            m_Tree.AddObject(new HardBrick(new Vector2(815 - 4, GlobalValue.SCREEN_HEIGHT - 16 * 2)));

            m_Tree.AddObject(new Castle(new Vector2(950, GlobalValue.SCREEN_HEIGHT - 16 - 80)));
        }
Ejemplo n.º 2
0
        public static CAnimationObject MakeObject(IDObject _type, Vector2 _pos)
        {
            CAnimationObject _object = null;
            switch (_type)
            {
                //case IDObject.SMALL_MARIO:
                //    _object = new Mario(_pos);
                //    break;
                case IDObject.ENEMY_GOOMBA_OW:
                    _object = new Goomba(_pos, IDDir.LEFT);
                    break;
                case IDObject.ENEMY_KOOPA_OW:
                    _object = new Koopa(_pos);
                    break;
                case IDObject.MISC_BASE_BRICK:
                    _object = new BaseBrick(_pos);
                    break;
                case IDObject.MISC_BIG_GRASS:
                    _object = new BigGrass(_pos);
                    break;
                case IDObject.MISC_BIG_MOUNTAIN:
                    _object = new BigMountain(_pos);
                    break;
                case IDObject.MISC_CASTLE:
                    _object = new Castle(_pos);
                    break;
                case IDObject.ENEMY_BOSS:
                    _object = new Boss(_pos);
                    break;
                //case IDObject.MISC_GATE_PIPE:
                    //_object = new GatePipe(_pos, IDStatus.GATE_PIPE_DOWN);
                    //break;
                case IDObject.MISC_HARD_BRICK:
                    _object = new HardBrick(_pos);
                    break;
                case IDObject.MISC_IRON_BRICK:
                    _object = new HardBrick(_pos);
                    break;
                case IDObject.MISC_STOCK_PIPE:
                    _object = new StockPipe(_pos);
                    break;
                case IDObject.MISC_MEDIUM_GRASS:
                    _object = new MediumGrass(_pos);
                    break;
                case IDObject.MISC_MEDIUM_MOUNTAIN:
                    _object = new MediumMountain(_pos);
                    break;
                case IDObject.MISC_PIECE:
                    _object = new Piece(_pos);
                    break;
                case IDObject.MISC_QUESTION_BRICK:
                    _object = new QuestionBrick(_pos, IDObject.ITEM_COIN_ACTIVATED);
                    break;
                case IDObject.MISC_SMALL_GRASS:
                    _object = new SmallGrass(_pos);
                    break;
                case IDObject.MISC_SOFT_BRICK:
                    _object = new SoftBrick(_pos);
                    break;
                case IDObject.MISC_GOAL_POLE:
                    _object = new GoalPole(_pos);
                    break;
                case IDObject.MISC_GATE_PIPE:
                    _object = new GatePipe(_pos);
                    break;
                case IDObject.MISC_FLAG:
                    _object = new Flag(_pos);
                    break;
                //case IDObject.BRICK_COIN:
                //    _object = new QuestionBrick(_pos, IDObject.ITEM_COIN_ACTIVATED);
                //    break;
                case IDObject.ITEM_STARMAN:
                    _object = new ItemStarman(_pos);
                    break;
                //case IDObject.MISC_UP_PIPE:
                //    _object = new UpPipe(_pos);
                //    break;
                case IDObject.ITEM_1UP_MUSHROOM:
                    _object = new Item1UpMushroom(_pos);
                    break;
                case IDObject.MISC_SMALL_CLOUND:
                    _object = new SmallClound(_pos);
                    break;
                case IDObject.MISC_MEDIUM_CLOUND:
                    _object = new MediumClound(_pos);
                    break;
                case IDObject.MISC_BIG_CLOUND:
                    _object = new BigClound(_pos);
                    break;
                case IDObject.ITEM_COIN_ACTIVATED:
                    _object = new ItemCoin(_pos, IDObject.ITEM_COIN_ACTIVATED);
                    break;
                case IDObject.ITEM_COIN_NORMAL:
                    _object = new ItemCoin(_pos, IDObject.ITEM_COIN_NORMAL);
                    break;
                case IDObject.ITEM_FIRE_FLOWER:
                    _object = new ItemFireFlower(_pos);
                    break;
                case IDObject.ITEM_SUPER_MUSHROOM:
                    _object = new ItemSuperMushroom(_pos);
                    break;
                case IDObject.ITEM_GROW_UP:
                    _object = new ItemGrowUp(_pos);
                    break;
                //case IDObject.BRICK_COIN:
                //    _object = new QuestionBrick(_pos, IDObject.ITEM_COIN_ACTIVATED);
                //    break;
                //case IDObject.BRICK_FLOWER:
                //    _object = new QuestionBrick(_pos, IDObject.ITEM_FIRE_FLOWER);
                //    break;
                //case IDObject.BRICK_SUPPERMUSHROOM:
                //    _object = new QuestionBrick(_pos, IDObject.ITEM_SUPER_MUSHROOM);
                //    break;
                //case IDObject.BRICK_1UPMUSHROOM:
                //    _object = new QuestionBrick(_pos, IDObject.BRICK_1UPMUSHROOM);
                //    break;
                //case IDObject.BRICK_STAR:
                //    _object = new QuestionBrick(_pos, IDObject.ITEM_STARMAN);
                //    break;
                default:
                    break;
            }

            return _object;
        }