Ejemplo n.º 1
0
 public static Creature GetCreatureFromId(int creatureId)
 {
     if (creatureId >= 0)
     {
         return(AllPlayers.GetFromId(creatureId));
     }
     else
     {
         InGameCreature inGameCreature = AllInGameCreatures.GetByIndex(-creatureId);
         if (inGameCreature != null)
         {
             return(inGameCreature.Creature);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
        public static int GetHueShift(int creatureId)
        {
            if (creatureId < 0)
            {
                InGameCreature creature = AllInGameCreatures.GetByIndex(-creatureId);
                if (creature == null)
                {
                    return(0);
                }


                Color color = (Color)ColorConverter.ConvertFromString(creature.BackgroundHex);
                return((int)color.GetHue());
            }
            else
            {
                Character player = AllPlayers.GetFromId(creatureId);
                if (player == null)
                {
                    return(0);
                }
                return(player.hueShift);
            }
        }