コード例 #1
0
 public static void RemovAlien(GameObject alien)
 {
     DeadAlienCount++;
     Earth.AddGlobalCurrency(50);
     alien.SetActive(false);
     ActiveAliens.Remove(alien);
     InactiveAliens.Add(alien);
     foreach (EarthZone zone in Earth.ControlledZones)
     {
         zone.ActiveTargets.Remove(alien);
     }
 }
コード例 #2
0
    /*void OnGUI()
     * {
     *  if (isPickingLocation)
     *  {
     *      GUI.Label(GetTopLabelRect("Right Click to Place"), "Right Click to Place", HeaderStyle);
     *  }
     *
     *  // Only show menus if the game is paused
     *  if (Paused && !isPickingLocation)
     *  {
     *      switch (CurrentScreen)
     *      {
     *          case MenuManager.MenuScreen.NewGame:
     *              GUILayout.Window(0, new Rect(50, 50, Screen.width - 100, Screen.height - 100), NewGameScreen, "");
     *              break;
     *          case MenuManager.MenuScreen.MainMenu:
     *              GUILayout.Window(0, new Rect(50, 50, Screen.width - 100, Screen.height - 100), MainEarthMenu, "");
     *              break;
     *      }
     *  }
     * }*/

    void NewGameScreen(int windowID)
    {
        GUILayout.Label("The year is 2021", HeaderStyle, GUILayout.Height(75));
        GUILayout.Label("Aliens have destroyed everything, you command whats left of humanity", Header2Style, GUILayout.Height(40));
        GUILayout.Label("They'll attack again, prepare to defend", Header2Style, GUILayout.Height(40));
        GUILayout.Label("Scroll/Pinch to zoom, click and drag to move the Earth, right click for actions.", Header2Style, GUILayout.Height(40));
        if (GUILayout.Button("Continue", ButtonStyle, GUILayout.Height(75)))
        {
            CurrentScreen = MenuManager.MenuScreen.MainMenu;
            Earth.AddGlobalCurrency(400);
        }
    }