public NewLevelButton() : base(new Sprite(Globals.TheGame, TextureLibrary.GetSpriteSheet("btn_newlevel", 1, 4), new Transform())) { m_animation = new SpriteSheetAnimation(m_buttonSprite, 0, 3, 0.5f, -1); m_popAction = new SingleActionManager(); //m_in = new MoveToStaticAction(Globals.TheGame, m_transform, new Vector2(150, 300), false); //m_out = new MoveToStaticAction(Globals.TheGame, m_transform, new Vector2(150, 0), false); m_transform.Position = new Vector2(150, 300); _generation = new Counter(2, TextureLibrary.GetSpriteSheet("levelscore_vertical", 20, 1)); _generation.Transform.ParentTransform = m_transform; _section = new Counter(1, TextureLibrary.GetSpriteSheet("levelscore_vertical", 20, 1)); _section.Transform.ParentTransform = m_transform; _generation.Alpha = _section.Alpha = 1.0f; _generation.ScrollSpeed = _section.ScrollSpeed = 50; }
public CounterNumber(Counter parent, SpriteSheet texture) { m_transform = new Transform(parent.Transform, true); m_sprite = new Sprite(Globals.TheGame, texture, m_transform); m_srcCache = m_sprite.SourceRectangle; m_textureInterval = (int)m_sprite.Height; m_halfTexture = m_textureInterval / 2; }