public PassiveSkill(SkillDescriptor Desc, BaseNpc Master, float SustainTime) : base(Desc, Master) { IsSustain_ = false; SustainTime_ = SustainTime; PassiveExecutor_ = Executor_ as PassiveExecutor; Master_ = Master; }
protected BaseSkill(SkillDescriptor Desc, BaseNpc Master) : base(Desc.Name) { this.Master = Master; this.SkillID = Desc.SkillID; this.Type = Desc.Type; this.Icon = Desc.Icon; this.CD = Desc.CD; this.Cost = Desc.Cost; this.Radius = Desc.Radius; this.Priority = Desc.Priority; this.Shape = Desc.Shape; this.Rule = Desc.Rule; this.Time = 0; this.IsCD = false; this.Executor_ = Desc.Executor; }
public static NpcSkill AddNpcSkill(SkillDescriptor Desc, BaseNpc Master) { if (Desc == null || Master == null) { return(null); } if (Desc.Type == SkillType.Passive) { LLogger.LWarning($"need not passive desc, current is {Desc.Type}"); return(null); } var Entity = new NpcSkill(Desc, Master); AddSkill(Entity); return(Entity); }
public static PassiveSkill AddPassiveSkill(SkillDescriptor Desc, BaseNpc Master, float SustainTime) { if (Desc == null || Master == null) { return(null); } if (Desc.Type != SkillType.Passive) { LLogger.LWarning($"need passive desc, current is {Desc.Type}"); return(null); } var Entity = new PassiveSkill(Desc, Master, SustainTime); AddSkill(Entity); Entity.Use(new SkillArgs(Entity)); return(Entity); }
public NpcSkill(SkillDescriptor Desc, BaseNpc Master) : base(Desc, Master) { }