/// <summary> /// Loads the javascript file to be run, but does not start it. /// If the vpath starts with "~", then the filename is relative /// to the plugins folder. /// </summary> public JavascriptImplant(string vpath, string oscFormat, RangeMap activeArea) : base(activeArea) { // override the implant ID with something more useful #warning This ImplantID will not be unique if the same implant is loaded twice!!! ImplantID = vpath; Active = true; ImplantType = JavascriptImplantType.Load(vpath); ImplantInstance = ImplantType.CreateInstance(this); ImplantInstance.osc.Format = oscFormat; }
public Implant(JSONObject json) : base(json.GetField("name").str, json.GetField("basevalue").f, (int)json.GetField("level").f, (int)json.GetField("levelcap").f, (int)json.GetField("tier").f) { type = parseImplantType(json.GetField("type").str); setGrowth(json.GetField("growth").f); List <JSONObject> stats = json.GetField("stats").list; setBase(stats[0].f, stats[1].f, stats[2].f, stats[3].f, stats[4].f); List <JSONObject> dist = json.GetField("distribution").list; setDistribution(dist); }
public Implant(string name, float baseValue, int level, int levelCap, int tier, ImplantType type) : base(name, baseValue, level, levelCap, tier) { this.type = type; }