Exemplo n.º 1
0
        public override void Update(BaseScene scene, FrameTick elapsedTime)
        {
            ActionTime += elapsedTime;

            int totalTime = Anim.FrameTime * Anim.GetTotalFrames(GraphicsManager.GetBeam(Anim.AnimIndex).TotalFrames) * Math.Max(1, Cycles);

            if (ActionTime >= totalTime)
            {
                finished = true;
            }
        }
Exemplo n.º 2
0
        public override void Draw(SpriteBatch spriteBatch, Loc offset)
        {
            if (Finished)
            {
                return;
            }

            Loc       drawLoc = MapLoc - offset + new Loc(GraphicsManager.TileSize / 2);
            BeamSheet sheet   = GraphicsManager.GetBeam(Anim.AnimIndex);

            sheet.DrawColumn(spriteBatch, new Vector2(drawLoc.X, drawLoc.Y - LocHeight), Anim.GetCurrentFrame(ActionTime, sheet.TotalFrames), Color.White * ((float)Anim.Alpha / 255));
        }