Exemple #1
0
 public Buttons(IDResource _ID, Vector2 _pos)
 {
     IsFocus  = false;
     ID       = _ID;
     Sprite   = CResourceManager.GetInstance().GetResource(ID);
     Position = _pos;
 }
 public Buttons(IDResource _ID, Vector2 _pos)
 {
     IsFocus = false;
     ID = _ID;
     Sprite = CResourceManager.GetInstance().GetResource(ID);
        Position = _pos;
 }
 public CAnimation(CAnimation _Copy)
 {
     m_IDResouce = _Copy.m_IDResouce;
     m_FrameStart = _Copy.m_FrameStart;
     m_FrameEnd = _Copy.m_FrameEnd;
     m_LocalTime = _Copy.m_LocalTime;
     m_TimeAnimation = _Copy.m_TimeAnimation;
     m_CurFrame = _Copy.m_CurFrame;
     m_NumLoop = _Copy.m_NumLoop;
 }
Exemple #4
0
 public void CreateAnimation(IDResource _IDResource, int _FrameStart, int _FrameEnd, float _TimeAnimation)
 {
     m_IDResouce     = _IDResource;
     m_FrameStart    = _FrameStart;
     m_FrameEnd      = _FrameEnd;
     m_CurFrame      = _FrameStart;
     m_LocalTime     = 0.0f;
     m_TimeAnimation = _TimeAnimation;
     m_NumLoop       = 0;
 }
Exemple #5
0
 public CAnimation(CAnimation _Copy)
 {
     m_IDResouce     = _Copy.m_IDResouce;
     m_FrameStart    = _Copy.m_FrameStart;
     m_FrameEnd      = _Copy.m_FrameEnd;
     m_LocalTime     = _Copy.m_LocalTime;
     m_TimeAnimation = _Copy.m_TimeAnimation;
     m_CurFrame      = _Copy.m_CurFrame;
     m_NumLoop       = _Copy.m_NumLoop;
 }
        public SpriteFont GetFont(IDResource _ID)
        {
            switch (_ID)
            {
            case IDResource.FONT:
                return(Font);

            default:
                return(null);
            }
        }
        public Song GetSong(IDResource _ID)
        {
            switch (_ID)
            {
            case IDResource.SONG_INTRO:
                return(m_IntroSong);

            case IDResource.SONG_THEMSONG_OW:
                return(m_ThemeSong);

            default:
                return(null);
            }
        }
Exemple #8
0
 public CSprite(CSprite _Copy)
 {
     m_IDResource     = _Copy.m_IDResource;
     m_SoureRectangle = _Copy.m_SoureRectangle;
     m_FrameWidth     = _Copy.m_FrameWidth;
     m_FrameHeight    = _Copy.m_FrameHeight;
     m_Cols           = _Copy.m_Cols;
     m_Texture        = _Copy.m_Texture;
     m_Animation      = new CAnimation(_Copy.m_Animation);
     m_Origin         = _Copy.m_Origin;
     m_Position       = _Copy.m_Position;
     m_Color          = _Copy.m_Color;
     m_Rotation       = _Copy.m_Rotation;
     m_Scale          = _Copy.m_Scale;
     m_Effect         = _Copy.m_Effect;
     m_Depth          = _Copy.m_Depth;
 }
