Ejemplo n.º 1
0
 public static Sprite GetTypeParticleSprite(Pokemon.Type type)
 {
     return(GetSprite(SpriteType.TypeParticle,
                      typeParticlePrefix + TypeFunc.GetTypeResourceName(type)));
 }
Ejemplo n.º 2
0
 public static Sprite GetTypeSymbolSprite(Pokemon.Type type)
 {
     return(GetSprite(SpriteType.Symbol,
                      typeSymbolSpritePrefix + TypeFunc.GetTypeResourceName(type)));
 }
Ejemplo n.º 3
0
    private static Sprite[] LoadTypeParticleSprites()
    {
        List <Sprite> sprites = new List <Sprite>();

        foreach (Pokemon.Type type in Enum.GetValues(typeof(Pokemon.Type)))
        {
            if (type == Pokemon.Type.Normal)
            {
                continue;
            }

            string resourceName = spritesResourcesPrefix + typeParticlesPath + typeParticlePrefix + TypeFunc.GetTypeResourceName(type);

            Sprite typeParticleSprite = Resources.Load <Sprite>(resourceName);

            if (typeParticleSprite == null)
            {
                Debug.LogWarning("Unable to find sprite for type " + type);
                continue;
            }

            sprites.Add(typeParticleSprite);
        }

        return(sprites.ToArray());
    }
Ejemplo n.º 4
0
    public static Sprite GetTMSprite(Pokemon.Type moveType)
    {
        string resourceName = tmItemSpritePrefix + TypeFunc.GetTypeResourceName(moveType);

        return(GetSprite(SpriteType.Item, resourceName));
    }