コード例 #1
0
 private static void SetDiceFromCreature(InGameCreature inGameCreature, DiceDto npcMonsterDice)
 {
     npcMonsterDice.CreatureId = InGameCreature.GetUniversalIndex(inGameCreature.Index);
     npcMonsterDice.Label      = inGameCreature.Name;
     npcMonsterDice.PlayerName = inGameCreature.Name;
     npcMonsterDice.BackColor  = inGameCreature.BackgroundHex;
     npcMonsterDice.FontColor  = inGameCreature.ForegroundHex;
 }
コード例 #2
0
 public static void AddD20sForSelected(List <DiceDto> diceDtos, DiceRollType rollType)
 {
     foreach (InGameCreature inGameCreature in Creatures)
     {
         if (inGameCreature.OnScreen)
         {
             DiceDto npcMonsterDice = new DiceDto();
             npcMonsterDice.Sides      = 20;
             npcMonsterDice.CreatureId = InGameCreature.GetUniversalIndex(inGameCreature.Index);
             npcMonsterDice.Quantity   = 1;
             SetDiceFromCreature(inGameCreature, npcMonsterDice);
             npcMonsterDice.Label = null;                      // Backwards compatibility. May be able to change after reworking code in DieRoller.ts
             if (rollType == DiceRollType.Initiative)
             {
                 // TODO: Get initiative vantage for NPC/Monster
             }
             diceDtos.Add(npcMonsterDice);
         }
     }
 }
コード例 #3
0
 public static void AddD20sForSelected(List <DiceDto> diceDtos, DiceRollType rollType)
 {
     foreach (InGameCreature inGameCreature in AllInGameCreatures.Creatures)
     {
         if (inGameCreature.OnScreen)
         {
             DiceDto npcMonsterDice = new DiceDto();
             npcMonsterDice.Sides      = 20;
             npcMonsterDice.CreatureId = InGameCreature.GetUniversalIndex(inGameCreature.Index);
             npcMonsterDice.Quantity   = 1;
             //npcMonsterDice.Label = inGameCreature.Name;
             npcMonsterDice.PlayerName = inGameCreature.Name;
             npcMonsterDice.BackColor  = inGameCreature.BackgroundHex;
             npcMonsterDice.FontColor  = inGameCreature.ForegroundHex;
             if (rollType == DiceRollType.Initiative)
             {
                 // TODO: Get initiative vantage for NPC/Monster
             }
             diceDtos.Add(npcMonsterDice);
         }
     }
 }