コード例 #1
0
ファイル: MessageBox.cs プロジェクト: emhean/Shitemon
        public void Render_Menu(SpriteBatch spriteBatch, Mon player)
        {
            if (MenuCurrent == MessageboxMenus.Main)
            {
                for (int i = 0; i < 4; ++i)
                {
                    menu_main[i].Render(spriteBatch, font);
                }

                spriteBatch.Draw(tex_cursor, menu_main[menu_index].pos - Vector2.UnitX * 10, Color.White);
            }
            else if (MenuCurrent == MessageboxMenus.Moves)
            {
                var moves = player.GetMoves();

                for (int i = 0; i < moves.Length; ++i)
                {
                    if (!string.IsNullOrEmpty(moves[i].name))
                    {
                        menu_moves[i].Render(spriteBatch, font, moves[i].name);
                    }
                }

                spriteBatch.Draw(tex_cursor, menu_moves[menu_index].pos - Vector2.UnitX * 10, Color.White);
            }
            else if (MenuCurrent == MessageboxMenus.Text)  // custom text, no menus
            {
                if (textQueue.Count > 0)
                {
                    spriteBatch.DrawString(font, textQueue[0].text, pos, Color.Black);

                    textQueue[0].frames -= 1;
                    if (textQueue[0].frames <= 0)
                    {
                        textQueue.RemoveAt(0);
                    }
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// New instance for death animation.
 /// </summary>
 public BattleAnimation(BattleSystem bs, Mon mon, float anim_duration)
 {
     this.mon           = mon;
     this.anim_duration = anim_duration;
 }
コード例 #3
0
        public int total_damage; // damage before hp reduction

        /// <summary>
        /// New instance for healthbar animation.
        /// </summary>
        public BattleAnimation(BattleSystem bs, Mon mon, int total_damage)
        {
            this.mon           = mon;
            this.total_damage  = total_damage;
            this.anim_duration = 4f;
        }
コード例 #4
0
ファイル: BattleSystem.cs プロジェクト: emhean/Shitemon
 public void Initialize(Mon player, Mon enemy)
 {
     this.player = player;
     this.enemy  = enemy;
 }
コード例 #5
0
ファイル: UI.cs プロジェクト: emhean/Shitemon
 public void Initialize(Mon player, Mon enemy)
 {
 }