Exemple #9
0
 public CSprite(IDResource _IDResouce, int _TotalFrame, int _FrameWidth, int _FrameHeight, int _Cols)
 {
     m_IDResource     = _IDResouce;
     m_TotalFrame     = _TotalFrame;
     m_FrameWidth     = _FrameWidth;
     m_FrameHeight    = _FrameHeight;
     m_SoureRectangle = new Rectangle(0, 0, m_FrameWidth, m_FrameHeight);
     m_Cols           = _Cols;
     m_Origin         = Vector2.Zero;
     m_Position       = Vector2.Zero;
     m_Rotation       = 0.0f;
     m_Scale          = new Vector2(1.0f, 1.0f);
     m_Effect         = SpriteEffects.None;
     m_Depth          = 0.0f;
     m_Color          = Color.White;
     m_Animation      = new CAnimation();
 }
 public CSprite(IDResource _IDResouce, int _TotalFrame, int _FrameWidth, int _FrameHeight, int _Cols)
 {
     m_IDResource = _IDResouce;
     m_TotalFrame = _TotalFrame;
     m_FrameWidth = _FrameWidth;
     m_FrameHeight = _FrameHeight;
     m_SoureRectangle = new Rectangle(0, 0, m_FrameWidth, m_FrameHeight);
     m_Cols = _Cols;
     m_Origin = Vector2.Zero;
     m_Position = Vector2.Zero;
     m_Rotation = 0.0f;
     m_Scale = new Vector2(1.0f, 1.0f);
     m_Effect = SpriteEffects.None;
     m_Depth = 0.0f;
     m_Color = Color.White;
     m_Animation = new CAnimation();
 }
 public CSprite(CSprite _Copy)
 {
     m_IDResource = _Copy.m_IDResource;
     m_SoureRectangle = _Copy.m_SoureRectangle;
     m_FrameWidth = _Copy.m_FrameWidth;
     m_FrameHeight = _Copy.m_FrameHeight;
     m_Cols = _Copy.m_Cols;
     m_Texture = _Copy.m_Texture;
     m_Animation = new CAnimation(_Copy.m_Animation);
     m_Origin = _Copy.m_Origin;
     m_Position = _Copy.m_Position;
     m_Color = _Copy.m_Color;
     m_Rotation = _Copy.m_Rotation;
     m_Scale = _Copy.m_Scale;
     m_Effect = _Copy.m_Effect;
     m_Depth = _Copy.m_Depth;
 }
 public SpriteFont GetFont(IDResource _ID)
 {
     switch (_ID)
     {
         case IDResource.FONT:
             return Font;
         default:
             return null;
     }
 }
 public BtnEffSounds(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
Exemple #14
0
 public BtnBGSounds(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
        public CSprite GetResource(IDResource _ID)
        {
            switch (_ID)
            {
                #region Sprite
            case IDResource.MISC_BIG_CLOUND:
                return(Sprite_Big_Clound);

            case IDResource.MISC_MEDIUM_CLOUND:
                return(Sprite_Medium_Clound);

            case IDResource.MISC_SMALL_CLOUND:
                return(Sprite_Small_Clound);

            case IDResource.MISC_FIREWORK:
                return(Sprite_Firework);

            case IDResource.MISC_STAR_FLAG_CASTLE:
                return(Sprite_Star_Flag_Castle);

            case IDResource.BIG_MARIO_INVICIBILITY:
                return(Sprite_Big_Invi);

            case IDResource.BIG_MARIO_INVICIBILITY2:
                return(Sprite_Big_Invi2);

            case IDResource.BIG_MARIO_INVICIBILITY3:
                return(Sprite_Big_Invi3);

            case IDResource.SMALL_MARIO_INVICIBILITY:
                return(Sprite_Small_Invi);

            case IDResource.SMALL_MARIO_INVICIBILITY2:
                return(Sprite_Small_Invi2);

            case IDResource.SMALL_MARIO_INVICIBILITY3:
                return(Sprite_Small_Invi3);

            case IDResource.MISC_CASTLE:
                return(Sprite_Castle);

            case IDResource.MISC_FLAG:
                return(Sprite_Flag);

            case IDResource.MISC_GOAL_POLE:
                return(Sprite_Goal_Pole);

            case IDResource.ICON_COIN:
                return(Icon_Coin);

            case IDResource.LOAD:
                return(BG_LoadGame);

            case IDResource.BULLET:
                return(Sprite_Bullet);

            case IDResource.ENEMY_HIDE_KOOPA_OW:
                return(Sprite_Hide_Koopa_OW);

            case IDResource.MISC_HARD_BRICK:
                return(Sprite_Hard_Brick);

            case IDResource.MISC_BIG_MOUNTAIN:
                return(Sprite_Big_Mountain);

            case IDResource.MISC_MEDIUM_MOUNTAIN:
                return(Sprite_Medium_Mountain);

            case IDResource.MISC_BIG_GRASS:
                return(Sprite_Big_Grass);

            case IDResource.MISC_MEDIUM_GRASS:
                return(Sprite_Medium_Grass);

            case IDResource.MISC_SMALL_GRASS:
                return(Sprite_Small_Grass);

            case IDResource.MISC_UP_PIPE:
                return(Sprite_Up_Pipe);

            case IDResource.MISC_STOCK_PIPE:
                return(Sprite_Stock_Pipe);

            case IDResource.MISC_GATE_PIPE:
                return(Sprite_Gate_Pipe);

            case IDResource.MISC_SOFT_BRICK:
                return(Sprite_Soft_Brick);

            case IDResource.MISC_PIECE_1:
                return(Sprite_Piece_1);

            case IDResource.MISC_PIECE_2:
                return(Sprite_Piece_2);

            case IDResource.GAME_OVER:
                return(BG_GameOver);

            case IDResource.ENEMY_GOOMBA_OW:
                return(Sprite_GoomBa_OW);

            case IDResource.ENEMY_KOOPA_OW:
                return(Sprite_Koopa_OW);

            case IDResource.ITEM_1UP_MUSHROOM:
                return(Sprite_1_Up_Mushroom);

            case IDResource.ITEM_FIRE_FLOWER:
                return(Sprite_Fire_Flower);

            case IDResource.ITEM_SUPER_MUSHROOM:
                return(Sprite_Super_Mushroom);

            case IDResource.ITEM_STARMAN:
                return(Sprite_Starman);

            case IDResource.ITEM_COIN_NORMAL:
                return(Sprite_Normal_Coin);

            case IDResource.ITEM_COIN_ACTIVATED:
                return(Sprite_Activated_Coin);

            case IDResource.MISC_IRON_BRICK:
                return(Sprite_Iron_Brick);

            case IDResource.MISC_QUESTION_BRICK:
                return(Sprite_Question_Brick);

            case IDResource.MISC_BASE_BRICK:
                return(Sprite_Base_Brick);

            case IDResource.SMALL_MARIO:
                return(Sprite_Small_Mario);

            case IDResource.SUPER_MARIO:
                return(Sprite_Super_Mario);

            case IDResource.FIRE_MARIO:
                return(Sprite_Fire_Mario);

                #endregion
                #region Code Danh
            case IDResource.INTRO_1:
                return(m_Intro1);

            case IDResource.INTRO_2:
                return(m_Intro2);

            case IDResource.BLACK:
                return(m_Black);

            case IDResource.MENU:
                return(m_BGMenu);

            case IDResource.ABOUT_Btn:
                return(Btn_About);

            case IDResource.ABOUT_Btn_Act:
                return(Btn_About_Act);

            case IDResource.EXIT_Btn:
                return(Btn_Exit);

            case IDResource.EXIT_Btn_Act:
                return(Btn_Exit_Act);

            case IDResource.NEWGAME_Btn:
                return(Btn_NewGame);

            case IDResource.NEWGAME_Btn_Act:
                return(Btn_NewGame_Act);

            case IDResource.OPTION_Btn:
                return(Btn_Option);

            case IDResource.OPTION_Btn_Act:
                return(Btn_Option_Act);

            case IDResource.ICON:
                return(Icon);

            case IDResource.OPTION:
                return(m_BGOption);

            case IDResource.SOUND_Btn:
                return(Btn_Sound);

            case IDResource.SOUND_Btn_Act:
                return(Btn_Sound_Act);

            case IDResource.BGSOUND_Btn:
                return(Btn_BGSound);

            case IDResource.BGOUND_Btn_Act:
                return(Btn_BGSound_Act);

            case IDResource.RETURN_Btn:
                return(Btn_Return);

            case IDResource.RETURN_Btn_Act:
                return(Btn_Return_Act);

            case IDResource.ABOUTBG:
                return(m_BGAbout);

            default:
                return(null);

                #endregion
            }
        }
 public BtnNewGame(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
 public BtnReturnMenu(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
 public CSprite GetResource(IDResource _ID)
 {
     switch(_ID)
     {
         #region Sprite
         case IDResource.ENEMY_BOSS:
             return Sprite_Boss;
         case IDResource.ENEMY_BOSS_BULLET:
             return Sprite_Boss_Bullet;
         case IDResource.MISC_BIG_CLOUND:
             return Sprite_Big_Clound;
         case IDResource.MISC_MEDIUM_CLOUND:
             return Sprite_Medium_Clound;
         case IDResource.MISC_SMALL_CLOUND:
             return Sprite_Small_Clound;
         case IDResource.MISC_FIREWORK:
             return Sprite_Firework;
         case IDResource.MISC_STAR_FLAG_CASTLE:
             return Sprite_Star_Flag_Castle;
         case IDResource.BIG_MARIO_INVICIBILITY:
             return Sprite_Big_Invi;
         case IDResource.BIG_MARIO_INVICIBILITY2:
             return Sprite_Big_Invi2;
         case IDResource.BIG_MARIO_INVICIBILITY3:
             return Sprite_Big_Invi3;
         case IDResource.SMALL_MARIO_INVICIBILITY:
             return Sprite_Small_Invi;
         case IDResource.SMALL_MARIO_INVICIBILITY2:
             return Sprite_Small_Invi2;
         case IDResource.SMALL_MARIO_INVICIBILITY3:
             return Sprite_Small_Invi3;
         case IDResource.MISC_CASTLE:
             return Sprite_Castle;
         case IDResource.MISC_FLAG:
             return Sprite_Flag;
         case IDResource.MISC_GOAL_POLE:
             return Sprite_Goal_Pole;
         case IDResource.ICON_COIN:
             return Icon_Coin;
         case IDResource.LOAD:
             return BG_LoadGame;
         case IDResource.BULLET:
             return Sprite_Bullet;
         case IDResource.ENEMY_HIDE_KOOPA_OW:
             return Sprite_Hide_Koopa_OW;
         case IDResource.MISC_HARD_BRICK:
             return Sprite_Hard_Brick;
         case IDResource.MISC_BIG_MOUNTAIN:
             return Sprite_Big_Mountain;
         case IDResource.MISC_MEDIUM_MOUNTAIN:
             return Sprite_Medium_Mountain;
         case IDResource.MISC_BIG_GRASS:
             return Sprite_Big_Grass;
         case IDResource.MISC_MEDIUM_GRASS:
             return Sprite_Medium_Grass;
         case IDResource.MISC_SMALL_GRASS:
             return Sprite_Small_Grass;
         case IDResource.MISC_UP_PIPE:
             return Sprite_Up_Pipe;
         case IDResource.MISC_STOCK_PIPE:
             return Sprite_Stock_Pipe;
         case IDResource.MISC_GATE_PIPE:
             return Sprite_Gate_Pipe;
         case IDResource.MISC_SOFT_BRICK:
             return Sprite_Soft_Brick;
         case IDResource.MISC_PIECE_1:
             return Sprite_Piece_1;
         case IDResource.MISC_PIECE_2:
             return Sprite_Piece_2;
         case IDResource.GAME_OVER:
             return BG_GameOver;
         case IDResource.ENEMY_GOOMBA_OW:
             return Sprite_GoomBa_OW;
         case IDResource.ENEMY_KOOPA_OW:
             return Sprite_Koopa_OW;
         case IDResource.ITEM_1UP_MUSHROOM:
             return Sprite_1_Up_Mushroom;
         case IDResource.ITEM_FIRE_FLOWER:
             return Sprite_Fire_Flower;
         case IDResource.ITEM_SUPER_MUSHROOM:
             return Sprite_Super_Mushroom;
         case IDResource.ITEM_STARMAN:
             return Sprite_Starman;
         case IDResource.ITEM_COIN_NORMAL:
             return Sprite_Normal_Coin;
         case IDResource.ITEM_COIN_ACTIVATED:
             return Sprite_Activated_Coin;
         case IDResource.MISC_IRON_BRICK:
             return Sprite_Iron_Brick;
         case IDResource.MISC_QUESTION_BRICK:
             return Sprite_Question_Brick;
         case IDResource.MISC_BASE_BRICK:
             return Sprite_Base_Brick;
         case IDResource.SMALL_MARIO:
             return Sprite_Small_Mario;
         case IDResource.SUPER_MARIO:
             return Sprite_Super_Mario;
         case IDResource.FIRE_MARIO:
             return Sprite_Fire_Mario;
         #endregion
         #region State
         case IDResource.INTRO_1:
             return m_Intro1;
         case IDResource.INTRO_2:
             return m_Intro2;
         case IDResource.BLACK:
             return m_Black;
         case IDResource.MENU:
             return m_BGMenu;
         case IDResource.ABOUT_Btn:
             return Btn_About;
         case IDResource.ABOUT_Btn_Act:
             return Btn_About_Act;
         case IDResource.EXIT_Btn:
             return Btn_Exit;
         case IDResource.EXIT_Btn_Act:
             return Btn_Exit_Act;
         case IDResource.NEWGAME_Btn:
             return Btn_NewGame;
         case IDResource.NEWGAME_Btn_Act:
             return Btn_NewGame_Act;
         case IDResource.OPTION_Btn:
             return Btn_Option;
         case IDResource.OPTION_Btn_Act:
             return Btn_Option_Act;
         case IDResource.ICON:
             return Icon;
         case IDResource.OPTION:
             return m_BGOption;
         case IDResource.SOUND_Btn:
             return Btn_Sound;
         case IDResource.SOUND_Btn_Act:
             return Btn_Sound_Act;
         case IDResource.BGSOUND_Btn:
             return Btn_BGSound;
         case IDResource.BGOUND_Btn_Act:
             return Btn_BGSound_Act;
         case IDResource.RETURN_Btn:
             return Btn_Return;
         case IDResource.RETURN_Btn_Act:
             return Btn_Return_Act;
         case IDResource.ABOUTBG:
             return m_BGAbout;
         default:
             return null;
         #endregion
     }
 }
 public BtnExit(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
        public SoundEffect GetSoundEffect(IDResource _ID)
        {
            switch (_ID)
            {
            case IDResource.SFX_MARIO_HURT:
                return(sfx_mario_hurt);

            case IDResource.SFX_1_UP:
                return(sfx_1_up);

            case IDResource.SFX_BREAKBLOCK:
                return(sfx_breakblock);

            case IDResource.SFX_BUMP:
                return(sfx_bump);

            case IDResource.SFX_COIN:
                return(sfx_coin);

            case IDResource.SFX_FIREBALL:
                return(sfx_fireball);

            case IDResource.SFX_FIREWORK:
                return(sfx_firework);

            case IDResource.SFX_FLAGPOLE:
                return(sfx_flagpole);

            case IDResource.SFX_GAMEOVER:
                return(sfx_gameover);

            case IDResource.SFX_JUMP_SMALL:
                return(sfx_jump_small);

            case IDResource.SFX_JUMP_BIG:
                return(sfx_jump_big);

            case IDResource.SFX_KICK:
                return(sfx_kick);

            case IDResource.SFX_MARIO_DIE:
                return(sfx_mario_die);

            case IDResource.SFX_PAUSE:
                return(sfx_pause);

            case IDResource.SFX_PIPE:
                return(sfx_pipe);

            case IDResource.SFX_POWER_UP:
                return(sfx_power_up);

            case IDResource.SFX_ITEM_APPEAR:
                return(sfx_item_appear);

            case IDResource.SFX_STAGE_CLEAR:
                return(sfx_stage_clear);

            case IDResource.SFX_STOMP:
                return(sfx_stomp);

            case IDResource.SFX_VINE:
                return(sfx_vine);

            case IDResource.SFX_WARNING:
                return(sfx_warning);

            case IDResource.SFX_WORLD_CLEAR:
                return(sfx_world_clear);

            default:
                return(null);
            }
        }
Exemple #21
0
 public BtnOption(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
 public void CreateAnimation(IDResource _IDResource, int _FrameStart, int _FrameEnd, float _TimeAnimation)
 {
     m_IDResouce = _IDResource;
     m_FrameStart = _FrameStart;
     m_FrameEnd = _FrameEnd;
     m_CurFrame = _FrameStart;
     m_LocalTime = 0.0f;
     m_TimeAnimation = _TimeAnimation;
     m_NumLoop = 0;
 }
 public BtnReturnMenu(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
 public BtnOption(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
Exemple #25
0
 public BtnNewGame(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }
Exemple #26
0
 public BtnAbout(IDResource _ID, Vector2 _pos)
     : base(_ID, _pos)
 {
 }