Esempio n. 1
0
 void OnApplicationQuit()
 {
     if (survive != null)
     {
         survive.Close();
         survive.Dispose();
         survive = null;
     }
 }
Esempio n. 2
0
        static void Main()
        {
            string[] args = System.Environment.GetCommandLineArgs();
            var      api  = new SurviveAPI(args);

            while (api.WaitForUpdate())
            {
                SurviveAPIOObject obj;
                while ((obj = api.GetNextUpdated()) != null)
                {
                    Console.WriteLine(obj.Name + "(" + obj.SerialNumber + ") : " + obj.LatestPose);
                }
            }

            api.Close();
        }
Esempio n. 3
0
    // Start is called before the first frame update
    void Start()
    {
        survive_objects = new Dictionary <string, GameObject>();
        string[] args    = System.Environment.GetCommandLineArgs();
        var      argList = new List <string>(args);
        var      idx     = argList.LastIndexOf("--");

        if (idx < 0)
        {
            argList.RemoveRange(1, argList.Count - 1);
        }
        else
        {
            argList.RemoveRange(1, idx);
        }

        argList.Add("--v");
        argList.Add("10");

        survive         = new SurviveAPI(argList.ToArray(), logFunc: InfoFn);
        prototypeObject = gameObject.transform.Find("PrototypeObject")?.gameObject;
        prototypeObject.SetActive(false);
    }