示例#1
0
 public void Close()
 {
     if (actx != IntPtr.Zero)
     {
         Cfunctions_api.survive_simple_close(actx);
     }
     actx = IntPtr.Zero;
 }
示例#2
0
        public void Start()
        {
            if (threadStarted)
            {
                return;
            }

            threadStarted = true;
            Cfunctions_api.survive_simple_start_thread(actx);
        }
示例#3
0
        internal void Init(string[] args, SurviveSimpleLogFn logFunc = null, bool dontStartYet = false)
        {
            if (logFunc == null)
            {
                logFunc = InfoEvent;
            }
            actx = Cfunctions_api.survive_simple_init_with_logger(args.Length, args, logFunc);

            if (actx == IntPtr.Zero)
            {
                throw new Exception("There was a problem initializing the lib!");
            }

            if (!dontStartYet)
            {
                Start();
            }
        }
示例#4
0
 public bool WaitForUpdate()
 {
     return(Cfunctions_api.survive_simple_wait_for_update(actx));
 }
示例#5
0
 public bool IsRunning()
 {
     return(Cfunctions_api.survive_simple_is_running(actx));
 }
示例#6
0
 public SurviveAPIOObject GetNextUpdated()
 {
     return(SurviveAPIOObject.Create(Cfunctions_api.survive_simple_get_next_updated(actx)));
 }
示例#7
0
 public SurviveAPIOObject GetNextObject(SurviveAPIOObject obj)
 {
     return(SurviveAPIOObject.Create(Cfunctions_api.survive_simple_get_next_object(actx, obj.Ptr())));
 }
示例#8
0
 public SurviveAPIOObject GetFirstObject()
 {
     return(SurviveAPIOObject.Create(Cfunctions_api.survive_simple_get_first_object(actx)));
 }