// Use this for initialization void Awake() { //IEnumerator CoolDownVar = ICoolDown(); JumpVar = Jump(); RollVar = Roll(); ShakeVar = Shake(); LookAroundVar = LookAround(); shaderHandler = GetComponent <ShaderHandler>(); mat = GetComponent <MeshRenderer>().material; audioSource = GetComponent <AudioSource>(); eggMovement = GetComponent <EggMovement>(); eggParameter = GetComponent <EggParameter>(); exHandler = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>(); faceHandler = GetComponent <FaceExpressionHandler>(); initPos = transform.localPosition; initRot = transform.eulerAngles; pos = transform.position; rg = transform.parent.gameObject.GetComponent <Rigidbody>(); tf = transform.parent; //Standard PID PIDx = new PID(0.4f, 0, 2f); PIDy = new PID(0.4f, 0, 2f); PIDz = new PID(0.4f, 0, 2f); }
void Awake() { egg = GameObject.Find("Egg"); eggParameter = egg.transform.Find("clean").gameObject.GetComponent <EggParameter>(); eggMovement = egg.transform.Find("clean").gameObject.GetComponent <EggMovement>(); eggPhysicalAI = egg.transform.Find("clean").gameObject.GetComponent <EggPhysicalAI>(); exHandler = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>(); faceHandler = egg.transform.Find("clean").GetComponent <FaceExpressionHandler>(); }
void Awake() { exHandler = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>(); faceHandler = GetComponent <FaceExpressionHandler>(); gameController = transform.parent.parent.gameObject.GetComponent <GameController>(); tf = transform.parent; rg = transform.parent.gameObject.GetComponent <Rigidbody>(); initialPosition = tf.position; initialRotation = tf.eulerAngles; eggParameter = GetComponent <EggParameter>(); eggPhysicalAI = GetComponent <EggPhysicalAI>(); }