示例#1
0
        public override void update()
        {
            // update distance
            accumulatedDistance += GameWorld.Speed;
            float heroOffset = hero.getPosition().CenterX - startPoint.X;

            float dyepackBonus = 50f * hero.dyepacksCollected();
            float powerupBonus = 50f * hero.powerupsCollected();

            float score = ((accumulatedDistance + heroOffset) / factor) + dyepackBonus + powerupBonus;

            // update textbox
            scoreBox.Label = (score).ToString("00000000.0");
        }