public void SpritePreviewSync()
    {
        SpriteDatabase.SpriteIndexInfo info = bulletDatabase.GetSpriteInfo(bulletGroupUI.value, bulletListUI.value);

        if (info != null)
        {
            bulletPreview.sprite = spriteDatabase.GetSprite(info);
        }
    }
Exemple #2
0
    public void BulletCurrSpriteSync()
    {
        SpriteDatabase.SpriteIndexInfo info = GetSpriteInfo();

        if (info == null)
        {
            Debug.Log("list is null");
            return;
        }

        info.group = bulletSpriteGroup;
        info.set   = 0;
        info.index = bulletSpriteListUI.value;

        bulletImage.sprite = spriteDatabase.GetSprite(info);
    }
Exemple #3
0
 public Bullet(string n, SpriteDatabase.SpriteIndexInfo sp, float at)
 {
     name       = n;
     spriteInfo = sp;
     attack     = at;
 }
Exemple #4
0
 public void AddNewBullet(int group, string n, SpriteDatabase.SpriteIndexInfo sp)
 {
     bulletList[group].list.Add(new Bullet(n, sp, 1f));
 }
Exemple #5
0
 public void BulletSpriteSync()
 {
     SpriteDatabase.SpriteIndexInfo info = GetSpriteInfo();
     bulletImage.sprite       = spriteDatabase.GetSprite(info);
     bulletSpriteListUI.value = info.index;
 }