// Start is called before the first frame update void Start() { oniSc = GameObject.FindGameObjectWithTag("Oni").GetComponent <O_OniScript>(); playerSc = GameObject.FindGameObjectWithTag("GameController").GetComponent <O_PlayerScript>(); // あとでTagをかえる↓ log_text = GameObject.FindGameObjectWithTag("Player").GetComponent <Text>(); oniHP_slider = GameObject.FindGameObjectWithTag("Cloud1").GetComponent <Slider>(); oniHP_text = GameObject.FindGameObjectWithTag("Cloud2").GetComponent <Text>(); minValue = 0; oniHP_slider.value = oniSc.OniHP; log_text.text = ""; }
// Start is called before the first frame update void Start() { // スクリプトを取得 oniSc = GameObject.FindGameObjectWithTag("Oni").GetComponent <O_OniScript>(); gameSc = gameObject.GetComponentInChildren <O_GameControllerScript>(); // ボタンを取得 dog_button = GameObject.FindGameObjectWithTag("DogButton").GetComponent <Button>(); monkey_button = GameObject.FindGameObjectWithTag("MonkeyButton").GetComponent <Button>(); pheasant_button = GameObject.FindGameObjectWithTag("PheasantButton").GetComponent <Button>(); // Animatorを取得 dog_animator = GameObject.FindGameObjectWithTag("Dog").GetComponent <Animator>(); monkey_animator = GameObject.FindGameObjectWithTag("Monkey").GetComponent <Animator>(); pheasant_animator = GameObject.FindGameObjectWithTag("Pheasant").GetComponent <Animator>(); audioSource = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <AudioSource>(); dog_button.interactable = false; monkey_button.interactable = false; pheasant_button.interactable = false; }