Beispiel #1
0
        private void VisibleClearForm(GameLevels gameLevel)
        {
            DictionaryGameFROMButton.Visibility = ViewStates.Visible;
            DictionaryGameToButton1.Visibility  = ViewStates.Visible;
            DictionaryGameToButton2.Visibility  = ViewStates.Visible;
            DictionaryGameToButton3.Visibility  = ViewStates.Visible;
            DictionaryGameToButton4.Visibility  = ViewStates.Visible;
            if (gameLevel == GameLevels.Easy)
            {
                DictionaryGameToButton5.Visibility = ViewStates.Invisible;
                DictionaryGameToButton6.Visibility = ViewStates.Invisible;
            }
            if (gameLevel == GameLevels.Medium)
            {
                DictionaryGameToButton5.Visibility = ViewStates.Visible;
                DictionaryGameToButton6.Visibility = ViewStates.Invisible;
            }
            if (gameLevel == GameLevels.Hard)
            {
                DictionaryGameToButton5.Visibility = ViewStates.Visible;
                DictionaryGameToButton6.Visibility = ViewStates.Visible;
            }

            DictionaryGameFROMButton.Text = "";
            DictionaryGameToButton1.Text  = "";
            DictionaryGameToButton2.Text  = "";
            DictionaryGameToButton3.Text  = "";
            DictionaryGameToButton4.Text  = "";
            DictionaryGameToButton5.Text  = "";
            DictionaryGameToButton6.Text  = "";
            DictionaryGameResult.Text     = "";
        }
Beispiel #2
0
    public void Init(int zoneNumber)
    {
        var clamped = Math.Max(0, Math.Min(zones.Value.Length - 1, zoneNumber));

        zoneIndex = clamped;
        zone      = zones.Value[zoneIndex];
        onCurrentZoneChanged.Publish();
    }
Beispiel #3
0
 public void ConfigurationToMain()
 {
     pop.Play();
     MainCanvas.SetActive(true);
     GameLevels.SetActive(false);
     ConfigurationFirst.SetActive(true);
     ConfigurationMore.SetActive(false);
     ConfigCanvas.gameObject.SetActive(false);
 }
 private void ReadIntentExtras()
 {
     GameLevel = GameLevelOperation.GetGameLevel(Intent.Extras.GetString("GameLevel"));
     Language  = Intent.Extras.GetString("Language");
     DictionaryGameOverResultGameLevel.Text         = String.Format("Level    : {0}", GameLevel);
     DictionaryGameOverResultLanguage.Text          = String.Format("Language    : {0}", Language);
     DictionaryGameOverResultTryCount.Text          = String.Format("Try Count   : {0}", GameResultCalculation.TryCount);
     DictionaryGameOverResultSuccessCount.Text      = String.Format("Sucess Count: {0}", GameResultCalculation.SuccessCount);
     DictionaryGameOverResultSuccessPercentage.Text = String.Format("Sucess      : % {0}", GameResultCalculation.SuccessPercentage);
     DictionaryGameOverResultSuccessTime.Text       = String.Format("Elapsed     : {0} Second", GameResultCalculation.ElapsedStropWatch.ElapsedMilliseconds / 1000);
 }
Beispiel #5
0
 public void ReadGameLevels(GameLevels _gameLevels)
 {
     foreach (Level level in _gameLevels.gameLevels)
     {
         Debug.Log("Level Number: " + level.levelNumber);
         foreach (Wave wave in level.waves)
         {
             Debug.Log("Wave Number:  " + wave.waveNumber);
         }
     }
 }
        private IGameLevels LoadGame()
        {
            IGameLevels game = new GameLevels();

            for (int i = 0; i < this.countOfLevels; i++)
            {
                ILevel level = LoadLevel();
                game.AddLevel(level);
            }

            return(game);
        }
 public void Init(int zoneNumber, GameLevels zone)
 {
     for (var i = 0; i < buttons.Length; i++)
     {
         var button   = buttons[i];
         var hasLevel = i < zone.Value.Length;
         button.gameObject.SetActive(hasLevel);
         if (hasLevel)
         {
             button.Init(zoneNumber, i, zone.Value[i]);
         }
     }
 }
    public static GameLevelGridData GetBaseDefault()
    {
        return(GameLevels.GetLevelGridBaseDefault());

        /*
         * GameLevelGridData data = new GameLevelGridData();
         * data = AddAssets(data, "bush-1", UnityEngine.Random.Range(4,8));
         * data = AddAssets(data, "box-1", UnityEngine.Random.Range(2, 4));
         * data = AddAssets(data, "padding-1", UnityEngine.Random.Range(1, 3));
         *
         * return data;
         */
    }
