コード例 #1
0
 public static Sprite GetTypeParticleSprite(Pokemon.Type type)
 {
     return(GetSprite(SpriteType.TypeParticle,
                      typeParticlePrefix + TypeFunc.GetTypeResourceName(type)));
 }
コード例 #2
0
 public static Sprite GetTypeSymbolSprite(Pokemon.Type type)
 {
     return(GetSprite(SpriteType.Symbol,
                      typeSymbolSpritePrefix + TypeFunc.GetTypeResourceName(type)));
 }
コード例 #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());
    }
コード例 #4
0
    public static Sprite GetTMSprite(Pokemon.Type moveType)
    {
        string resourceName = tmItemSpritePrefix + TypeFunc.GetTypeResourceName(moveType);

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