示例#1
0
 public abstract void BltNatural(CDIB32 dib, int m_xnVX, int y, Rectangle rc);
示例#2
0
 public abstract void BltFast(CDIB32 dib, int x, int y);
示例#3
0
 public abstract void BltFast(CDIB32 dib, int x, int y, Rectangle rc);
示例#4
0
        public override void OnDraw(CDIB32 lp)
        {
            if (!IsValid())
            {
                return;
            }
            if (m_pParent.ItemCompleted())
            {
                m_funya.Smile();
            }
            int CX = 0, CY = (int)m_funya.Direction;

            SetViewPos(-16, -15);
            if (m_funya.State == f3MainCharaState.STANDING)
            {   // 立ってるとき
            }
            else if (m_funya.State == f3MainCharaState.RUNNING)
            {
                CX = m_funya.PoseCounter < 6 ? m_funya.PoseCounter + 2 : 14 - m_funya.PoseCounter;
            }
            else if (m_funya.State == f3MainCharaState.WALKING)
            {
                CX = 11;
            }
            else if (m_funya.State == f3MainCharaState.CHARGING)
            {
                CX =
                    (m_funya.ChargePower >= m_funya.JumpFunc[0].Power ? 24 :
                     (m_funya.ChargePower >= m_funya.JumpFunc[1].Power ? 11 :
                      (m_funya.ChargePower >= m_funya.JumpFunc[2].Power ? 25 :
                       (m_funya.ChargePower >= m_funya.JumpFunc[3].Power ? 12 :
                        12))));
            }
            else if (m_funya.State == f3MainCharaState.JUMPING)
            {
                CX = ((m_funya.DY >= 0) ? 10 : 9);
            }
            else if (m_funya.State == f3MainCharaState.BREATHEIN)
            {
                if (m_funya.ChargePower < 40.0f)
                {
                    CX = 15;
                }
                else if (m_funya.ChargePower < 120.0f)
                {
                    CX = 16;
                }
                else
                {
                    CX = 17;
                }
                if (!m_funya.HitBottom)
                {
                    CX += 12;
                }
            }
            else if (m_funya.State == f3MainCharaState.BREATHEOUT)
            {
                CX = 14;
                if (!m_funya.HitBottom)
                {
                    CX += 12;
                }
            }
            else if (m_funya.State == f3MainCharaState.TIRED)
            {
                CX = ((m_funya.PoseCounter + 1) % 40 < 20) ? 21 : 22;
            }
            else if (m_funya.State == f3MainCharaState.DAMAGED)
            {
                CX = 13;
            }
            else if (m_funya.State == f3MainCharaState.FROZEN)
            {
                CX = 23;
            }
            else if (m_funya.State == f3MainCharaState.DEAD)
            {
                CX = 13; CY = 0;
            }
            else if (m_funya.State == f3MainCharaState.SMILING)
            {
                CX = 18; CY = 0;
            }
            else if (m_funya.State == f3MainCharaState.SLEEPING)
            {
                CX = 19 + (m_funya.PoseCounter >= 20 ? 1 : 0);
                if (m_funya.Power < -1.0f / 4096.0f)
                {
                    CX += 2;
                }
                CY = 0;
            }
            else if (m_funya.State == f3MainCharaState.BLINKING)
            {
                CX = 1;
            }
            var rc = new Rectangle(CX * 32, CY * 32, 32, 32);

            lp.BltNatural(m_Graphic, m_nVX, m_nVY, rc);
        }