Пример #1
0
        //添加英雄身体
        public void PushBody(int x, int y)
        {
            _BODY tmp = new _BODY();

            tmp.x = x;
            tmp.y = y;
            m_BodyList.LoadObj(m_BodyLen, tmp);
            m_BodyLen++;
        }
Пример #2
0
        //添加英雄身体
        public void PushBody()
        {
            _BODY tmp = new _BODY();

            tmp.x    = (m_x - m_w / 2) + m_w;
            tmp.y    = m_y;
            tmp.body = new CCustomImage(Properties.Resources.body, m_w, m_h);
            tmp.body.SetPos(tmp.x, tmp.y);
            m_BodyList.LoadObj(m_BodyLen, tmp);
            m_BodyLen++;
        }
Пример #3
0
        //修改身体y
        public void SetBodyY(int id, int y)
        {
            //安全检测
            if (id > m_BodyLen)
            {
                return;
            }
            _BODY tmp = new _BODY();

            tmp.y = y;
            tmp.x = GetBodyX(id);
            m_BodyList.SetObj(id, tmp);
        }
Пример #4
0
        //修改身体y
        private void SetBodyY(int id, double y)
        {
            //安全检测
            if (id > m_BodyLen)
            {
                return;
            }
            _BODY tmp = new _BODY();

            tmp.y    = y;
            tmp.x    = m_BodyList.GetObject(id).x;
            tmp.body = m_BodyList.GetObject(id).body;
            m_BodyList.SetObj(id, tmp);
        }