// 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(); } } } }
void Awake() { player = GameObject.FindObjectOfType <Player>(); enemy = GetComponent <Enemy>(); projectileDragging = GameObject.FindObjectOfType <ProjectileDragging>(); goblinEyesSpriteRenderer = GetComponent <SpriteRenderer>(); }
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>(); }
void Start() { pDrag = gameObject.GetComponent <ProjectileDragging>(); /*Do Initialization here*/ }
void Awake() { lineRenderer = GetComponent <LineRenderer>(); player = GameObject.FindObjectOfType <Player>(); projectileDragging = GameObject.FindObjectOfType <ProjectileDragging>(); }
// Use this for initialization void Start() { playerDragScript = Player.GetComponent <ProjectileDragging>(); }