Esempio n. 1
0
 private void initTexts(out StrokeSpriteFont o_SpriteText, string i_Text, Vector2 i_Position)
 {
     o_SpriteText = new StrokeSpriteFont(k_FontName, string.Format(i_Text, SecondsLeft), this);
     o_SpriteText.Initialize();
     o_SpriteText.PositionOrigin = o_SpriteText.SourceRectangleCenter;
     o_SpriteText.RotationOrigin = o_SpriteText.SourceRectangleCenter;
     o_SpriteText.Position       = i_Position;
 }
 private void positionResult(string i_ResultText, GameScreen i_GameScreen)
 {
     m_Result = new StrokeSpriteFont(i_ResultText, i_GameScreen);
     m_Result.Initialize();
     m_Result.PositionOrigin = m_Result.SourceRectangleCenter;
     m_Result.RotationOrigin = m_Result.SourceRectangleCenter;
     m_Result.Position       = ResultPosition;
     i_GameScreen.Add(m_Result);
 }
Esempio n. 3
0
        public override void Initialize()
        {
            if (!IsInitialized)
            {
                base.Initialize();

                IsInitialized = true;

                if (!StrokeSpriteFont.IsInitialized)
                {
                    StrokeSpriteFont.Initialize();
                }

                StrokeSpriteFont.Animations.Add(new PulseAnimator(TimeSpan.Zero, k_TargetScale, k_PulsePerSec));
                StrokeSpriteFont.Animations.Add(new WaypointsAnimator(100, TimeSpan.FromSeconds(0.2f), false, this.Position + new Vector2(-10, 0)));
                StrokeSpriteFont.Animations.Enabled = false;
            }
        }