// Start is called before the first frame update void Start() { playerSc = GameObject.FindGameObjectWithTag("GameController").GetComponent <O_PlayerScript>(); oni_animator = GetComponent <Animator>(); audioSource = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <AudioSource>(); StartCoroutine("TurnController"); }
// 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 = ""; }