Esempio n. 1
0
 protected void AbsorbPoints()
 {
     gotPoints = "+" + pointsBuffer.ToString();
     if (pointsBuffer > 0 && !pointsAbsorbDelay.IsOn())
     {
         if (pointsBuffer >= pointsAbsorbRate)
         {
             points       += pointsAbsorbRate;
             pointsBuffer -= pointsAbsorbRate;
         }
         else
         {
             points      += pointsBuffer;
             pointsBuffer = 0;
         }
     }
 }
Esempio n. 2
0
        public void Update(Vector2 position)
        {
            this.position = position;

            if (duration.IsOn())
            {
                if (opacity < 1)
                {
                    offset  += offsetStep;
                    opacity += opacityStep;
                }
            }
            else
            {
                if (opacity > 0)
                {
                    offset  -= offsetStep;
                    opacity -= opacityStep;
                }
            }
        }