예제 #1
0
    /// <summary>
    /// 设置符卡的基本属性
    /// <para>name 符卡名称</para>
    /// <para>duration 单位:秒,符卡持续时间</para>
    /// <para>conditon 符卡的条件</para>
    /// <para> finishFunc 可以为nil,符卡结束时候的函数</para>
    /// </summary>
    /// <param name="luaState"></param>
    /// <returns></returns>
    public static int SetSpellCardProperties(ILuaState luaState)
    {
        SpellCard sc          = STGStageManager.GetInstance().GetSpellCard();
        string    scName      = luaState.ToString(-luaState.GetTop());
        float     duration    = (float)luaState.ToNumber(-3);
        int       condition   = luaState.ToInteger(-2);
        bool      isSpellCard = luaState.ToBoolean(-1);

        sc.SetProperties(scName, duration, (eSpellCardCondition)condition, isSpellCard);
        return(0);
    }