public override void Update(float elapsedTime) { if (!active) { gui.Reset(); } }
public override void Render(float elapsedTime) { drawer2D.BeginDrawSprite(); drawer2D.DrawSprite(backgroundSprite); drawer2D.EndDrawSprite(); GuiMessage msg = gui.Update(elapsedTime, Input); // proceso el msg switch (msg.message) { case MessageType.WM_COMMAND: switch (msg.id) { case ID_CLOSE: show = false; gui.Reset(); PlayerModel.ShowFatherNote = false; break; } break; default: break; } if (show) { gui.Render(); } }
public void CraftShipHelm() { var catnWood = PlayerModel.InventoryModel.CantWood(); var cantRope = PlayerModel.InventoryModel.CantRope(); var hasHammer = PlayerModel.InventoryModel.HasHammer(); if (catnWood < 3 || cantRope < 1 || !hasHammer) { showNoElemMsg = true; msgTime = 0; } else { PlayCraftSound(); showCraftElemMsg = true; msgTime = 0; PlayerModel.InventoryModel.ShowShipHelm = true; PlayerModel.InventoryModel.RemoveCraftElements(); gui.Reset(); DrawIFrame(); } }