public TestSceneHitExplosion() { Add(explosion = new HitExplosion()); AddStep("Explode", () => { explosion.Explode(); }); }
void Start() { m_bommer = FindObjectOfType <BommerController>(); m_playerC = FindObjectOfType <PlayerContoller>(); m_rigidbody = GetComponent <Rigidbody2D>(); m_hit = FindObjectOfType <HitExplosion>(); m_player = GameObject.Find("player").gameObject; m_hitObject = transform.GetChild(0).gameObject; m_hitObject.SetActive(false); Vector2 vector = m_player.transform.position - this.transform.position; m_rigidbody.AddForce(vector, ForceMode2D.Impulse); Invoke("Explosion", 3.0f); }
public override void OnJudgement(DrawableHitObject <OsuHitObject, OsuJudgementInfo> judgedObject) { HitExplosion explosion = new HitExplosion(judgedObject.Judgement, judgedObject.HitObject); judgementLayer.Add(explosion); }
private void judgement(DrawableHitObject h, JudgementInfo j) { HitExplosion explosion = new HitExplosion((OsuJudgementInfo)j, (OsuHitObject)h.HitObject); judgementLayer.Add(explosion); }