Ejemplo n.º 1
0
    AnimalDef RandomAnimal()
    {
        AnimalDef.AnimalTypes[] animalTypesArray = Enum.GetValues(typeof(AnimalDef.AnimalTypes)) as AnimalDef.AnimalTypes[];
        AnimalDef.ColorTypes[]  colorTypesArray  = Enum.GetValues(typeof(AnimalDef.ColorTypes)) as AnimalDef.ColorTypes[];

        AnimalDef.AnimalTypes type   = animalTypesArray[UnityEngine.Random.Range(0, INITIAL_NUM_ANIMAL_TYPES)];         //animalTypesArray.Length)];
        AnimalDef.ColorTypes  colour = colorTypesArray[UnityEngine.Random.Range(0, colorTypesArray.Length)];

        AnimalDef ad = new AnimalDef(type, colour);

        return(ad);
    }
Ejemplo n.º 2
0
 public Texture GetAnimalTexture(AnimalDef.AnimalTypes id)
 {
     return(m_animalGraphics[(int)id]);
 }