Ejemplo n.º 1
0
 public override void SetUi(PrefabSlot slot)
 {
     base.SetUi(slot);
     slot.SetButton("StartGameBtn", (btn) =>
     {
         // 开始游戏
         GameMgr.instance.StartGame();
     });
 }
Ejemplo n.º 2
0
 public override void SetUi(PrefabSlot slot)
 {
     base.SetUi(slot);
     slot.SetText("ScoreText", GameMgr.instance.Score.ToString());
     slot.SetButton("RestartBtn", (btn) =>
     {
         // 继续游戏
         Hide();
         GameMgr.instance.RestartGame();
     });
 }
Ejemplo n.º 3
0
 public override void SetUi(PrefabSlot slot)
 {
     base.SetUi(slot);
     slot.SetButton("BombBtn", (btn) =>
     {
         // 炸弹按钮被点击
         GameMgr.instance.KillAllEnemy();
     });
     slot.SetButton("PauseBtn", (btn) =>
     {
         // 暂停按钮被点击
         GameMgr.instance.PauseGame();
     });
     m_scoreText   = slot.GetObj <Text>("ScoreText");
     m_bombCntText = slot.GetObj <Text>("BombCntText");
 }
Ejemplo n.º 4
0
 public override void SetUi(PrefabSlot slot)
 {
     base.SetUi(slot);
     slot.SetButton("ContinueBtn", (btn) =>
     {
         // 继续游戏
         Hide();
         GameMgr.instance.ContinueGame();
     });
     slot.SetButton("RestartBtn", (btn) =>
     {
         // 重新开始游戏
         Hide();
         GameMgr.instance.RestartGame();
     });
     slot.SetButton("HomeBtn", (btn) =>
     {
         // 返回主菜单
         Hide();
         GameMgr.instance.BackToHomePanel();
     });
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 设置界面ui逻辑
 /// </summary>
 public virtual void SetUi(PrefabSlot slot)
 {
 }