// TODO 最終的にはStartではなく、ステージアクティブになったら以下の処理を行う void OnEnable() { playerController = FindObjectOfType <PlayerController>(); player = GameObject.Find("Player"); stageDirector = FindObjectOfType <StageDirector>(); bgmDirector = FindObjectOfType <BGMDirector>(); seDirector = FindObjectOfType <SEDirector>(); enemyAnimator = GetComponent <Animator>(); switch (enemyPattern) { case 1: switchCoroutine = SwitchDirectionPattern1(); StartCoroutine(switchCoroutine); break; case 2: switchCoroutine = SwitchDirectionPattern2(); StartCoroutine(switchCoroutine); break; case 3: switchCoroutine = SwitchDirectionPattern3(); StartCoroutine(switchCoroutine); break; } }
void Start() { playerRigid = GetComponent <Rigidbody2D>(); playerRenderer = GetComponent <Renderer>(); playerAura = transform.GetChild(0).gameObject; auraRenderer = playerAura.GetComponent <Renderer>(); itemDirector = FindObjectOfType <ItemDirector>(); stageDirector = FindObjectOfType <StageDirector>(); bgmDirector = FindObjectOfType <BGMDirector>(); seDirector = FindObjectOfType <SEDirector>(); cameraController = FindObjectOfType <CameraController>(); originColor = playerRenderer.material.color; originscale = transform.localScale.x; }
private void Start() { bgmDirector = FindObjectOfType <BGMDirector>(); bgmDirector.PlayStageMusic(); }
private void Start() { bgmDirector = FindObjectOfType <BGMDirector>(); stageState = STAGESTATE.INSTAGE; }
private void Awake() { bgmDirector = FindObjectOfType <BGMDirector>(); }