TugOfBaby.RenderManager.Update C# (CSharp) Method

Update() public method

public Update ( GameTime gametime, List all ) : void
gametime Microsoft.Xna.Framework.GameTime
all List
return void
        public void Update(GameTime gametime, List<GameObject> all)
        {
            foreach (GameObject gameObject in all)
            {
                if (gameObject.Sprite != null)
                {
                    Vector2 pos = gameObject.Position + gameObject.Sprite.Origin;
                    if (gameObject.Sprite.BackgroundAnimation != null)
                    {
                        gameObject.Sprite.BackgroundAnimation.Update(gametime);
                    }
                    if (gameObject.Sprite.Animation != null)
                    {

                        gameObject.Sprite.Animation.Update(gametime);
                    }
                    if(gameObject.Baby != null) {
                        gameObject.Baby.Torso.Animation.Update(gametime);
                    }
                }
            }
        }