private void AddRandomHero() { HeroInstance hero = HeroGenerator.GenerateHero(Random.Range(1, 16)); hero.Experience = Random.Range(0, 1000); ServiceLocator.AllegianceService.SetHeroAllegiance(hero, ServiceLocator.AllegianceService.Factions.ToArray().GetRandom()); }
public void SpawnHeroes(int count) { for (int i = 0; i < count; i++) { AvailableHeroes.Add(HeroGenerator.GenerateHero(rng)); } }
public void VillainTest(FightingStyle style) { var generator = HeroGenerator.GetCreator(style); var villain = generator.CreateVillain(); villain.Name.ShouldBe(GlobalConstant.Villain); villain.Style.ShouldBe(style); }
public void HeroTest(FightingStyle style) { var generator = HeroGenerator.GetCreator(style); var hero = generator.CreateHero(); hero.Name.ShouldBe(GlobalConstant.Hero); hero.Style.ShouldBe(style); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); heroGenerator = new HeroGenerator(); Application.Run(heroGenerator); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); aboutForm = new AboutForm(); chracter = new Hero(); heroGenerator = new HeroGenerator(); splashScreen = new SplashScreen(); Application.Run(splashScreen); }
public void GenerateSettings() { ReputationGenerator.GenerateQuestPreferences(this, personalityType); ReputationGenerator.GenerateName(this, ReputationNameConventions.GROUP); for (int i = 0; i < Random.Range(MIN_HEROES_PER_FACTION, MAX_HEROES_PER_FACTION + 1); i++) { Heroes.Add(HeroGenerator.GenerateHero(this, Mathf.Clamp(initialHeroLevel + Random.Range(-1, 1), 1, 100), true)); } }
private void Start() { for (int i = 0; i < testCount; i++) { HeroBar newBar = Instantiate(prefab, this.transform); HeroInstance hero = HeroGenerator.GenerateHero(Random.Range(1, 21)); hero.Experience = Random.Range(0, 1000); newBar.Hero = hero; newBar.gameObject.SetActive(true); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); character = new Hero(); heroGenerator = new HeroGenerator(); aboutBoxForm = new AboutBoxForm(); Application.Run(heroGenerator); }
private void GenerateFaction() { FactionInstance faction = FactionGenerator.GenerateFaction(); for (int h = 0; h < Random.Range(2, 6); h++) { HeroInstance hero = HeroGenerator.GenerateHero(Random.Range(1, 16)); hero.Experience = Random.Range(0, 1000); ServiceLocator.AllegianceService.SetHeroAllegiance(hero, faction); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); heroGenerator = new HeroGenerator(); masterForm = new MasterForm(); splashForm = new SplashForm(); aboutForm = new aboutForm(); hero = new Hero(); Application.Run(splashForm); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Forms heroGenerator = new HeroGenerator(); aboutForm = new AboutForm(); // Objects hero = new Hero(); Application.Run(heroGenerator); }
void Awake() { DontDestroyOnLoad(gameObject); s_instance = this; if (m_resMgr == null) { m_resMgr = gameObject.AddComponent <ResMgr>(); } if (m_heroGenerator == null) { m_heroGenerator = gameObject.AddComponent <HeroGenerator>(); } if (m_enemyGenerator == null) { m_enemyGenerator = gameObject.AddComponent <EnemyGenerator>(); } Init(); }
public static void InitializeServices(GameSetupData data) { //Factions and heroes for (int i = 0; i < data.factionCount; i++) { FactionInstance faction = FactionGenerator.GenerateFaction(); foreach (HeroType heroType in Enum.GetValues(typeof(HeroType))) { HeroInstance hero = HeroGenerator.GenerateHero(1, heroType); ServiceLocator.AllegianceService.SetHeroAllegiance(hero, faction); } /*for (int h = 0; h < Random.Range(data.heroesPerFactionMin, data.heroesPerFactionMax + 1); h++) { * HeroInstance hero = HeroGenerator.GenerateHero(1); * ServiceLocator.AllegianceService.SetHeroAllegiance(hero, faction); * }*/ for (int q = 0; q < data.startQuests; q++) { QuestInstance quest = QuestGenerator.GenerateQuest(1, QuestMakeupType.SOLO); ServiceLocator.QuestService.RegisterQuest(quest, faction); } } }
public void LevelUp() { HeroGenerator.LevelUpHero(this); // To Do dodać zwiększanie się statystyk bohatera }
public QuestRewardHero(QuestSourceFaction faction) { Hero = HeroGenerator.GenerateHero(faction, Mathf.Clamp(faction.AverageHeroLevel + Random.Range(-5, 5), 1, 100), false); }