Exemplo n.º 1
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         if (gameManager.instance.now == 0)
         {
             StartCoroutine(event0());
         }
         else if (gameManager.instance.now == 4)
         {
             Camera.main.GetComponent <CameraFollow>().Active = true;
             gamePanel.showBattleBtn(player.gameObject);
             BattleManager.instance.startLevel();
             player.transform.position = checkPoint[1].position;
             gameManager.instance.beWhite(0.02f);
         }
         else if (gameManager.instance.now == 5)
         {
             Camera.main.GetComponent <CameraFollow>().Active = true;
             gamePanel.showBattleBtn(player.gameObject);
             BattleManager.instance.startLevel();
             player.transform.position = checkPoint[2].position;
             gameManager.instance.beWhite(0.02f);
         }
         else if (gameManager.instance.now == 6)
         {
             Camera.main.GetComponent <CameraFollow>().Active = true;
             gamePanel.showBattleBtn(player.gameObject);
             BattleManager.instance.startLevel();
             player.transform.position = checkPoint[3].position;
             gameManager.instance.beWhite(0.02f);
         }
         else if (gameManager.instance.now == 7)
         {
             Camera.main.GetComponent <CameraFollow>().Active = true;
             gamePanel.showBattleBtn(player.gameObject);
             BattleManager.instance.startLevel();
             player.transform.position = checkPoint[4].position;
             gameManager.instance.beWhite(0.02f);
         }
         this.gameObject.GetComponent <BoxCollider2D>().enabled = false;
     }
 }
Exemplo n.º 2
0
    private void FixedUpdate()
    {
        if (gamePanel.showFinish && (Application.platform == RuntimePlatform.Android ? Input.GetTouch(0).phase == TouchPhase.Began : Input.GetKeyDown(KeyCode.Z)))
        {
            gamePanel.hideTextPanel(true);
            switch (gameManager.instance.now)
            {
            case 1: gamePanel.showTextPanel("hide", "故事的主角,一位叫墨铭的年轻人,作为副将跟随着大将军卫青,踏上了保家卫国的出塞征途……", 'L', null, "center"); break;

            case 2: StartCoroutine(event2()); break;

            case 3: StartCoroutine(event3()); break;

            case 4: StartCoroutine(event4()); break;

            case 5:
                Camera.main.GetComponent <CameraFollow>().Active = true;
                gamePanel.showBattleBtn(player.gameObject);
                BattleManager.instance.startLevel();
                StartCoroutine(event5());
                break;

            case 9: StartCoroutine(event9()); break;

            case 10: gamePanel.showTextPanel("墨铭", "只是小股的侦查部队吗,也好,回去向将军报告一下,匈奴接下来可能会有大动作了!", 'L', face1, "bottom"); break;

            case 11: StartCoroutine(event11()); break;

            default: break;
            }
        }
        if (autoEvent)
        {
            switch (gameManager.instance.now)
            {
            case 12: StartCoroutine(event12()); autoEvent = false; break;
            }
        }
    }
Exemplo n.º 3
0
 void Start()
 {
     gamePanel = gameManager.instance.getGamePanel().GetComponent <GamePanelManager>();
     gamePanel.showBattleBtn(player.gameObject);
     BattleManager.instance.setGamePanel(gamePanel);
 }