void Start() { _anim = gameObject.GetComponent<Animation>(); _hoverhighlight = gameObject.GetComponent<objectHoverHighlight>(); // _particles = gameObject.GetComponentInChildren<ParticleSystem>(); // _objectget = gameObject.GetComponentInChildren<chestObjectGet>(); petMov = GameObject.Find("pet").GetComponent<petMovement>(); petLook = GameObject.Find("pet").GetComponent<petLookAt>(); petAnim = GameObject.Find("pet").GetComponent<petAnimation>(); }
void Start() { _objectSpawn = gameObject.transform.Find("mesh_active_chest_bottom/objectSpawn"); _camCutscene = cam.GetComponent<cutsceneMoveCamera>(); cameraLocation = gameObject.transform.Find ("cameraLocation"); fairyMov = GameObject.Find("pet").GetComponent<petMovement>(); fairyLook = GameObject.Find("pet").GetComponent<petLookAt>(); //get original position and new position for Vector3 Lerp _objectSpawnOrigPos = _objectSpawn.position; _objectspawnNewPos = _objectSpawnOrigPos + new Vector3(0, 4, 0); }