예제 #1
0
        public void Update()
        {
            //Update player
            this._running = this.player.Update() ? 0 : 1;

            for (var i = 0; i < this.pillars.Count; i++)
            {
                Pillar pillar = this.pillars[i];

                //pillar.Update will return true if it needs rebuilding
                if (pillar.Update() && pillar.Type == "Upper")
                {
                    RebuildPillar(pillar, this.pillars[i + 1]);
                }

                if (pillar.CheckHit(this.player))
                {
                    this.HitHandler();
                    break;
                }
            }

            if (this.score % 5 == 0 && this.score > this.latestScore)
            {
                this.IncreaseDifficulty();
            }
        }