Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        pDrag = gameObject.GetComponent <ProjectileDragging> ();
        //sm = PXCMSession.CreateInstance();
        /* Initialize a PXCMSenseManager instance */
        sm = PXCMSenseManager.CreateInstance();
        if (sm != null)
        {
            /* Enable hand tracking and configure the hand module */
            pxcmStatus sts = sm.EnableHand();
            if (sts == pxcmStatus.PXCM_STATUS_NO_ERROR)
            {
                /* Hand module interface instance */
                hand = sm.QueryHand();
                /* Hand data interface instance */
                hand_data = hand.CreateOutput();

                // Create hand configuration instance and configure
                hcfg = hand.CreateActiveConfiguration();
                hcfg.EnableAllAlerts();
                hcfg.SubscribeAlert(OnFiredAlert);
                hcfg.EnableNormalizedJoints(true);
                hcfg.ApplyChanges();
                hcfg.Dispose();

                /* Initialize the execution pipeline */
                if (sm.Init() != pxcmStatus.PXCM_STATUS_NO_ERROR)
                {
                    OnDisable();
                }
            }
        }
    }
Esempio n. 2
0
 void Awake()
 {
     player                   = GameObject.FindObjectOfType <Player>();
     enemy                    = GetComponent <Enemy>();
     projectileDragging       = GameObject.FindObjectOfType <ProjectileDragging>();
     goblinEyesSpriteRenderer = GetComponent <SpriteRenderer>();
 }
Esempio n. 3
0
    void Awake()
    {
        projectileDragging = GameObject.FindObjectOfType <ProjectileDragging>();

        playerEyes = GameObject.FindObjectsOfType <PlayerEyes>();
        //playerEyes = GetComponentsInChildren<PlayerEyes>();
        playerEyesGO = GameObject.FindObjectOfType <PlayerEyes>();
        eyesRenderer = GetComponentInChildren <SpriteRenderer>();

        playerrb       = GetComponent <Rigidbody2D>();
        playerCollider = GetComponent <Collider2D>();
        ccol2d         = GetComponent <CircleCollider2D>();

        trailRenderer  = GetComponent <TrailRenderer>();
        spriteRenderer = GetComponent <SpriteRenderer>();

        //Sound Effects
        source = GetComponent <AudioSource>();
    }
Esempio n. 4
0
    void Start()
    {
        pDrag = gameObject.GetComponent <ProjectileDragging>();

        /*Do Initialization here*/
    }
Esempio n. 5
0
 void Awake()
 {
     lineRenderer       = GetComponent <LineRenderer>();
     player             = GameObject.FindObjectOfType <Player>();
     projectileDragging = GameObject.FindObjectOfType <ProjectileDragging>();
 }
Esempio n. 6
0
 // Use this for initialization
 void Start()
 {
     playerDragScript = Player.GetComponent <ProjectileDragging>();
 }