Exemplo n.º 1
0
    public void BeginRotate(string param)
    {
        PlayerState state = _owner.m_StateMachine.m_curState;

        Dictionary <string, string> dictParam = AnimConfigItem.ParseParam(param);

        if (dictParam["Type"] == "direct")
        {
            state.m_rotateType = RotateType.eDirect;
        }
        else if (dictParam["Type"] == "smooth")
        {
            state.m_rotateType = RotateType.eSmooth;
        }

        if (dictParam["To"] == "basket")
        {
            state.m_rotateTo = RotateTo.eBasket;
        }
        else if (dictParam["To"] == "defenser")
        {
            state.m_rotateTo = RotateTo.eDefenseTarget;
        }
        else if (dictParam["To"] == "ball")
        {
            state.m_rotateTo = RotateTo.eBall;
        }

        string strSpeed;

        if (dictParam.TryGetValue("Speed", out strSpeed))
        {
            state.m_turningSpeed = IM.Number.Parse(strSpeed);
        }
    }
Exemplo n.º 2
0
    public void BeginMove(string param)
    {
        PlayerState state = _owner.m_StateMachine.m_curState;

        Dictionary <string, string> dictParam = AnimConfigItem.ParseParam(param);
        string strSpeedValue, strAccelValue;

        if (dictParam.TryGetValue("Speed", out strSpeedValue))
        {
            state.m_speed = AnimConfigItem.ParseVector3(strSpeedValue);
        }
        if (dictParam.TryGetValue("Accel", out strAccelValue))
        {
            state.m_accelerate = AnimConfigItem.ParseVector3(strAccelValue);
        }
    }