// Use this for initialization void Start() { jr = GameObject.Find("Player").GetComponentInChildren <swordHit> (); //Memasukkan class gerak ke dalam pl dan mencari nama object yang ingin diambil //Soal //if (unansweredQuestions == null || unansweredQuestions.Count == 0){ //tempQ = GameObject.FindGameObjectsWithTag("Soal"); unansweredQuestions = questions.ToList <Question>(); //} SetCurrentQuestion(); //Debug.Log (currentQuestion.soal + " adalah " + currentQuestion.jawaban); //Animator //anim3 = GameObject.FindWithTag("Player").GetComponent<Animator>(); }
// Use this for initialization void Start() { //Animasi anim = GetComponent <Animator>(); Enemy = GameObject.FindGameObjectWithTag("Enemy"); Player = GameObject.FindGameObjectWithTag("Player"); KomponenGerak = GameObject.Find("Player").GetComponent <gerak>(); //Rest (); //------------------Enemy Move---------------------------------------------------------------- myTrans = this.transform; myBody = this.GetComponent <Rigidbody2D>(); SpriteRenderer mySprite = this.GetComponent <SpriteRenderer>(); myWidth = mySprite.bounds.extents.x; myHeight = mySprite.bounds.extents.y; //------------------End Enemy Move------------------------------------------------------------------ theSwordHit = GameObject.Find("pedang").GetComponentInChildren <swordHit>(); }