void Start() { GameMaster.CurrentPlayerHealthUpdate(GameMaster.CurrentPlayerHealth()); userEmotions = GetComponent <ImageResultsParser>(); cam = Camera.main; pointer = Instantiate(point, transform); halfHeight = cam.orthographicSize; //half of the height of the camera halfWidth = halfHeight * cam.aspect; //half of the width if (biofeedback) { //gazeUIAni = GameObject.FindWithTag("GazeUI").GetComponent<Animator>(); //get the animator of the gaze radius ui sprite gazeUIAni = GameObject.Find("gazerad_0_bf").GetComponent <Animator>(); } else { gazeUIAni = GameObject.Find("gazerad_0_ctrl").GetComponent <Animator>(); } // is always null? //Physics2D.IgnoreCollision(GameObject.FindGameObjectWithTag("collectible").GetComponent<Collider2D>(), GetComponent<Collider2D>()); //Physics2D.IgnoreCollision(GameObject.FindGameObjectWithTag("collectible_ground").GetComponent<Collider2D>(), GetComponent<Collider2D>()); pointerAni = pointer.GetComponent <Animator>(); GameMaster.PlayerIsInvulnerableCheck(false); GameMaster.PlayerIsKnockedBackCheck(false); GameMaster.CheckSwingingSword(false); //need to set respawning to false when done respawning StartCoroutine(doneSpawning()); usingPowerup = false; tempSpeed = maxSpeed; tempJumpSpeed = jumpTakeOffSpeed; gaze = transform.position; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Sailor").transform; userEmotions = player.GetComponent <ImageResultsParser> (); uvOffset = Vector2.zero; faceMaterial = faceRenderer.materials[1]; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("MyCharacter").transform; userEmotions = player.GetComponent <ImageResultsParser> (); animator = gameObject.GetComponent <Animator>(); }