コード例 #1
0
 // Use this for initialization
 void Start()
 {
     sampler = new JointSampler ();
     user_id = PlayerPrefs.GetInt ("ActiveUser", 1);
     // Load ZigFu game object.  This game object has 4 Zig related script Components.  Use this object
     // to instances of these script's classes in order to access event information :)
     zigfu = GameObject.Find ("ZigFu");
     zig_control = zigfu.GetComponent <Zig>();
     skeleton = GetComponent <ZigSkeleton>();
     db_control = new dbAccess ();
     reader = new GloveReader ();
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        // Instantiate objects
        // Load ZigFu game object.  This game object has 4 Zig related script Components.  Use this object
        // to instances of these script's classes in order to access event information :)
        zigfu = GameObject.Find ("ZigFu");
        sampler = new JointSampler ();
        zig_control = zigfu.GetComponent <Zig>();
        // This script is attached to Carl so GetComponent can be called directly
        skeleton = GetComponent <ZigSkeleton>();

        l_shoulder_angles = new Vector3();
        r_shoulder_angles = new Vector3();

        db_control = new dbAccess ();
        user_id = PlayerPrefs.GetInt ("ActiveUser", 1);
        // DEBUG: Access some application run-time data.  Compare this output to where the scene was loaded from
        //Debug.Log ("isEditor: " + Application.isEditor + "\nisLoadinglevel: " + Application.isLoadingLevel + "\nLoadedLevelName: " + Application.loadedLevelName +
        //           "\nplatform: " + Application.platform + "\nGenuine: " + Application.genuine + "\ngenuineCheckAvailable: " + Application.genuineCheckAvailable +
        //           "\nbackgroundLoadingPriority: " + Application.backgroundLoadingPriority);

        // Calculate max and min y-axis rotations to allow abduction measurements
        max_y_rotation = degrees_freedom;
        min_y_rotation = -degrees_freedom;

        // Get zig joint identification numbers for each shoulder
        R_shoulder_id = ZigJointId.RightShoulder;
        L_shoulder_id = ZigJointId.LeftShoulder;

        currentExercise = 0;
        exercise = "Press Next To Start";
        style = new GUIStyle();
        instructions = " ";
        time_hold = 0;
        inPosition = true;
    }