// 初始化技能信息aa public virtual void SetInfo(sdGameSkill info, sdGameActor kGameActor) { skillInfo = info; if (skillInfo != null) { cooldown = (int)skillProperty["dwCooldown"]; bUnLimitedAction = ((int)skillProperty["UnLimited"]) != 0; } if (isPassive) { if (skillProperty != null) { string level = skillProperty["byLevel"] as string; if (level != null) { skillLevel = int.Parse(level); } string str = skillProperty["Buffid"] as string; if (str != null) { int id = int.Parse(str); if (id != 0) { //调用AddBuff会崩溃 暂时注释掉... kGameActor.AddBuff(id, 0, kGameActor); } } } } }
// Update is called once per frame protected override void WhenEnterTrigger(GameObject obj, int[] param) { if (EnterBuffID == 0) { return; } sdGameActor actor = obj.GetComponent <sdGameActor>(); if (actor == null) { return; } actor.AddBuff(EnterBuffID, 0, actor); if (OnceLife) { live = false; } }