コード例 #1
0
ファイル: Player.cs プロジェクト: yellowkills/PonyGameDev
 // Sets the heroes that will be uses in the current level
 public void setHeroesPlayable(Hero[] heroes)
 {
     this.heroes = heroes;
     activeHero = heroes[0];
     activeHero.status = Hero.Status.ACTIVE;
     game.camera.lockEntity(activeHero);
 }
コード例 #2
0
ファイル: Level.cs プロジェクト: yellowkills/PonyGameDev
        // Loads the trio of heroes for this level
        private Hero[] loadHeroes(string herostring)
        {
            string[] heroSet = herostring.Split('/');
            Hero[] heroes = new Hero[3];

            for (int i = 0; i < heroSet.Length; i++)
            {
                switch (heroSet[i])
                {
                    case "TwilightSparkle":
                        heroes[i] = new Hero(game, "TwilightSparkle");
                        break;
                    case "RainbowDash":
                        heroes[i] = new Hero(game, "RainbowDash");
                        break;
                    case "Applejack":
                        heroes[i] = new Hero(game, "Applejack");
                        break;
                    case "Fluttershy":
                        heroes[i] = new Hero(game, "Fluttershy");
                        break;
                    case "PinkiePie":
                        heroes[i] = new Hero(game, "PinkiePie");
                        break;
                    case "Rarity":
                        heroes[i] = new Hero(game, "Rarity");
                        break;
                    default:
                        break;
                }
            }

            return heroes;
        }