Beispiel #9
0
 void Awake()
 {
     if (_Instance != null)
     {
         DestroyImmediate(gameObject);
         return;
     }
     else
     {
         _Instance       = this;
         PanelController = GetComponentInChildren <InGamePanelController>();
         gameLevels      = new GameLevels(levels);
         DontDestroyOnLoad(gameObject);
     }
 }
        private void StartGame(GameLevels gameLevels)
        {
            try
            {
                var intent = new Intent();
                intent.SetClass(this.Activity, typeof(DictonaryGameActivity));
                intent.PutExtra("GameLevel", gameLevels.ToString());
                intent.PutExtra("Language", DictionaryGameSpinner.SelectedItem.ToString());

                StartActivityForResult(intent, 100);
            }
            catch (Exception ex)
            {
                var toast = Toast.MakeText(this.Activity, ex.Message, ToastLength.Short);
                toast.Show();
            }
        }
    public static GameLevelGridData GetLevelTemplate(string template)
    {
        //string wall1 = "wall-1";

        //GameLevelGridData gridData = new GameLevelGridData();


        return(GameLevels.GetLevelGridBaseDefault());

        /*
         * GameLevelGridData data = new GameLevelGridData();
         * data = AddAssets(data, "bush-1", UnityEngine.Random.Range(4,8));
         * data = AddAssets(data, "box-1", UnityEngine.Random.Range(2, 4));
         * data = AddAssets(data, "padding-1", UnityEngine.Random.Range(1, 3));
         *
         * return data;
         */
    }
Beispiel #12
0
 public void Update(Vector2f mouse)
 {
     for (int i = 0; i < 10; i++)
     {
         if ((levelsPictures[i].GetGlobalBounds().Contains(mouse.X, mouse.Y)) && (availableLevels[i] == true))
         {
             levelsPictures[i].FillColor = Color.Magenta;
             if (buttonReleased == true)
             {
                 lvl = (GameLevels)(i);
                 changeForGameState = true;
             }
         }
         else
         {
             levelsPictures[i].FillColor = Color.Cyan;
         }
     }
 }
Beispiel #13
0
 protected override void Window(int id)
 {
     GUILayout.Label(lc.map.ToString());
     selectedlevel = (GameLevels)GUILayout.Toolbar((int)selectedlevel, Enum.GetNames(typeof(GameLevels)));
     GUILayout.Space(10);
     GUILayout.Label(lc.mod.ToString());
     gameMode = (GameMode)GUILayout.Toolbar((int)gameMode, new string[] { lc.deathmatch.ToString(), lc.teamdeathmatch.ToString(), lc.teamzombiesurive.ToString(), lc.zombisr.ToString() });
     GUILayout.Space(10);
     GUILayout.BeginHorizontal();
     GUILayout.Label(lc.zombiefrag.ToString(), GUILayout.ExpandWidth(false));
     int.TryParse(GUILayout.TextField(fraglimit.ToString(), 2, GUILayout.Width(60)), out fraglimit);
     GUILayout.EndHorizontal();
     if (GUILayout.Button(lc.startgame.ToString()) || skip)
     {
         InitServer();
         enabled = false;
     }
     GUI.DragWindow();
 }
 protected override void Window(int id)
 {
     
     GUILayout.Label(lc.map.ToString());
     selectedlevel = (GameLevels)GUILayout.Toolbar((int)selectedlevel, Enum.GetNames(typeof(GameLevels)));
     GUILayout.Space(10);
     GUILayout.Label(lc.mod.ToString());
     gameMode = (GameMode)GUILayout.Toolbar((int)gameMode, new string[] { lc.deathmatch.ToString(), lc.teamdeathmatch.ToString(), lc.teamzombiesurive.ToString(), lc.zombisr.ToString() });
     GUILayout.Space(10);
     GUILayout.BeginHorizontal();
     GUILayout.Label(lc.zombiefrag.ToString(), GUILayout.ExpandWidth(false));
     int.TryParse(GUILayout.TextField(fraglimit.ToString(), 2, GUILayout.Width(60)), out fraglimit);
     GUILayout.EndHorizontal();
     if (GUILayout.Button(lc.startgame.ToString())|| skip)
     {
         InitServer();
         enabled = false;
     }
     GUI.DragWindow();
 }
