public void init(Observe_Choice ricipient, Judge judge) { this.ricipient = ricipient; this.judge = judge; this.gameObject.GetComponent <Image>().sprite = judge.image; transform.GetChild(0).GetComponent <Text>().text = "魔力 " + judge.pass_force; }
public create_button(Observe_Choice obs, int interval, Judge[] list) { int i; Panel = UnityEngine.Object.Instantiate((GameObject)Resources.Load("enhpanel"), new Vector2(-250, 0), Quaternion.identity); obj.Add(UnityEngine.Object.Instantiate((GameObject)Resources.Load("Button_C"), new Vector2(-530, 180), Quaternion.identity)); obj.Add(UnityEngine.Object.Instantiate((GameObject)Resources.Load("Button_C"), new Vector2(-240, 180), Quaternion.identity)); obj.Add(UnityEngine.Object.Instantiate((GameObject)Resources.Load("Button_C"), new Vector2(30, 180), Quaternion.identity)); obj.Add(UnityEngine.Object.Instantiate((GameObject)Resources.Load("Button_C"), new Vector2(-370, -70), Quaternion.identity)); obj.Add(UnityEngine.Object.Instantiate((GameObject)Resources.Load("Button_C"), new Vector2(-90, -70), Quaternion.identity)); for (i = 0; i < 5; i++) { obj[i].GetComponent <Button_Choice>().init(obs, list[i]); } }