// 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() { gameController = GameObject.Find("IIncubate").GetComponent <GameController>(); eggPhysicalAI = GetComponent <EggPhysicalAI>(); eggMovement = GetComponent <EggMovement>(); shaderHandler = GetComponent <ShaderHandler>(); }
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() { eggParameter = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggParameter>(); eggMovement = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggMovement>(); eggPhysicalAI = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggPhysicalAI>(); Egg = GameObject.Find("Egg"); rg = Egg.GetComponent <Rigidbody>(); //StartCoroutine(ReproduceEgg()); }
// Use this for initialization void Start() { data = GameObject.Find("Data"); ds = data.GetComponent <DataScript> (); mainCam = Camera.main; cam = Camera.main.GetComponent <Camera>(); cam.orthographicSize = 15.0f; egg = GameObject.Find("egg"); eggMovement = egg.GetComponent <EggMovement>(); }
// Use this for initialization void Awake() { eggMovement = GetComponent <EggMovement>(); eggParameter = GetComponent <EggParameter>(); 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); }
// Use this for initialization void Start() { wrongSound = GameObject.Find("wrongSound"); data = GameObject.Find("Data"); ds = data.GetComponent <DataScript> (); egg = GameObject.Find("egg"); eggMovement = egg.GetComponent <EggMovement>(); //assign random value to the equation Q1 = Random.Range(1, 6); Q2 = Random.Range(1, 5); Ans = Q1 + Q2; result = transform.Find("Result").GetComponent <Text> (); Ans1 = transform.Find("Ans1").GetComponent <Image> (); Ans2 = transform.Find("Ans2").GetComponent <Image> (); Ans3 = transform.Find("Ans3").GetComponent <Image> (); Ans4 = transform.Find("Ans4").GetComponent <Image> (); Qnum1 = transform.Find("Qnum1").GetComponent <Image> (); Qnum2 = transform.Find("Qnum2").GetComponent <Image> (); Qans = transform.Find("Ans").GetComponent <Image> (); //randomly pick the currect answer button ansChoice = Random.Range(1, 5); //randomly pick the wrong answer, if they equal to correct //answer, add 1 to it rngAns1 = Random.Range(1, 10); rngAns2 = Random.Range(1, 10); rngAns3 = Random.Range(1, 10); if (rngAns1 == Ans) { rngAns1 += 1; } if (rngAns2 == Ans) { rngAns2 += 1; } if (rngAns3 == Ans) { rngAns3 += 1; } }
void Awake() { exHandler = GameObject.Find("IIncubate").transform.Find("EggExpression").gameObject.GetComponent <expressionHandler>(); faceHandler = GetComponent <FaceExpressionHandler>(); gameController = transform.parent.parent.gameObject.GetComponent <GameController>(); shaderHandler = GetComponent <ShaderHandler>(); tf = transform.parent; rg = transform.parent.gameObject.GetComponent <Rigidbody>(); initialPosition = tf.position; initialRotation = tf.eulerAngles; eggParameter = GetComponent <EggParameter>(); eggPhysicalAI = GetComponent <EggPhysicalAI>(); eggMovement = GetComponent <EggMovement>(); }
// Use this for initialization void Awake() { eggParameter = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggParameter>(); eggMovement = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggMovement>(); EggPhysicalAI = GameObject.Find("Egg").transform.Find("clean").gameObject.GetComponent <EggPhysicalAI>(); }
void Awake() { gameController = GameObject.Find("IIncubate").GetComponent <GameController>(); eggMovement = GetComponent <EggMovement>(); }
// Use this for initialization void Start() { egg = GameObject.Find("egg"); eggmovement = egg.GetComponent <EggMovement> (); }