Пример #1
0
 public void Update(ContentManager Content, GameTime gameTime)
 {
     if (StaticBooleans.IsShopOpen)
     {
         shopScreen.Update();
     }
     else if (FightAuth.HasStartedFight())
     {
         fightScreen.Update(gameTime, Content);
     }
     else
     {
         foreach (CharacterBlock cb in characters)
         {
             if (StaticBooleans.NeedInitializing)
             {
                 cb.Initialize();
                 cb.LoadContent(Content);
             }
         }
         StaticBooleans.SetNeedInitializingBool(false);
         foreach (CharacterBlock cb in characters)
         {
             cb.Update();
         }
         foreach (Button button in buttons)
         {
             button.Update();
         }
     }
 }
Пример #2
0
 public void Draw(SpriteBatch spriteBatch, ContentManager Content)
 {
     if (StaticBooleans.IsShopOpen)
     {
         shopScreen.Draw(spriteBatch);
     }
     else if (FightAuth.HasStartedFight())
     {
         if (!StaticBooleans.HasFightBeenInitialized)
         {
             fightScreen.Initialize();
             fightScreen.LoadContent(Content);
             StaticBooleans.SetHasFightBeenInitializedBool(true);
         }
         fightScreen.Draw(spriteBatch);
     }
     else
     {
         LoadGameMenu(spriteBatch);
     }
 }