void PromptMobChoices(Tile tile) { var mob = MobStore.Find(tile.contentId); var prompt = string.Format("You notice [{0}] before it notices you...", mob.name); sim.AddEvent(PlayerEvent.PromptChoice(prompt, Choice.SwipeLeft("attack", "Attack"), Choice.SwipeRight("ignore", "Ignore"))); sim.discoveredObjects.Add(mob.id); }
void GenerateMob(Tile tile) { var mobTemplateKey = tpd.RollMap(env.mobChances); var mobTemplate = JSONResource.Get <MobTemplate>(mobTemplateKey); var mobGenerator = new MobGenerator(mobTemplate); var mob = mobGenerator.Generate(); var randomTile = room.RandomOpenTile(); mob.position = randomTile.position; MobStore.Save(mob); randomTile.Occupy(Constants.mobContentKey, mob.id); }