void Start() { if (manager == null) //Init Ref GameObject Manager { manager = GameObject.Find("GameManager").gameObject; } soalManager = manager.GetComponent <mng_soalGenerator> (); statManager = manager.GetComponent <mng_playerStat> (); carriedAnswer = soalManager.generateJawaban(); int carriedAnswer1 = carriedAnswer / 10; int carriedAnswer2 = carriedAnswer - (carriedAnswer1 * 10); this.gameObject.transform.FindChild("obj_CarrierAngka1").GetComponent <SpriteRenderer> ().sprite = arr_angka [carriedAnswer1]; this.gameObject.transform.FindChild("obj_CarrierAngka2").GetComponent <SpriteRenderer>().sprite = arr_angka [carriedAnswer2]; }
void Start() { if (manager == null) //Init Ref GameObject Manager { manager = GameObject.Find("GameManager").gameObject; } spawnManager = manager.transform.Find("Spawner").GetComponent <bhv_spawner> (); soalManager = manager.GetComponent <mng_soalGenerator> (); statManager = manager.GetComponent <mng_playerStat> (); statManager.enableUInyawaBoss(true); statManager.refreshUInyawaBoss(nyawaBoss); originalPos = this.transform.position; RegenJawaban(); StartCoroutine(IBehaviorBoss()); StartCoroutine(IBehaviorBoss2()); StartCoroutine(IBehaviorBoss3()); }