public static void Init() { GameState = gState.Game; GameMenus = new List<Menu>(); #region MainMenu Menu MainMenu = new Menu(); Menu.Label TitleLabel = new Menu.Label(mainMenuTitle.Text, fPixel, (_2DCraft.wnd.Width / 2), 25); TitleLabel.Text.Style = String2D.Styles.Underlined; TitleLabel.Text.Size = 30; MainMenu.Controls.Add(TitleLabel); GameMenus.Add(MainMenu); #endregion ActiveMenu = MainMenu; Ply = new Player("Player", false, new Image(FileSystem.DirectoryPath + "\\" + FileSystem.Directory + "\\" + "textures\\player.png"), 32, 64); healthLabel = new Menu.Label("Health: " + Ply.Health, fPixel, 5, _2DCraft.wnd.Height - 20); healthLabel.Text.Style = String2D.Styles.Regular; healthLabel.Text.Size = 15; MainMenu.Controls.Add(healthLabel); _2DCraft.MapGen.Init(8, (int)_2DCraft.wnd.Height / 32); _2DCraft.MapGen.GenerateMap(0.75, 100); Camera = new Camera(0, 0, _2DCraft.wnd.Width, _2DCraft.wnd.Height); _2DCraft.wnd.CurrentView = Camera.ViewCamera; }
public gInfo(gState state = default, @string name = default, bool isSystemG = default, ref ptr <trace.Event> start = default, ref ptr <trace.Event> markAssist = default) { this.state = state; this.name = name; this.isSystemG = isSystemG; this.start = start; this.markAssist = markAssist; }
public void GoToGameOver() { GameState = gState.gameover; LoadNewScene("gameover"); }
public void GoToMain() { GameState = gState.play; LoadNewScene("main"); victory = false; }
public void GoToMenu() { GameState = gState.menu; LoadNewScene("menu"); victory = false; }
/// <summary> /// 游戏开始 /// </summary> /// <param name="firstTurn"></param> public void gameStart(Wuziqi.qiType firstTurn) { this.firstTurn = firstTurn; this.curState = gState.gaming; this._curTurn = firstTurn; }
public orderEvent(ref ptr <Event> ev = default, long batch = default, ulong g = default, gState init = default, gState next = default) { this.ev = ev; this.batch = batch; this.g = g; this.init = init; this.next = next; }
public void Death() { _player.Playing = false; _player._rb.isKinematic = true; _gState = gState.Death; }
private void StartGame() { _player.Playing = true; _player._rb.isKinematic = false; _gState = gState.Playing; }