Example #1
0
 public override void Update(GameTime pGameTime, Sprite pSprite)
 {
     m_CurrentTime += pGameTime.ElapsedGameTime.Milliseconds;
     float lerpFactor = 0;
     if (m_CurrentTime > 0)
     {
         lerpFactor = (float)m_CurrentTime / m_LerpTime;
     }
     pSprite.Colour = Color.Lerp(m_StartColour, m_EndColour, lerpFactor);
 }
Example #2
0
 public abstract void Update(GameTime pGameTime, Sprite pSprite);
Example #3
0
 public override void Update(GameTime pGameTime, Sprite pSprite)
 {
     pSprite.Position = pSprite.Position + Velocity * (float)pGameTime.ElapsedGameTime.Milliseconds / 1000;
 }
Example #4
0
 public override void Update(GameTime pGameTime, Sprite pSprite)
 {
     m_CurrentTime += pGameTime.ElapsedGameTime.Milliseconds;
     float lerpFactor = 0;
     if (m_CurrentTime > 0)
     {
         lerpFactor = (float)m_CurrentTime / m_LerpTime;
     }
     pSprite.Scale = Vector2.Lerp(m_StartScale, m_EndScale, lerpFactor);
 }