BaseButton.Update C# (CSharp) Метод

Update() публичный Метод

public Update ( ) : void
Результат void
    void Update ()
    {
        if (pressed && Input.GetKeyDown(KeyCode.E))
            onPressed.Invoke();
    }

Usage Example

        public override void Update(GameTime gameTime)
        {
            soundButton.Update(gameTime);
            musicButton.Update(gameTime);

            playButton.Update(gameTime);

            if (playButton.IsClicked(Main.MouseState))
            {
                Main.CurrentState  = States.StatsScreen;
                Main.PreviousState = States.SetUp;
            }

            base.Update(gameTime);
        }