public KSPTSDemoObject(int val) { this.val = val; rand = new System.Random(val * System.DateTime.Now.Millisecond); KSPTSAPI.RegisterNewThreadTask(KSPTSThreadingGroup.IN_LOOP_UPDATE, PreFunction, ThreadedTask, PostFunction); }
public bool UnRegister() { return(KSPTSAPI.TryUnregisterThreadTask(KSPTSThreadingGroup.IN_LOOP_UPDATE, ThreadedTask)); }