예제 #1
0
    void Update()
    {
        switch (gameState)
        {
        case GameState.Fighting:
            break;

        case GameState.Begin:
            StartCoroutine(EnermyManager.GetInstance().Action());
            gameState = GameState.Fighting;
            break;

        case GameState.Victory:
            break;

        case GameState.Fail:
            break;
        }

        // if (Input.GetMouseButtonDown(0))
        // {
        //     Collider2D[] col = Physics2D.OverlapPointAll(Camera.main.ScreenToWorldPoint(Input.mousePosition));
        //     foreach (var collider2D1 in col)
        //     {
        //         Debug.Log(collider2D1.gameObject.tag);
        //     }
        // }
    }
예제 #2
0
 void OnGUI()
 {
     if (GUILayout.Button("开始", GUILayout.Width(200), GUILayout.Height(50)))
     {
         gameState = GameState.Begin;
     }
     if (GUILayout.Button("下一波", GUILayout.Width(200), GUILayout.Height(50)))
     {
         StartCoroutine(EnermyManager.GetInstance().Action());
     }
     if (GUILayout.Button("设置字", GUILayout.Width(200), GUILayout.Height(50)))
     {
         MainUI.Instance.SetTextUI("金币", "40");
     }
     if (GUILayout.Button("设置字", GUILayout.Width(400), GUILayout.Height(100)))
     {
         MainUI.Instance.DisaplayWaveText(2);
     }
     if (GUILayout.Button("打印状态", GUILayout.Width(400), GUILayout.Height(100)))
     {
         Debug.Log(Hero._herostate);
     }
 }