Beispiel #15
0
    //Add all the button and input listeners
    void Start()
    {
        enemyList = new List <GameObject> ();

        enemy1Button.onClick.AddListener(() => SpawnEnemy(EnemyType.Normal));
        enemy2Button.onClick.AddListener(() => SpawnEnemy(EnemyType.Fast));
        enemy3Button.onClick.AddListener(() => SpawnEnemy(EnemyType.Brute));
        enemy4Button.onClick.AddListener(() => SpawnEnemy(EnemyType.FlyingNormal));

        startButton.onClick.AddListener(() => StartWave());
        stopButton.onClick.AddListener(() => StopWave());

        waveInput.text          = "1";
        numberOfWavesInput.text = "1";
        levelInput.text         = "1";

        gameLevels = DataPrincess.LoadGameLevels();


        ReadGameLevels(gameLevels);
    }
    private void UpdateStars()
    {
        GameLevels.stars star = GameLevels.stars.none;
        int score             = GameController.getScore();

        foreach (var treshold in GameLevels.getScoreTresholdsFor((GameController.Difficulty)GameController.getDifficultyFactor()))
        {
            if (score > treshold.Value)
            {
                star = treshold.Key;
            }
        }

        switch (star)
        {
        case GameLevels.stars.first:
            result.GetComponent <Text>().text = "BONER!";
            MarkStarActive(star1);
            break;

        case GameLevels.stars.second:
            result.GetComponent <Text>().text = "NICE!";
            MarkStarActive(star1);
            MarkStarActive(star2);
            break;

        case GameLevels.stars.third:
            result.GetComponent <Text>().text = "AWESOME!";
            MarkStarActive(star1);
            MarkStarActive(star2);
            MarkStarActive(star3);
            break;

        default:
            result.GetComponent <Text>().text = "LAME!";
            break;
        }
    }
Beispiel #17
0
 void Start()
 {
     instance = this;
 }
Beispiel #18
0
 public void MainMenuToGameLevels()
 {
     //music.Play();
     MainCanvas.SetActive(false);
     GameLevels.SetActive(true);
 }
Beispiel #19
0
    /*
     *      GAME LEVELS FUNCTIONS
     */

    public void GameLevelsToMain()
    {
        pop.Play();
        MainCanvas.SetActive(true);
        GameLevels.SetActive(false);
    }
Beispiel #20
0
 private void ReadIntentExtras()
 {
     GameLevel = GameLevelOperation.GetGameLevel(Intent.Extras.GetString("GameLevel"));
     Language  = Intent.Extras.GetString("Language");
 }
Beispiel #21
0
 void Awake()
 {
     instance     = this;
     commonLevels = commonLevelsFolder.Children().Select(c => c.GetComponent <Level>()).ToList();
     transform.Children().ForEach(c => c.gameObject.SetActive(false));
 }
Beispiel #22
0
 public void Init(GameLevels zone) => gameObject.SetActive(storage.GetLevelsCompletedInZone(zone) > 0);
Beispiel #23
0
 internal GameBackgrounds(ContentManager content)
 {
     Screens = new GameScreens(content);
     Levels  = new GameLevels(content);
 }
Beispiel #24
0
 public void BackButtonGameLevels()
 {
     //music.Play();
     GameLevels.SetActive(false);
     MainCanvas.SetActive(true);
 }
Beispiel #25
0
 public GameBoard(GameLevels gameLevel)
 {
     this.gameLevel = gameLevel;
     setNumberOfPieces();
     //InitializeTurns(GameConfig.MaxNumberOfTurns);
 }
        public IGameLevels Create(params ILevel[] levels)
        {
            IGameLevels game = new GameLevels(levels);

            return(game);
        }
 void Awake()
 {
     Levels = new GameLevels(1, 1, Resources.Load <GameLevelConfigs>("Levels"));
 }
Beispiel #28
0
 public int GetLevelsCompletedInZone(GameLevels zone) => zone.Value.Count(level => GetStars(level) > 0);
Beispiel #29
0
 public void ChangeToNextLevel()
 {
     lvl += 1;
 }
Beispiel #30
0
    /*
     *      MAIN MENU FUNCTIONS
     */

    public void ShowGameLevelsMenu()
    {
        pop.Play();
        MainCanvas.SetActive(false);
        GameLevels.SetActive(true);
    }
Beispiel #31
0
 public GameBoard(GameLevels beginner)
 {
     this.gameLevel = beginner;
 }