IEnumerator AutoDisable() { yield return(new WaitForSeconds(0.667f / timescale)); renderer.enabled = false; EffectShower.Get().SetEnd(idx); }
public void Miss() { enabled = false; renderer.enabled = false; processed = true; if (connector) { var renderer = connector.GetComponent <SpriteRenderer>(); var color = renderer.color; color.a /= 2; renderer.color = color; if ((int)type >= 2) { renderer.enabled = false; } else { connector.getSecondJoint().GetComponent <note>().Miss(); connector.SetFirstJoint(transform.parent); } } EffectShower.Get().Miss(transform); SoundEffectManager.Get().PlayHitSound(); checker.Next(); }
public void Clear(Score.ScoreType type) { enabled = false; renderer.enabled = false; processed = true; if (connector) { if ((int)this.type >= 2) { connector.GetComponent <SpriteRenderer>().enabled = false; } else { connector.SetFirstJoint(transform.parent); } } if (type == Score.ScoreType.Good) { // Debug.Log("Good"); DobbyControll.Get().Damage(5); EffectShower.Get().Good(transform); Score.Get().Up(150); } else if (type == Score.ScoreType.Great) { // Debug.Log("Great"); DobbyControll.Get().Damage(10); EffectShower.Get().Great(transform); Score.Get().Up(300); } switch (this.type) { case Type.UP: case Type.OUT_UP: SoundEffectManager.Get().PlayUpSound(); break; case Type.DOWN: case Type.OUT_DOWN: SoundEffectManager.Get().PlayDownSound(); break; default: break; } checker.Next(); }