예제 #1
0
파일: Cherry.cs 프로젝트: RrrEeGina/PackMan
        public void Initialize(JsonCherry jsonCherry)
        {
            secondForNextState = jsonCherry.TimeForNextState;
            state = jsonCherry.State;
            score = jsonCherry.Score;

            if (state == CherryState.Disable) Hide();
            StartCoroutine(StateChangedCoroutine());
            if (state == CherryState.Pulsation)
                StartCoroutine(Pulsation());

            onCherryAteAgain(score);
        }
예제 #2
0
파일: Cherry.cs 프로젝트: RrrEeGina/PackMan
 private void RunPulsation()
 {
     if (secondForNextState < GameConst.CHERRY_PULS_START && state == CherryState.Enable)
     {
         state = CherryState.Pulsation;
         StartCoroutine(Pulsation());
     }
 }
예제 #3
0
파일: Cherry.cs 프로젝트: RrrEeGina/PackMan
 private void Show()
 {
     state = CherryState.Enable;
     spriteRender.color = defaultColor;
     coll2D.enabled = true;
     secondForNextState = GameConst.CHERRY_ENABLE_INTERVAL;
 }
예제 #4
0
파일: Cherry.cs 프로젝트: RrrEeGina/PackMan
 private void Hide()
 {
     state = CherryState.Disable;
     spriteRender.color = hideColor;
     coll2D.enabled = false;
     secondForNextState = GameConst.CHERRY_DISABLE_INTERVAL;
 }