private static void ShowMessage(string message, int number) { const int TX = 310; const int TY = 493; const int TW = 200; const int TH = 25; const int STEPS = 5; const int BG_X = 279; const int BG_Y = 453; int fullW = 0; fullW = 260 * number / STEPS; SwinGame.DrawBitmap(_LoaderEmpty, BG_X, BG_Y); SwinGame.DrawBitmapPart(_LoaderFull, 0, 0, fullW, 66, BG_X, BG_Y); SwinGame.DrawTextLines(message, Color.White, Color.Transparent, _LoadingFont, FontAlignment.AlignCenter, TX, TY, TW, TH); SwinGame.RefreshScreen(); SwinGame.ProcessEvents(); }
/// <summary> /// Playes the SwinGame intro animation /// </summary> private static void PlaySwinGameIntro() { const int ANI_X = 143; const int ANI_Y = 134; const int ANI_W = 546; const int ANI_H = 327; const int ANI_V_CELL_COUNT = 6; const int ANI_CELL_COUNT = 11; Audio.PlaySoundEffect(_StartSound); SwinGame.Delay(200); int i = 0; for (i = 0; i <= ANI_CELL_COUNT - 1; i++) { SwinGame.DrawBitmap(_Background, 0, 0); SwinGame.DrawBitmapPart(_Animation, (i / ANI_V_CELL_COUNT) * ANI_W, (i % ANI_V_CELL_COUNT) * ANI_H, ANI_W, ANI_H, ANI_X, ANI_Y); SwinGame.Delay(20); SwinGame.RefreshScreen(); SwinGame.ProcessEvents(); } SwinGame.Delay(1500); }
public void Draw() { SwinGame.DrawBitmap("EmptyHeart.png", 378, 80); _partRect = SwinGame.RectangleFrom(0, 0, _width, 180); SwinGame.DrawBitmapPart(_fullBar, _partRect, 378, 80); }