예제 #1
0
    // 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;
        }
    }
예제 #2
0
    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;
    }
예제 #3
0
 private void Start()
 {
     bgmDirector = FindObjectOfType <BGMDirector>();
     bgmDirector.PlayStageMusic();
 }
예제 #4
0
    private void Start()
    {
        bgmDirector = FindObjectOfType <BGMDirector>();

        stageState = STAGESTATE.INSTAGE;
    }
예제 #5
0
 private void Awake()
 {
     bgmDirector = FindObjectOfType <BGMDirector>();
 }