Example #1
0
 // Use this for initialization
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Example #2
0
    [SerializeField] CenterFlame theMusic = null; //처음에 비활성화되어있기때문에 find로 찾을 수 없다.

    // Start is called before the first frame update
    void Start()
    {
        instance  = this;
        theNote   = FindObjectOfType <NoteManager>();
        theCombo  = FindObjectOfType <ComboManager>();
        theScore  = FindObjectOfType <ScoreManager>();
        theTiming = FindObjectOfType <TimingManager>();
        theStatus = FindObjectOfType <StatusManger>();
        thePlayer = FindObjectOfType <PlayerController>();
        theStage  = FindObjectOfType <StageManger>();
        theResult = FindObjectOfType <Result>();
    }
Example #3
0
    // Start is called before the first frame update
    void Start()
    {
        theEffect        = FindObjectOfType <EffectManager>();
        theScoreManager  = FindObjectOfType <ScoreManager>();
        theComboManager  = FindObjectOfType <ComboManager>();
        theStageManager  = FindObjectOfType <StageManger>();
        thePlayer        = FindObjectOfType <PlayerController>();
        theStatusManager = FindObjectOfType <StatusManger>();


        //타이밍 박스 설정
        timingBoxs = new Vector2[timingRect.Length];

        for (int i = 0; i < timingRect.Length; i++)
        {
            //각각의 판정 범위 = 중심 - 이미지 너비/2 ~ 중심 + 이미지 너비/2
            timingBoxs[i].Set(center.localPosition.x - timingRect[i].rect.width / 2,
                              center.localPosition.x + timingRect[i].rect.width / 2);
        }
    }