// Use this for initialization void Start() { GameObject _colliderStateManager = GameObject.Find("ColliderStateManager"); GameObject _handController = GameObject.Find("VibrationEffect"); _invisibleObjColliderState = _colliderStateManager.GetComponent <InvisibleObjColliderState>(); _strikeVibration = _handController.GetComponent <StrikeVibration>(); }
// Use this for initialization void Start() { //複数のオーディオソースを読み込む AudioSource[] audioSources = GetComponents <AudioSource>(); //使用するオーディオソースの設定 _strikeSound = audioSources[_soundSourceNumber]; GameObject myColliderStateObj = GameObject.Find("ColliderStateManager"); _myColliderState = myColliderStateObj.GetComponent <InvisibleObjColliderState>(); }