Esempio n. 1
0
        private void OnAddScore(object sender, GameEventArgs e)
        {
            AddScoreEventArgs ase = (AddScoreEventArgs)e;

            m_Score       += ase.AddCount;
            scoreText.text = "总分:" + m_Score;
        }
Esempio n. 2
0
        private void OnAddScore(object sender, GameEventArgs e)
        {
            AddScoreEventArgs ase = (AddScoreEventArgs)e;

            m_Score += ase.AddCount;

            this.RefreshScoreText();
        }
Esempio n. 3
0
        private void OnTriggerEnter2D(Collider2D collision)
        {
            // 隐藏管道与自身
            GameEntry.Sound.PlaySound(1);
            collision.gameObject.SetActive(false);
            GameEntry.Entity.HideEntity(this);

            // 派发加分事件
            AddScoreEventArgs e = ReferencePool.Acquire <AddScoreEventArgs>();

            GameEntry.Event.Fire(this, e.Fill(10));
        }