示例#1
0
    public void GetAtk(string atkName = null)
    {
        //print(" atkName " + atkName+"    "+isAtking);
        if (roleDate.isBeHiting)
        {
            return;
        }
        if (isDodgeing)
        {
            return;
        }
        if (DBBody.animation.lastAnimationName == DOWNONGROUND)
        {
            return;
        }
        if (!isAtk)
        {
            isAtk    = true;
            isAtking = true;
            isAtkYc  = true;
            yanchi   = 0;
            jisuqi   = 0;

            if (isInAiring)
            {
                atkZS = DataZS.jumpAtkZS;
            }
            else
            {
                atkZS = DataZS.atkZS;
            }

            if (atkName == null)
            {
                vOAtk.GetVO(atkZS[(int)atkNums]);
                DBBody.animation.GotoAndPlayByFrame(vOAtk.atkName, 0, 1);
            }
            else
            {
                vOAtk.GetVO(GetDateByName.GetInstance().GetDicSSByName(atkName, DataZS.GetInstance()));

                DBBody.animation.GotoAndPlayByFrame(vOAtk.atkName, 0, 1);
            }

            MoveVX(vOAtk.xF);
            if (newSpeed.y < 0)
            {
                newSpeed.y = 1;
                playerRigidbody2D.velocity = newSpeed;
                MoveVY(vOAtk.yF);
            }

            //获取XY方向的推力
            //print(DBBody.animation.animations);
        }
    }
示例#2
0
    VOAtk GetAtkVOByName(string _name, System.Object obj)
    {
        Dictionary <string, string> dic = GetDateByName.GetInstance().GetDicSSByName(_name, obj);

        atkvo = new VOAtk();
        atkvo.GetVO(dic);
        return(atkvo);
    }