Esempio n. 1
0
        void StageClear(StageCleared st)
        {
            stageClearText.SetActive(true);
            StartCoroutine(DoStageClear(st.bufferTime));
            IEnumerator DoStageClear(float t)
            {
                print(st.bufferTime);
                yield return(new WaitForSeconds(t));

                stageClearText.SetActive(false);
                print("deactivate");
            }
        }
Esempio n. 2
0
 void OnClearStage(StageCleared st)
 {
     if (!gotDamage)
     {
         scoreMultiplier += 1;
         Message <ScoreMultiplierChanged> .Raise(new ScoreMultiplierChanged(scoreMultiplier, 1));
     }
     gotDamage     = false;
     canMove       = false;
     vulnerable    = false;
     body.velocity = Vector2.zero;
     //body.isKinematic = true;
 }
Esempio n. 3
0
 public void OnStageClear(StageCleared st)
 {
     //Generate random pulses.
     for (int i = 0; i < 5; i++)
     {
         pulses[i] = Pulse.GetRandom(edgeOffset, maxTimeOffset);
     }
     mat.SetFloatArray("_Impacts", pulses.GetTimes());
     mat.SetVectorArray("_ImpactPoints", new Vector4[] {
         pulses[0].screenPoint,
         pulses[1].screenPoint,
         pulses[2].screenPoint,
         pulses[3].screenPoint,
         pulses[4].screenPoint
     });
 }