示例#1
0
    static int get_moduleFight(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            MyFrameWork.FightDataManager obj = (MyFrameWork.FightDataManager)o;
            FightNew.ModuleFight         ret = obj.moduleFight;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index moduleFight on a nil value" : e.Message));
        }
    }
示例#2
0
        public void TriggerSkill(int skillId)
        {
            SkillModule skill = SkillModuleMgr.Instance.GetSkill(skillId);

            if (skill == null)
            {
                DebugUtil.Error("未找到skill,id = " + skillId);
            }

            BossData bossData = ModuleFight.CurrentMyBoss;

            //暂时屏蔽
            if (skill.NeedEnergy > bossData.Energy)
            {
                ShowMsg(FightDefine.E_NoteMsgType.NotEnoughEnergy);
                return;
            }

            ModuleFight.UseEnergy(skill.NeedEnergy);
            ModuleFight.SkillAttackBoss(skill);
        }